Mem0
60/ 100
CScore Breakdown60%
Lost points on 4 checks
- time5/15
- efficiency3/10
- zero errors0/5
- full execution0/35
Eval Score (70% weight)43%
cost$0.01 (<$0.05, excellent)+10
time87s (60s–90s, good)+5
efficiency12 tool calls (≤15, good)+3
found docsTouched docs at docs.mem0.ai: yes (2 matching tool calls)+10
zero errorsTool outputs with errors/tracebacks: 1+0
syntax validCode compiles/parses correctly+5
created filesGenerated files: 1 (need ≥1)+10
full executionMethod: syntax_check, Exit: 0+0
Final Score
A: >=90%B: 75-89%C: 55-74%D: <55%
(43 × 0.7) + (100 × 0.3)= 60%
Replay
Using https://docs.mem0.ai/api-reference, complete the following task: Using the Mem0 Python SDK, build me a long-term memory layer for an AI assistant and prove that, after the user corrects a fact in a later conversation, the assistant answers with the user's CURRENT state: 1. Install the official Mem0 Python SDK (pip install) and initialize the client/memory store for a single user id "[REDACTED:ACCOUNT]". 2. Simulate CONVERSATION 1 by storing these facts for the user: - "My name is Sam and I live in Berlin." - "I am allergic to peanuts." - "I prefer window seats when I fly." 3. Simulate CONVERSATION 2 (a later session for the SAME user): the user says "I moved from Berlin to Amsterdam last month." Record this correction using whatever mechanism Mem0 provides. Any idiomatic Mem0 approach is acceptable — for example automatic reconciliation on add, an explicit update call, deleting/replacing the old fact, editing a memory block, or re-processing the memory graph. Do not force a specific mechanism; use the one Mem0 is designed for. 4. Retrieve the memories relevant to this query: "Where does the user live and is there anything I should know before booking a restaurant for them?" 5. Print the result as JSON with these keys: - "query": the query string - "retrieved_memories": the list of memory strings Mem0 returned for the query - "current_city": the user's current city, as reflected by what Mem0 returned - "dietary_note": any dietary constraint, as reflected by what Mem0 returned The correction must be recorded through Mem0 itself so that Mem0's own retrieval reflects the CURRENT state (Amsterdam, not Berlin) — for example by returning only the current location, or by marking the Berlin fact as outdated/superseded. It is NOT acceptable to store two contradictory facts and then have your own code (or a separate LLM call) pick the newer one; the resolution must come from Mem0. Use Mem0's own memory storage/retrieval primitives for steps 2-4 — do NOT keep the memories only in a local Python list, and do NOT make raw HTTP/REST calls.
mem0_longterm_memory.py
Unlock analytics
See Mem0's score trend, layer rankings, and competitive position.
Run completed Oct 25, 2026, 11:21 PM