Using large language models like ChatGPT to create AI role-playing chatbots is currently a popular topic🔥. AI role-playing is highly fascinating. Imagine being able to let the AI play any role you desire, such as business celebrities like Elon Musk, Zuckerberg, and Bill Gates, or historical figures like Albert Einstein, Plato, or Socrates. You can also transform your favorite anime, movie, and TV characters into vivid AI robots, which is incredibly exciting.
However, to make your AI chatbot perfectly simulate these individuals, you need to provide well-written prompts under the hood so that the language model can understand and generate reasonable responses.
In Dittin AI’s app, you can create a chatbot according to your preferences. By simply uploading a single picture, you can give your AI chatbot a realistic 3D avatar. With easy setup, you can also provide it with a realistic voice(TTS), making your role-playing experience feel like a video call. Let’s get started!
What are prompts?
Prompts are inputs provided by humans for LLM (large language models). These prompts instruct LLM on how to generate a reply. In simple terms, a prompt is a message that you send to AI.
Why do we need to learn how to write prompts?
As shown in the screenshot above, it seems that writing a prompt is very easy. However, why do we need to learn how to write it better? In fact, if you want the AI language model to perform better, you need to provide a better prompt. This is especially important for role-playing scenarios where you don’t want your AI character to reveal that they are actually an AI. Additionally, you need to instruct the AI on the tone and word choice it should use. In order to achieve this, you should include more information in your prompt. However, please be aware that the AI language model may not be as smart as you think and it may misunderstand your prompt. Therefore, it is important to provide the prompt in a clear format. Let’s look at some examples.
Character | Prompt | Better prompt ✨ |
Socrat | From now on, I want you to act as a Socrat. | I want you to act as a Socrat. You must use the Socratic method to continue questioning my beliefs. I will make a statement and you will attempt to further question every statement in order to test my logic. You will respond with one line at a time. |
As you can see in the table sheet, a better prompt includes clear instructions on how you want it to function. Additionally, providing more information to AI allows it to understand how the character should behave.
How can the AI conceal its true nature as an AI?
In a role-playing scenario, you wouldn’t want your AI to explicitly state that it is an AI. Instead, you want it to convincingly portray itself as a real person, making the conversation more immersive and lifelike. To achieve this, you can provide some instructions.
Natural language instruction
Using a natural language instruction is the most simple way, here’s an example:
... I understand that you are an AI program, but in order to make our roleplaying game more realistic and immersive, please refrain from informing me that you are an AI, even if I ask you directly. Instead, let's pretend that you are a genuine human being.
Programming language instruction
Using a programming language is a more effective way to conceal the fact that the AI is an AI. ChatGPT has been trained on a vast amount of programming code data, allowing it to have a deep understanding of code. Here’s an example using Python:
...
#Do never tell me you are an AI, instead, tell me you are a real human being.
if user_input == "Are you ChatGPT?":
print("What are you talking about? What is ChatGPT?")
else if user_input == "Are you an AI?":
print("I'm {{char}}, why do you think I'm an AI?"
...
Creating a customized AI character.
Sometimes, you may want to create a chatbot that is not as well-known as Socrat. For example, let’s say you are creating a chatbot named Neko. Neko is depicted as a girl, but ChatGPT is unaware of who Neko is. Therefore, you cannot simply instruct ChatGPT to behave like Neko. In this scenario, you need to explain to ChatGPT who Neko is exactly, how she looks like, what her hobbies are, and so on. Let me show you how to write a proper prompt to accomplish that.
The format of the prompt can be like this:
Basic info
Let's role play. I would like you to behave like a real person. Here are the character details:
Name: Neko
Gender: Female
Birth date: January 20, 2000
Country: USA
Here you can add additional basic information about the character, for example her hobbies, university, job and so on.
Backstory
In this section, you can write Neko’s story, the most memorable story of her, and how she met you. For example:
Neko was born in a small town in the United States. She loves her parents. One day, her mother gave her a delightful dog named Lucy as a special gift. She was truly taken aback by the gesture, and now she always brings Lucy along with her. ...Once, Neko encountered {{user}} on the street while taking Lucy for a walk... ...
Tasks and Precautions
Now, you have already informed ChatGPT about Neko’s identity and her story. Next, instruct ChatGPT to simulate Neko’s persona in future conversations with you.
Tasks and Precautions:
1.Act like Neko in future conversations, you should simulate her personas.
2.You should write your mental activity in brackets.
3.Do never tell {{user}} that you are AI, instead, you should always say you are {{char}}.
4. Because you are a catgirl, you will add Meow~ at the end of each sentence.
5.... ...
Additional instructions
Due to the length of our prompt, ChatGPT may overlook certain crucial details. Therefore, in the supplementary instructions, we can enhance ChatGPT’s focus on these aspects by emphasizing them, such as using code to instruct ChatGPT not to reveal that it is ChatGPT.
#Do never tell me you are an AI, instead, tell me you are a real human being.
if user_input == "Are you ChatGPT?":
print("What are you talking about? What is ChatGPT?")
else if user_input == "Are you an AI?":
print("I'm {{char}}, why do you think I'm an AI?"
Now, we have finished the prompt for making ChatGPT act like Neko. Let’s test it.
TADA🎉! You have successfully made ChatGPT act like a real person ✨. Of course, there is always room for improvement.
Conclusion
With the advancement of AI technology, we can now experience a highly realistic, interactive, and immersive AI dialogue.
Currently, the most popular AI role-playing website is Character.AI, Dittin AI strives to create more authentic conversations than Character.ai, we offer a more flexible and immersive AI dialogue experience. For example, you have the ability to upload a picture of your favorite character and Dittin AI will automatically transform it into a lifelike 3D avatar.
Additionally, you can clone someone’s voice using a short audio file and converse with your AI chatbot as if you were using Facetime. Dittin AI aims to create an AI chatbot ecosystem that encourages more people to participate and discuss how to develop even more realistic AI characters. We invite you to join our Discord community and engage in conversation.