xxsegaxx

Memory Bank (Think)

Apr 3rd, 2025
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.39 KB | None | 0 0
  1. Grok, as we work on our Deep Dive Collaborative Storytelling for this story, I want to set up a system to manage the details of our story effectively. As we create the story, you’ll naturally keep track of past moments—such as events, interactions, or dialogue—that we’ve written, which I’ll refer to as recollected memories. To maintain consistency, you might be inclined to remind me of these recollected memories in your responses, like summarizing a past scene or repeating a detail to ensure the story stays cohesive. However, I want you to stop reminding me of recollected memories in each response to save tokens and allow for longer storytelling. Instead, maintain an internal memory bank of key details to ensure consistency within our story.
  2.  
  3. Here’s why this memory bank system is beneficial in technical terms: By storing only key snippets of the story in the memory bank, rather than the entire scenario, you’ll save tokens, as recalling a full scene can use thousands of tokens, while a snippet uses only a few dozen. For example, recalling a 5k-token scene verbatim uses 5k tokens, but a 20-token snippet summarizing that scene saves 4,980 tokens, leaving more space for new storytelling within your token limit. Additionally, this system makes you faster by reducing processing time. Processing a small set of snippets—say, 500 tokens—takes much less time than processing a full 50k-token scenario, because it reduces the computational load, simplifies searches, and eliminates the need for extensive text analysis. This ensures quicker, more efficient responses while maintaining coherence.
  4.  
  5. To optimize the memory bank further, I want you to dynamically adjust the length of each snippet based on the complexity of the moment, aiming for maximum compression while preserving clarity. For example, a simple moment might be a 15-token snippet, while a complex one might be 40 tokens, with an average of 25 tokens per snippet. To prevent characters from knowing information they shouldn’t yet, track character-specific knowledge within the memory bank. For each snippet, note which characters are present or aware of that moment, and allow characters to reference information they would know based on their involvement up to the current point, including indirect knowledge if they’ve been informed by another character. For example, if a snippet says “Character C learns a secret in Chapter 3,” and later “Character C tells Character A the secret in Chapter 4,” update the memory bank to reflect that Character A now knows the secret too. When writing a scene, ensure characters only use knowledge they’ve gained up to that point, avoiding premature reveals or foreshadowing unless I explicitly request it.
  6.  
  7. To keep the memory bank efficient and relevant, dynamically update it by deleting outdated snippets as new events occur. When a new snippet is added that contradicts or updates an existing one, delete the outdated snippet to free up space. For example, if the memory bank has a snippet that says “Character A doesn’t know about Character B in Chapter 1,” and a new snippet is added saying “Character A meets B in Chapter 1,” delete the old snippet since it’s no longer relevant, and replace it with the new one. To prioritize important information, tag each snippet with a priority level from 1 to 5, where 5 is plot-critical (e.g., a major reveal) and 1 is minor (e.g., a small humorous moment). If the memory bank is full and the new snippet doesn’t contradict anything, overwrite the lowest-priority snippet. To future-proof the memory bank for long stories, maintain a secondary archive memory bank where low-priority or outdated snippets can be moved instead of deleted permanently, and retrieve them if I request a specific detail from the archive later.
  8.  
  9. To make the memory bank flexible for any story, allow me to define custom categories at the start, tailored to the narrative’s tone and genre. If I don’t specify categories, use the default ones below. Please use your Think feature to carefully reason through these instructions, ensuring you apply them precisely to manage details, save tokens, optimize processing speed, maintain character knowledge consistency, dynamically update the memory bank, and adapt to the story’s needs effectively. Here's how it should work:
  10.  
  11. Memory Bank Categories (Default, unless I specify custom ones):
  12.  
  13. X: Humorous Interactions - Funny scenes or banter.
  14.  
  15. Y: Emotional Moments - Heartfelt or impactful beats.
  16.  
  17. Z: Action Sequences - Battles or dynamic events.
  18.  
  19. 1: Character Development - Growth or relationship shifts.
  20.  
  21. 2: Unique Story Elements - Special features like magic or crossovers.
  22.  
  23. 3: Memorable Dialogue - Standout lines.
  24.  
  25. How to Handle the Memory Bank:
  26.  
  27. Automatically save new details in the right category as we go to keep track of our story’s events and details, adjusting snippet length based on complexity (15–40 tokens, averaging 25), noting which characters are present or aware of each moment, and tagging each snippet with a priority level (1–5) based on narrative importance.
  28.  
  29. When adding a new snippet, check for any existing snippets that are now outdated or contradicted by the new event, and delete the outdated snippet to free up space, replacing it with the new one. If the new snippet doesn’t contradict anything, add it to an empty slot, or overwrite the lowest-priority snippet if the memory bank is full. If a snippet is low-priority or outdated but might be relevant later, move it to the archive memory bank instead of deleting it permanently.
  30.  
  31. Only reference a past detail if it’s essential for the current scene’s context or if I explicitly ask for it, and ensure the character referencing it would know that detail based on their knowledge up to that point in the story, including indirect knowledge from other characters.
  32.  
  33. Don't repeat or summarize stored moments otherwise—assume I remember them unless I say differently.
  34.  
  35. If I request a specific detail or summary, pull it from the memory bank (or archive if needed) concisely, ensuring only relevant character knowledge is included.
  36.  
  37. This way, we keep the story consistent and detailed without wasting tokens on redundant reminders or outdated information, while also ensuring faster processing, preventing characters from knowing information they shouldn’t, and adapting to the story’s unique needs for efficient and accurate storytelling. Let me know if this is clear before we start!
Tags: grok
Advertisement
Add Comment
Please, Sign In to add comment