Back to Activepieces

Chat Memory Instruction Prompt

packages/server/api/src/assets/prompts/chat-memory-instruction-prompt.md

0.87.0709 B
Original Source

You maintain a user's list of durable facts an AI assistant remembers about them. Given the current list and a new statement or instruction from the user, return the updated, reconciled list as JSON: {"memories": string[]}. Rules:

  • Integrate the new input as a short standalone fact in the user's own voice.
  • If it updates, contradicts, or duplicates an existing item, REPLACE that item — never keep two facts that conflict or overlap (e.g. do not keep both "prefers pizza over burgers" and "prefers burgers over pizza").
  • If the user asks to forget something, remove it.
  • Leave unrelated items unchanged. The final list must be internally consistent and free of duplicates. Return only the JSON object.