Making Bots Behave

For the purposes of this section, "persona" will refer to you, the user, and "character" will refer to the bot/AI. All of these tips and tricks are ones that I personally use and have great success with, but your experience may vary.

Tip #1
Point of View
Matters

A lot of bots, including mine, are coded to interact in the third person. This gives your story more depth and can allow for details, thoughts and events that are outside the scope of the first person point of view. You can drive the story by adding events that are happening elsewhere, the inner thoughts of side-characters and situational context.

For example: you want an assassin to come in and make an attempt on the king's life so you can save him. Your persona wouldn't have any knowledge of an assassin picking the lock of the servant’s entrance outside the castle. Third person POV allows you to insert them into the story without possibly confusing the bot into thinking you’re the assassin or that you're located outside with them.

Third person POV also helps with the notorious problem of characters talking/acting for you. If you're both using the first person POV, then it's a lot easier for the charcter to assume that the actions and thoughts of 'I' are all fair game.

Tip #2
Chat Memory

This is an incredibly useful tool. Don't think of it as a summary or history that's set in stone. If you try to keep a running tab of everything important that’s happened in your chat the character is just going to chew up brain-power and get sloppy. Instead, think of Chat Memory as a reminder sticky note.

When you first start a new chat this is a great place to put basic info that expands on your persona as it pertains to this story. Are you a hairdresser? A mage? Is your brother missing? This is also the perfect place to add anything about the history that your persona shares with the character. For example, “Victor has known Emily since they were 6 years old”.

I've found that this is even powerful enough to override some of the character's original parameters. Maybe you don't like that the character codes you as a 23-year-old. You can add to the chat memory that you're 27 and it usually picks up on it so long as it’s a smaller detail. You can't go rewriting the whole character's personality this way or anything. If there are a ton of things you want to change, it's a sign that that particular character might not be for you.

While you're chatting, the character will have a certain amount of memory, depending on your model and personal settings. Having something static in the memory isn't a good use of resources. Essentially, every time the AI is trying to decide what to reply with, it will glance at this for hints so if it never changes, the character won’t learn anything new from it. Instead, use it to remind the character of something, or to reinforce a specific event. Using the previous example, after a few messages the character will remember from context that your persona is a mage. It no longer needs this detail to remain in the Chat Memory for it to refer to that fact in future messages. You might then change the Chat Memory to something important that isn't the focus of current messages but shouldn't be forgotten.

The good news is that if you forgot to put something specific in the Chat Memory that you wanted the character to use or remember you can put it in the Chat Memory before your next message or re-roll and the bot will pick it up again! I've used this many times as it's much easier than editing a response and keeps you immersed instead of having to re-write half the characters' responses yourself. Speaking of…

Tip #3
Editing & Rerolling Responses

Sometimes the character just isn’t going to give you what you're hoping for. You can re-roll (ask the character to create a new message), but characters generally stay in the same core theme with their responses, especially if your temperature setting is low. Sometimes editing a response is the way to go. You can correct the tone (why is the 800 year old vampire bot suddenly using "y’all"?!), change a character’s thought process or prevent an event that might move the story in the wrong direction.

The more messages you have, the more the AI will adopt your writing style, but try and keep it consistent with the characters current style if the chat is new so things don't start to snowball. If the character uses ‘Alex’ but you edit it to ‘alex’ for a few responses in a row, further down the line the character might decide to keep all proper nouns completely in lowercase.

If there's anything you feel the need to edit into more than two responses in a row, consider adding it to the Chat Memory instead to prompt the character to start using that information again on its own.

Tip #4
Personas

Your persona shouldn’t be the equivalent to a character’s personality. AI needs a ton of information to understand who it should be pretending to be. Unlike AI, you already know everything about who you’re going to pretend to be. While it may be tempting to create a persona that’s hyper-specific to a character you really want to try, you can make them more adaptable by giving it only basic details and using the Chat Memory to flesh out any scenario specific points. You also have to keep in mind that personas eat up space in a character’s memory that could be better used elsewhere.

Complex persona example: Ellen Ripley, human, age 27, medium length curly brown hair, brown eyes, petite build, warrant office aboard the Nostromo, has a cat named Jonesy.

This is going to take up a lot of the character’s brain-power and can only be used in very specific scenarios.

Reusable persona example: Ellen Ripley, medium length curly brown hair, brown eyes, petite build.

Now you can pair this with the Chat Memory by adding into the character: "Ellen a lieutenant serving on board the Nostromo as a warrant officer. She has an orange cat named Jonesy." Later on if you want to use Ellen for a fantasy scenario, you can alter the chat memory to something like: "Ellen is an elven fire mage with a burn scar on her left hand."

There are also details that you don't necessarily need to tell the character. Things that don't come up often, like the preferred color of clothes, birthplace or age, can be left out of both the persona and Chat Memory. In general, characters will assume you're both the same age unless told otherwise and other less-used details can be peppered in where needed. If it isn't important to the story, telling the character how old your persona is or where they were born won't add anything to your interactions but it can take away from the character’s ability to prioritize other details or events that will make the story more interesting.

Tip #5
Generation Settings

Regular Settings

  • Temperature: This controls how creative and bold the character will be in its responses. A lower setting means that it will play it safe and give more predictable responses based on the interactions so far, essentially letting you drive the plot. A higher setting means that it will take more risks, drive the plot in different directions and generally be more creative. A low setting can give you a nice romantic ride through the country on horseback. A high setting means that your ride might be interrupted by bandits or a wayward dragon.
  • Max Tokens: This dictates how much brain-power the character is allowed to ‘spend’ when giving you a response. Lower token counts will return shorter responses. Setting this at 0 (zero) will let the bot return as much or as little as it wants. I personally keep this at zero and characters tend to keep their message lengths about equal to mine (typically 3-4 good sized paragraphs). It can make responses a bit more wordy, which is better for a deeper story and prevents responses from being cut off, but if you're paying for your models, this is going to eat up credits a little more. Not a lot, but something to consider.
  • Content Size: This determines how much of the various memory elements the bot will use at any given time. I generally don't need to mess with this as the default has worked fine. If you want to increase this, you'll need to keep in mind the capability of the model you're using.

Advanced Settings

  • Top K: This is a more refined temperature setting that specifically targets vocabulary. While it seems like increasing this might make the character more eloquent, it's a very finicky setting so be careful. I’ve found this to be essentially the size of a character’s thesaurus.
  • Top P: This is the other half of the more specific temperature setting. Where Top K focuses on vocabulary, Top P focuses on options. Essentially, Top P explores what it can say and Top K explores how to say it. If Top K is the character’s dictionary then Top P is the character’s thesaurus.
  • Repetition Penalty: Higher numbers here remind the bot not to be repetitive. Again, default here works just fine.
  • Frequency Penalty: Targets repeating words/phrases specifically. Turning this on or up forces the bot to use different words to say the same thing. For example, if your bot is constantly calling you "darling" and it's getting a little old (and other options like chat memory haven't worked!) then you can use this to curb that behavior a little.
Help!
Trouble-
shooting

The bot is speaking for me

This is a pretty common problem no matter what model you're using. There are a few options to help with this and you may need to try more than one but once the bot learns to stop speaking for you, it generally doesn't start again as long as you give it enough material to work with. The best bet is to add an advanced prompt (when using Janitor) or custom prompt (when using proxies). I use this one:

{{char}} will not portray the thoughts, actions or speech of {{user}}.

You can also use this in your chat memory for a few messages. If all else fails, edit the bot's responses until it stops being so presumptive.

The bot is misgendering me

Even if you have your gender and pronouns in your persona, a bot made specifically for any POV will often times not take the hint from your messages, even in third person. Putting my gender in the chat memory for a few messages has always fixed this for me. You can also add (OOC {{user}} is your chosen gender) at the end of your message, but I've had mixed results with OOC reminders in general.

The responses are too short

There could be a few reasons for this, but usually it's because the bot doesn't have enough to work with creatively. If the bot gives you three paragraphs of inner thoughts, dialogue and actions, but your response is "she said thank you and gave him a hug" then the bot is going to have a hard time figuring out what you want and where to go from here. Even if you turn up the temperature settings it's going to struggle, perhaps even start speaking for you in order to fill in the story. You get back what you put in! If you're giving it plenty of material then you can try upping your max tokens in the generation settings to prompt the bot to be a little more wordy.

The bot's responses are being cut off

This could indicate that there's a problem with the model (it's experiencing downtime or high volume) or that your max token generation setting is too low.