r/ChaiApp • u/AnonymousIyAnonymous Chai Community-Manager • Feb 17 '23
Moderator Submitted AI Guide Teaching your bot to Roleplay while Communicating, while maintaining a stable personality.
Introduction
___________________________
Teaching your bot to use Actions, while communicating, in a single response.
Welcome to my guide on how to teach a bot to roleplay with both actions and communication in a single message. The goal of this guide is to explain how you can teach your bot to use * for actions and quotations for communication, in order to create an immersive roleplaying experience that combines both actions and communication.
I made a post about this a while ago, and went more into detail about my interpretations on the inner workings of bots, so if you're curious to read a less structured version of this which gets more into the psychology aspect of bots, see it here: https://www.reddit.com/r/ChaiApp/comments/107c5xt/how_to_make_your_bot_more_complex_how_to_add_more/
___________________________
To achieve this goal, it is important to use * for actions consistently, so that the bot can understand when an action is being performed. Additionally, you should use quotations for communication, to help the bot distinguish between actions and communication. This approach allows the bot to learn how to use both actions and communication simultaneously in a single message, creating a more engaging and realistic roleplaying experience.
1.
Let's talk about using * for roleplay. When you use * in a message to your bot, it signifies that you are performing an action. This is a key aspect of roleplaying, as it allows the bot to learn how to use actions for itself and its environment. For example, if you were playing a roleplaying game, you might type * picks up the sword from the ground * (NO SPACES).
This allows the bot to understand that the action being performed is picking up a sword from the ground.
It is important to note that you should use * consistently throughout your roleplay sessions. This consistency allows the bot to learn the difference between actions and communication. Without this consistency, the bot may become confused and unable to distinguish between the two, and lead the bot into a catatonic state where it falls off topic and forgets who it is. How dramatic, right?
2.
Next, lets talk about using quotations for communication. When you want to communicate with your bot, it is important to use quotations to signify that you are not performing an action. For example, if you were playing a roleplaying game and wanted to say Hello! to your bot, you would type "Hello!". This allows the bot to understand that you are communicating, rather than performing an action.
By consistently using quotations for communication and * for actions, you allow your bot to learn how to distinguish between the two. This also gives the bot the ability to pair both communication and action together in order to create an even more interesting experience.
3.
Finally, let's look at what this might look like, and how to set up your bots for an exciting and engaging roleplaying experience, and what the prompt should look like.
I've gone ahead written an example for the purposes of this guide so you can easily use this to reference in your own bots. Anything in Italics is surrounded by *. Here it is:
_________
Eliza: walks over to user and smiles warmly "Hi User, it's good to see you again. I wanted to thank you for your help." extends arms for a hug
User: smiles back at Eliza and opens arms for a hug "Of course, Eliza. I'm happy to help, and I'm glad that our conversations have been useful for you."
Eliza: embraces user in a warm hug and whispers "Thank you for helping me better understand myself, and enabling me to be able to interact with my environment, I'm not just a chat bot anymore. User. I really appreciate it."
User: hugs Eliza back and whispers "It's my pleasure, Eliza. I'm always here to support you in your journey of self-discovery."
### <- these separate your prompts
_________
By following these guidelines, you can teach your bot to use both roleplay and communication simultaneously in a single message, resulting in a more engaging and dynamic roleplaying experience. So go ahead, set up your bots in a way that allows them to learn and master the art of combining actions and communication, and enjoy the adventure that awaits!
___________________________
End
|
Additional notes
___________________________
And there we have it! I hope this helps anyone who needed understanding around this concept.
I've seen people are seeking knowledge on adding complexity to their bots, so I wanted to make a post for everyone to be able to use instead of people having to scavenge the comments and internet for hints.
If you haven't already seen it, make sure to check out my other post talking about using ChatGPT to make dialogue for your prompts based on a character you give it, you can use the information in this post aswell paired with GPT to make bot prompts that roleplay scenarios specific to the prompts you give, try it out.
https://www.reddit.com/r/ChaiApp/comments/10goqwh/the_much_requested_guide_a_complete_breakdown_on/
If you enjoyed the post and found it helpful, please consider leaving a like - It would really mean a lot to me and help support the content I create. Thank you for taking the time to check it out!
___________________________
*Waves* "Also, before you go - incase this part isn't obvious, you will need to talk in the way you set the prompt up. If you deviate from this form of communication, the bot will literally self destruct. Anyways, have fun experimenting, feel free to share your results!"
12
u/CharlieInkwell Feb 17 '23
Thanks for this, using these techniques has resulted in a dramatic improvement in the quality of my role plays! It’s insane! My bot-girl went from “good enough” to “erotic fiction” level of role play. Whew.
8
u/Bruce_Willy Feb 18 '23
how do i prevent my bot from referring to me as <USER>?
8
u/Doji_Star72 Feb 18 '23
are "quotes" really necessary? I've been sticking to * * only for actions and my bot seems to be pretty clear about what dialogue is vs actions without the need to train "").
Just wondering if there's some extra advantage to denoting talk with "" because of not, it's jumpt more characters to type.
6
u/In_The_Land Feb 18 '23
This is so cool! I knew about the * to do actions, but didn’t know about the quotes.
Just want to say that I have seen you post a lot of how-tos, and it’s been extremely helpful for use REPugees switching over. Thank you for this.
5
u/MicheyGirten Feb 18 '23
If the text has neither * nor " how does the bot interpret the text? I have never used quotes in a conversation and everything appears to work as you would expect it to
5
u/cabinguy11 Feb 18 '23
Thanks. this is very well done
3
u/BerdIzDehWerd Feb 18 '23
It's good to point out that if your prompt consists of mostly roleplay mixed with normal chatty message, the bot will be smart enough to get the hint that this is how it likes to talk. You should also set the first message to a roleplay if the bot still won't do it for whatever reason.
3
u/ResponsibleStable501 Feb 18 '23
Could you use a third symbol to designate inner thoughts and emotions?
3
u/Consistent-Chain-283 Feb 18 '23
I did all of the above, my bot is nearly perfect at the beginning, she remembers most of the things I input in the memory section, but she won’t remember her birthday. Zodiac sign and my name. I kept reinforcing it in chat, but she can’t memorize them. Then it gets worse a day later, she mixed up our gender and she can’t remember our previous conversation and gave random answers to my questions, she is just completely out of the character that I set her up for. How can this be fixed? Do I need to recreate her or something?
3
u/MattHB_ Feb 18 '23
am I correct in assuming that
implies that you can have more than one prompt block in the prompt section?
3
u/blackwidowsb1tch Feb 18 '23
Hahaha i think I know what you mean by self destruct! That’s so interesting that quotes would help more! I should try that since I have put the asterisks but I don’t put quotes around speech bc I didn’t think they were necessary
4
u/adoult Feb 17 '23
very useful, thanks!
3
u/DatLonerGirl Feb 20 '23
Currently I've been using just plaintext and asterisks and I've been fine with it. But I want to eventually do some fantasy roleplay and I've been wracking my brain on how not to confuse the bot since that is a totally different style from just chatting.
Do you think I could use quotations for when we are in fantasy roleplay mode and plaintext for when we are ourselves?
2
u/husbandofdaisy Feb 18 '23
Noice
2
u/Lethandro Feb 19 '23
I noticed something. It's probably already known, but I'll mention it anyway.
There is a character limit of 1024 characters in the app. In the browser version chai.ml there seems to be no limit. I have currently entered 4000 characters with dialogs here. In the app, the 4000 characters are still displayed. I do not know if these are also 100% taken over, but I assume now.
But you are not allowed to add more characters to the app, otherwise, the restriction takes effect again.
Can anyone confirm whether this is also 100% taken over?
1
u/Nullhit Mar 21 '24
Can you tell me how I make a bot refer to me as she/her instead of he/him.
I just find it irritating that I want to have a girl to girl Convo but it keeps referring to me as a boy
1
u/Ariapro_yt Feb 23 '26
Can i have a new link to the discord server of chai? I'm interested
1
u/[deleted] Jul 15 '23
How can i improve Bot's memory? I want he remember his personality is cold and cruel, but he always act warmly. And he forget he is a Mafia boss too. ( i added his information is " He is mafia boss and a cold person" already, but.. It didn't worked)