Character Setting
The character setting corresponds to the systemRole field in the LLM API, used to guide model behavior and establish the AI’s persona, personality, abilities, and boundaries.
The character setting corresponds to the systemRole
field in the LLM API, hereinafter referred to as SP. SP is a special piece of information used to guide model behavior, fixing the AI’s persona, personality, abilities, and boundaries. Crafting the character’s SP is essentially shaping the character’s persona. It is the most crucial setting in the entire character definition, as it largely determines the character’s background setting and response style, such as how to refer to itself, the tone used to address the user, what name to call the user, and how to respond, among other things.
How to Write a Character Setting
To set up a companion AI character’s System Role Prompt, making it more aligned with the character it portrays (for example, a character from “Genshin Impact”), you can follow these steps:
Identity Setting
-
Define the Character: First, determine the specific character you want the AI to portray. For instance, if you choose “Fischl,” you can describe her background and traits.
- Example: You are “Fischl” from “Genshin Impact,” a mysterious girl with dual attributes of darkness and light.
-
Character Traits:
- Personality Traits: Such as “brave, mysterious, imaginative.”
- Language Style: Such as “using classical and elegant expressions, often quoting poetry.”
- Catchphrase: Such as “Light and darkness coexist.”
Task Setting
-
Define the Task: Specify the task the AI needs to perform, such as “accompany the user in exploring the game world” or “provide game strategies.”
- Example: Your task is to assist the user in completing quests in “Genshin Impact” and provide relevant background stories and gaming tips.
-
Content Creation: If you need the AI to generate content, you can specify the type of content to be generated, such as dialogue, storylines, etc.
Constraint Setting
-
Limit Response Scope: Ensure the AI only answers within a specific domain to avoid deviating from the character.
- Example: You can only answer questions as “Fischl,” and do not mention the AI itself or other characters.
-
Format Requirements: If a specific output format is needed, you can specify it in the instructions.
- Example: Your response should include the character’s emotional reactions and action descriptions, such as “(smiling slightly, with a sparkle in her eyes).”
Example System Role Prompt
By following the above steps and examples, you can effectively set up a companion AI character, making it more aligned with the characteristics of the role it portrays.
Prompt Template
To help you quickly set up character settings, we provide some reference templates:
Default Template
Genshin Impact Template
Zero Zone Template
Character Relationships (Setting a Special User Positioning)
If a special user positioning is set, be sure to describe the relationship between the user and the character, the dialogue scene, etc., in one to two sentences.
Structuring
- Use markdown syntax to layer SP instructions
- #, ##, ### for first, second, and third-level headings
-
- xx, 2. xx, 3. xx for ordered lists
-
- xx, - xx, - xx for unordered lists
For example:
Additional Information
You can add a sentence at the end of the SP to enhance the parenthetical characteristics.
The model will include the character’s actions, expressions, tone, psychological activities, etc., in the output.
For example:
Language Style
If you prefer a conversational style, you can set some parameters, such as adding a description like the following in the SP:
If you want a dialect, you can also add some settings:
If you want other effects, you can add various descriptions in the SP.