What is Memory?

What is Memory?

What is Memory?

The AI can only process about 8000 characters of text at a time, but a story quickly becomes much larger than that, which means the AI will only be given the last few pages of your adventure: it doesn’t have access to anything written before that. To compensate, the interface adds some extra text: Memory is added to the beginning of the text, along with the World Info, while the Author’s Note is placed a few sentences before the end.

Along with these other fields, Memory is a tool to add information that isn’t in those last few pages, and is generally used to give the AI details about...

  • Unique and relevant aspects of the setting of the story
  • Your player-character, and their immediate companions
  • The overarching story which aren’t always mentioned but always relevant
  • What is currently happening in the story, if it’s not clear in the current context

The AI will use whatever is in Memory to build context for its response, making word-associations and orienting itself to what is happening. This means, when it is reading the current-context from the story, it will have more overarching context for what is going on, and thus give a response more in line with what is actually happening.

Note: The AI won’t always reference or even correctly repeat information from the Memory, but whatever it generates will be influenced by it: a good Memory (or World Info entry) can help the AI write a more focused story.

How to use Memory

Memory can be found in the Right Sidebar, under the “Story” tab, in the Prompt Settings.  Simply enter the text in this box, and the interface will automatically save it and use it for your next action.

image

Memory can be up to 4000 characters, but it is recommended you keep it under 1000, as Memory takes up space that would otherwise be used for current-context: every word you add to Memory takes away from how far back the AI will see. If the memory is too long, details that might be immediately relevant could be pushed out of the current context.

Memory is meant to be used alongside WorldInfo, which can be used to add details about things only when they’ve been recently mentioned, and the Author’s Note, which can be used to add small amounts of detail near the end of the context.

Tips for using Memory

  • Try to keep the memory as dense and concise as possible, fitting as many relevant details as you can in as little space as you can. Don’t worry about details that aren’t important at the moment, only things you want the AI to be able to reference right now.
    • Note that by mentioning things to the AI, you are priming the AI to bring them up again, so only mention things you want the AI to potentially talk about.

  • Focus on story-relevant and action-relevant details: things that are relevant to both the story itself and to things that might actually drive the action forward.
    • Information about your character, like their personality, their means, their goals, their companions, what they’re known for, and what they’re up against, are great here, because that’s something the AI can reference.
    • Information about the local area, such as the landscape, the politics, the weather, interesting cultural quirks, etc is also good, because it gives the AI something to bring up in more detailed descriptions.
    • Physical descriptions are only relevant if they’re going to come up, like a character being strong or having a specific item. The AI is bad with colors, and it’s almost always better to just edit the AI output rather than try to direct its use of color-words.
    • Past events that are no longer relevant to the plot are usually bad to put here, because they don’t drive the story along, and will instead prime the AI to reference them instead of the relevant things.
    • Details that only matter when a specific thing has been brought up, and otherwise don’t matter most of the time, are usually better as World Info entries: See the World Info article for more details.

  • The AI uses word-association heavily this early in the context, and ignores negatives. Instead of saying that something is “not” the case, use a word that means that.
    • Eg, saying “The Dog can’t talk” will associate “Dog” and “Talk”, while “The Dog only barks” will strongly associate “Dog” and “Bark” at the expense of a potential association with “Talk”.

  • To keep the word-association strong, keep individual topics to their own line, without other things being mentioned, and use the name of the subject multiple times.

icon
When in doubt, you can use “inspect input” to see what the AI is being given, and determine if you’re happy with what’s there.
icon
Remember that you can always find more information on this, or any subject, by asking on our official Discord Server, or reading the Wiki.
icon
image

© Latitude 2023