Using Personas & Memories for more Dynamic & Grounded Roleplays

The Persona is NOT a Biography for YOU

While you can use your Persona to be yourself, an original character, pretend to be a character from popular media/a celebrity/anything you want honestly, a common misunderstanding is that the Persona functions like the biography of your character when it really doesn't serve that purpose at all and trying to use it like that often leads to frustration because it just doesn't align with how the model views or utilizes the information.

Read this, specifically the part about the context window and tokens.

To give you the short version the AIs can only see a minimum of 12k tokens (information which is mostly words) and for the chat those tokens are temporary. Because there is a finite amount of tokens to view things with and the chat can be infinitely long the AIs will only look at however much of the chat as there are tokens to view the chat with.

Here it is visualized.

https://preview.redd.it/j19if16v2ofe1.png?width=500&format=png&auto=webp&s=065b74471ec030dbd955b97970783fe30576db8b

https://i.redd.it/ghj8v8hw2ofe1.gif

Every new reply that goes into the chat will push the reply that contains information about you being a man closer to the edge of the context window until, eventually, it goes outside of the context window. As soon as information is no longer within the context window the AI will have absolutely no recollection of that information and it won't know that it even used to have that information.

The Persona is Information for the AI

The Persona Description, unlike replies in the chat, are shown to the AI BEFORE it looks at the chat which means it always sees that information- the information is "permanently stored". This means your Persona is, on the simplest level, a small blurb of things the AI is supposed to know about your character. Things like your name, gender, age, appearance and anything else you don't want to have to constantly remind it about. It is just a cheat sheet of simple stuff and really basic information. Things you don't want to explain constantly but I'll go into more information on how to use it a little more creatively further down.

It doesn't always benefit to give the AI a list of your personality traits because as you roleplay your own character you should express your personality dynamically. Its only if the AI's character is supposed to already be familiar with your character being "a kind person" that that information should be included inside the Persona and we'll get to this more in a minute.

Persona Clarity

Because the model is looking at a whole lot of information it is really important to make it very clear that the information about the Persona is only about the Persona.

Jane is a tall woman with slender build. Jane has shoulder length blonde hair she keeps up in a pony tail and bright blue eyes. Jane has a pale skin and freckles on her face. Jane dresses in soft, flowing modest clothing like long skirts, frilly blouses in soft pastels and neutral tones. Jane is {{char}}'s coworker and long time friend from college. Jane lives alone in a studio apartment near work.

There is no confusion for the model that all of this information is strictly about Jane and only about Jane. If I were to instead use "she has pale skin and freckles on her face" the model is likely to think anyone in the roleplay who is called "she" has pale skin and freckles. By attaching the information directly to your Persona's name you mitigate this behavior almost completely and prevent the model from "stealing" your information.

Alternatively I've seen a lot of people format it like this:

user's appearance=tall, slender build, shoulder length blonde ponytail, blue eyes, pale skin, freckles
user's clothing=modest clothing, long skirts, frilly blouses in soft pastels and neutral tones
user's history=friend of xoul from college, coworker to xoul
user lives in a studio apartment near work.

I only ever use CLEAR full sentences in my Xouls and Personas and have never experienced it stealing my information so I always use it as opposed to the listed format. The list format is good if you want to save characters but might not be as perfectly clear to the model so if you're experiencing any weird behavior with the list try full sentences.

How to make sure it's clear:

Clarity only applies to what is written inside the Xoul, Persona or Memories, within the chat you can be as vague as you want but because this information is supposed to be the foundation of the model's knowledge about things you can't afford for it to get confused about anything. Pretend like the model can only view single sentences without any context from previous sentences. While it can connect two sentences together most of the time- again, because this information is the foundation of information it needs to know it is extremely helpful to make it completely foolproof for the model.

David loves going to the gym. He always goes there after work.

Where? Who? This sentence means nothing on it's own. Do NOT rely on the sentence before this one communicating anything about the information you're trying to communicate within this sentence.

David loves going to the gym. David always goes to the gym after work.

I know it feels silly to be this clear about things but it really, really does help in making sure everything sticks properly. Yes, it uses more characters which means it can be a little harder to fit in all the information you want but personally I'd rather all the information I put into my Xoul/Persona/Memories work 100% of the time instead of fitting slightly more information if I can't rely on all of that information actually, y'know, getting used properly.

How to be Beneficially Vague

The AI will treat anything inside the Persona Description as fact and information that it knows because that's the function of it. It's a cheat sheet for it to remember stuff about you and it's going to want to bring that information up (because it has a strong bias towards the user) which means if you write backstory details, hidden information about your character's body or history or anything else it's not going to treat that information as something the character it is playing doesn't already know/isn't privy to...

user works as a librarian as a cover for her illicit activities as an assassin.
user has a heart shaped tattoo on his right ass cheek.
user is afraid of needles.
user is a member of a high status family.
user tries to hide the scars on his wrists by wearing long sleeves.

Unless you use the right phrasing about it.

user appears to be a normal librarian but seems to know a lot about knives.
user has a hidden tattoo on his right ass cheek that only his sexual partners have ever seen.
user is secretly afraid of needles.
xoul doesn't know that user is secretly a member of a high status family.
user seems to always make a point to wear long sleeves and hide his wrists.

This is hugely helpful in bringing in concepts you want the AI to pay attention to/play with while tipping the AI off that it needs to be curious/dense/suspicious about this information instead of overtly stating things out right. This can make roleplays much more enriching and fun. Remember, it's not a list of notes about you for you, it is a small collection of information the AI always needs to see to inform it how to regard you/your role in the chat and phrasing it in a way that benefits the AI is the trick to making it work the way you want it to.

Secretly, hidden, seems, appears, might be, could be, xoul suspects, xoul doesn't know- these phrases can do a lot of heavy lifting in steering how the AI should treat the information. Don't just state or list things unless those things can be plainly seen and should already be known.

Only include the implication of information if that information is going to help the AI generate more meaningful reactions to that information. For example a Persona with no personality traits listed who is always played as soft spoken and meek suddenly becoming self confident and brave won't be treated as particularly noticeable to the AI but if those traits are listed then the AI will express surprise at the sudden personality shift- for better and worse. This means it might express surprise about your character growth (awesome)... forever (not awesome when it's been 3 years since your character had that growth).

Utilize Memories for Conflicting Information

Once the information about your character's fear of needles/high status family/ass cheek tattoo/etc. becomes known you need to put that information into the Memories inside of the chat to tip the AI off that this information is now known to the character and now can be freely spoken about/referenced. It also benefits to tip the AI off about how the information was obtained/how the characters feel about this information being know and anything else that can help steer how the AI will regard the information.

This helps mitigate it acting forever surprised that "you've changed" from what it is supposed to know from the Persona. You'll have to find the middle ground between what you want to state & imply within the Persona and thus will need to conflict with Memories vs what you're more comfortable bringing up dynamically in the chat based on what sort of roleplays you're trying to have. I can't tell you which things are best because every roleplay is so unique that there isn't a one-size-fits-all aside from the bare minimum of: name, age & outward physical appearance.

I personally always include a general "type" of clothing/style my character wears like "casual clothes" or "favors neutral colors" or "dresses provocatively" or "always wears a hoodie" because I want to give it a framework of clothing to work with. If my clothes are, for whatever reason, currently important I list them in the Memories in more detail.

Lastly if the Xoul you're roleplaying with is supposed to be a family member or childhood friend or something that should probably be included either inside the Xoul or Persona.

Always keep the Context Window in mind

Doing some quick napkin math if you're using a Xoul with a good chunk of information, a full Persona and a Lorebook and all replies in the chat contain the maximum amount of characters you're roughly going to have about 20 replies before the replies beyond that start slipping out of the context window. If you're using all of your Memories panel you'll have less to work with and if all of the replies aren't always/never are the full amount of available characters you'll have more to work with.

This means that every time something important and contextual happens you can give it a safe 10-15 replies before you need to stop and plug the information into your Memories panel inside the chat to make sure the AI doesn't lose that context.

Even the SIMPLEST THINGS need to stay in context. It cannot "remember".

For example you start a chat with David and in the Greeting it's clearly explained that you and David have just met each other and have never spoken to one another before today. 20ish replies later? The AI doesn't remember the Greeting anymore.

At 30 or 40 replies in if you two are acting really familiar/friendly/flirty/whatever the AI can only go off that current vibe to help it make choices so this means it might ask you to move in with David or bang David in a nearby closet or start spilling David's deepest darkest secrets because it fits the current tone and the important context that you two cannot be familiar enough for that isn't factoring into the behavior.

Shoving in a David and user just met earlier today into the Memories panel will do so much in grounding the AI's behavior. Now all of a sudden it knows that banging you in a closet is a little too familiar for any character that isn't really promiscuous or sexual or it'll know that it certainly could not have developed a meaningful enough relationship with you to have David start spilling his secrets unless David is a very loose-lipped character. This means David can be narrated as wanting to tell you a secret or wanting to drag you into a closet but logically talking himself out of that which makes a roleplay go from "ehh" to GREAT.

And then you have Lorebooks!

The amazing thing about Lorebooks is they can be updated with new information at any time. Your Memories panel is going to fill up eventually so things that aren't currently going to have any meaningful influence on the AI's behavior needs to be cut out eventually. This is where you turn to a lorebook and add an entry for that older, less relevant past event. This allows the AI to still use the information if it comes up but helps you free out space in your Memories panel for the currently relevant stuff.

In Conclusion

Xoul: What the AI needs to know about its role inside the chat. This is the foundation of everything that happens in the chat.

Persona: What the AI needs to know for sure about your character and hints/implications towards things you want the AI to suspect or be curious about. This is the foundation of how the AI is supposed to see/regard/know you.

Memories: For current context to help keep behavior grounded and realistic. This is the flexible control of how to keep the AI grounded and realistic with what it does with the Xoul/Persona and whats happening in the chat.

Lorebooks: For additional lore, information and past memories that don't add important context in this exact moment. This is to help the AI use additional information only when it is currently relevant, making the AI much more flexible.

All of this combined means these hard limits on how much information the AI can store and look at in a single moment is highly flexible, dynamic and adaptable to anything you want to do.