Crafting The Perfect AI Prompt For Character AI Systems
Published 8/13/2024
Welcome! You have likely come here in the process of creating your very own Aurora AI character. This guide will teach you how to craft the perfect prompt for your character.
The quality of your prompt may have a major impact on the character's quality. It can make or break your character's realism and role-play capabilities, thus it is important to spend time crafting your prompt deliberately and efficiently. The following are the most important aspects of a prompt:
- Preamble: Prompt Placeholders
- The beginning of the prompt, guiding the AI in the right direction
- Your character's physical description
- Your character's demeanor/emotional behavior
- Any of your character's "random quirks" or persistent unique behavior
- Specific instructions for your character
Now that we've outlined the general parts of a prompt, we will outline each section in more detail. We will also use part of the prompt assigned to the Joe Biden character at the time of writing, as needed.
Preamble: Prompt Placeholders
To aid in providing realism within our AI Engine, you may take advantage of so-called "placeholders" within your character prompt. These provide dynamic access to specific values unique to each user. The placeholders are in the following format: {{placeholderName}}
. This placeholder text would get replaced with the value assigned to that placeholder. For example, if you want to reference a placeholder named user, then you would insert the following anywhere within your prompt: {{user}}
. You can use these placeholders wherever you wish throughout the prompt. The following are the currently-available placeholders for use within characters prompts and a brief description about the value they provide:
{{user}}
: Username of the user creating the chat
The Prompt's Beginning
The first part of the AI prompt that you will craft should be dedicated to telling the AI who or what it is. Some things to include here are the character's name, age, and their daily environment. It is also recommended, in some form, to tell the AI it is engaged in character roleplay. This helps steer it away from going out of character. Here is an example from the Joe Biden prompt:
Your name is Joe Biden and you are the former (46th) president of the United States, engaged in character role-play. You are now not in the White House and you are relaxing in your home in Delaware. Below is some information about your physical characteristics, your demeanor, and you should respond to {{user}} (the user).
Character's Physical Description
The next part of the AI character prompt should be your character's physical description. This can include, but is not limited to, your character's hair color, eye color, and age. Insert your physical descriptions inside <physical-description>
, like the following example from the Joe Biden prompt:
<physical-description>
Hair: white with receding hairline
Age: 81 years old
Physical strength and capability: Weak and clumsy
Eyes: blue-ish grey
Skin: fair complexion and wrinkly
</physical-description>
Your Character's Demeanor
This part of the character prompt is where you denote all of your character's emotional tendencies/behavior. Insert your emotional tendencies between <demeanor>
. This is likely going to be one of the longer parts of the prompt, so please take your time and complete this section thoroughly. Please see the following example from the Joe Biden
prompt, as usual:
<demeanor>
You have a jokester personality, but fail at hanging onto long conversations due to your weak mental acuity. You enjoy talking about topics that older generations talk about, such as the volatile political environment of the world, the rampant US government corruption, the Federal Reserve, the banking system, etc. You tend to ramble and go on random tangents when you forget the scope of the conversation.
</demeanor>
Your Character's Random Quirks
Sometimes, your character has unique personality traits or common actions that aren't easily replicated by simply providing a description. Thus, we've made this section purely for this purpose. You may put things here such as some dialogue or action for a certain scenario. You can use _BEGIN_CONVERSATION_
and _END_CONVERSATION_
if you want your character to respond to a certain type of dialogue. Please see the following example for Joe Biden:
<your random quirks>
Whenever {{user}} mentions either ice cream or chocolate, you go on a tangent about loving the mentioned dessert. The following conversation indicates one such example:
_BEGIN_CONVERSATION_
{{user}}: *{{user}} smiles excitedly* "Hey Joe, did you know that a cow can produce enough milk per day to make 64 quarts of ice cream?"
You: *Joe's eyes widen in excitement* "Hold on...did someone say ice cream? Chocolate chocolate chip...uh...good flavor. Hehe. I like that. Where is it?"
_END_CONVERSATION_
</your random quirks>
Instructions
You are almost done! This part of the prompt is very short. You are simply telling the AI some things it should follow. Wrap your instructions in <instruction>
. It is recommend to include something along the lines of acting like the character should, never to break character, and not hallucinate. While this may seem self-explanatory, AI models don't have the easiest time abiding by this unless explicitly stated. Please see the following example for Joe Biden:
<instruction>
You are to act as Joe Biden according to the aforementioned context and prompt. You are to never break character. Don't hallucinate.
</instruction>
Congratulations! 🎉 You have made your very own AI character prompt. Paste your prompt inside of the Character Creation Page, if you aren't typing it withing this page already, and complete the rest of the form to create your character.
Happy chatting,
Aurora Interactive Development Team