{
 "schema_version": 1,
 "generated": "2026-10-26",
 "id": "sodamem-sodamem--memory-that-updates-when-facts-change",
 "repo": "SodaMem/SodaMem",
 "repo_url": "https://github.com/SodaMem/SodaMem",
 "repo_slug": "sodamem-sodamem",
 "title": "Build a chatbot that updates facts when users change them",
 "page_title": "How to build a chatbot that updates facts when users change them with Soda Mem",
 "summary": "Ingest a user message and recall the latest version of a fact, with the older version kept readable.",
 "who": "A Python developer building a personal assistant whose users change jobs, homes or preferences over time.",
 "problem": "Most memory stores overwrite old values, so the assistant gives outdated answers after a user changes their mind.",
 "outcome": "The assistant returns a prompt-ready memory block showing the current fact, with citations to the turn it came from.",
 "steps": [
  "Run `pip install \"sodamem[chroma,llm]\"` to install Soda Mem.",
  "Set SODAMEM_LLM_API_KEY in your environment for the extractor.",
  "Create a script that calls Soda Mem.open(\"./data\", extractor=FactEventExtractorV2(create_provider_from_env())) and calls mem.ingest with a message that changes a fact.",
  "Call mem.build_context with a question about that fact and print block.text and block.citations."
 ],
 "agent_prompt": "In the SodaMem repo at <repo path>, write a Python script that ingests a message for user u1 saying the user moved to a new city, then calls build_context for where the user lives. Expected output: the new city in block.text with citations. Verify that the old city does not appear as the current answer.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "30 minutes",
 "basis": "readme",
 "caveat": "Ingest needs an LLM provider through the extractor, so the first run depends on a valid API key, while the recall step makes zero LLM calls.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "python",
 "requirements": [
  "Python environment with pip available",
  "An LLM provider API key set as SODAMEM_LLM_API_KEY, needed only for ingest",
  "Docker or a running daemon is not required for the Python path, but coding tools need `sodamem daemon ensure` first"
 ],
 "risk": "sensitive",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.9,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/sodamem-sodamem/memory-that-updates-when-facts-change/",
 "md": "https://dedupedai.com/use-cases/sodamem-sodamem/memory-that-updates-when-facts-change/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/sodamem-sodamem--memory-that-updates-when-facts-change.json",
 "api_version": "v1"
}
