Agent Memory Errors Handbook: Cases 86–90
This installment is part of the Agent Memory Errors: 100 Cases Handbook series.
Case 86: Memory Consistency & Fact Anchoring Errors — Causal Inference Correlation Confusion
Scenario
The Agent’s memory contains two statistical facts: “In months with high ice cream sales, drowning accidents are also high” and “In months with high ice cream sales, temperatures are also high.” The user asks “Why are there more drowning accidents?” The Agent incorrectly infers “Because eating ice cream causes drowning.”
Error Manifestation
The Agent gives an absurd causal explanation, ignoring the common cause of “high temperature.” The user questions the Agent’s “logical ability.”
Solution
- Distinguish “correlational facts” from “causal facts” when storing memory: correlational facts marked as “association: ice cream sales ∝ drowning accidents”; causal facts require explicit mechanistic explanations
- Implement causal inference validation: apply causal inference frameworks (e.g., Pearl’s causal graphs) to avoid confusing correlation with causation
- Add “possible alternative explanations” to statistical association conclusions: “Ice cream sales and drowning accidents are correlated, possibly influenced by a third factor (temperature)”
Principle
Correlation does not equal causation is the first principle of statistics. Without causal inference ability, Agents make wrong causal explanations based on correlations. This is a common trap for “intelligent” systems.
Case 87: Memory Consistency & Fact Anchoring Errors — Negation Scope Ambiguity
Scenario
The Agent’s memory contains “Not all programmers like coffee.” The user asks “Do programmers like coffee?” The Agent parses it as “Programmers do not like coffee” (expanding the scope of negation from “all” to “like”).
Error Manifestation
The Agent answers “Programmers do not like coffee,” while the original meaning is “Some programmers may not like it.” The user is misled when recommending coffee to programmer friends.
Solution
- Standardize facts when storing: convert “Not all X are Y” to “There exists X that is not Y,” reducing negation scope ambiguity
- Use logical form storage: parse natural language facts into first-order logic expressions
- Avoid simplifying negative statements when answering: “Not all programmers like coffee means some like it and some don’t”
Principle
Negation in natural language has complex scope and focus structures. “Not all programmers like coffee” ≠ “All programmers do not like coffee.” Agents’ parsing must precisely handle negation scope.
Case 88: Memory Consistency & Fact Anchoring Errors — Factual Update Inconsistency Window
Scenario
The Agent is updating memory: changing “Product price is 99 yuan” to “Product price is 129 yuan.” The update operation is two steps: first delete the old fact, then insert the new fact. Between the two steps, the user initiates a query.
Error Manifestation
The first query (after deletion, before insertion) returns “I don’t know the product price”; the second query (after insertion) returns “Product price is 129 yuan.” The user is confused “Why did you say you didn’t know just now, but now say 129?”
Solution
- Use atomic transactions for fact updates: old fact invalidation and new fact activation complete in the same transaction, with intermediate states invisible
- Use multi-version concurrency control (MVCC): queries see the pre-update version, new queries see the new version after update completes
- During updates, return “Information updating, please query later” for affected fact queries
Principle
The transaction isolation principle in databases also applies to Agent memory. Updates lacking isolation cause users to observe impossible states (product price both doesn’t exist and exists).
Case 89: Memory Consistency & Fact Anchoring Errors — Abductive Reasoning False Cause
Scenario
The Agent observes “User did not log in today” and knows from memory “User usually logs in daily.” The Agent performs abductive reasoning: the simplest explanation is “User forgot password.” But actually the user is on a business trip without network.
Error Manifestation
The Agent proactively sends a “password reset” email. The user receives it and feels confused “I didn’t forget my password,” even worrying the account was stolen.
Solution
- Label confidence levels and alternative explanations for abductive reasoning conclusions: “Possible cause A (30% confidence), possible cause B (50% confidence)”
- Avoid taking action based on single observations: collect more evidence before taking action (e.g., “Did the user log in on other devices?”)
- Treat abductive conclusions as “hypotheses” rather than “facts”; they require verification before action
Principle
Abductive reasoning is “inference to the best explanation,” but “best” does not equal “correct.” In action-taking scenarios, proactive behavior based on unverified assumptions may disturb users or cause errors.
Case 90: Memory Consistency & Fact Anchoring Errors — Consensus Fact Divergent Sources
Scenario
The Agent obtains “Company 2024 revenue” from two sources: source A (internal email) says “120 million,” source B (financial report draft) says “150 million.” The Agent stores both in memory without marking the contradiction. When the user asks, the Agent randomly cites one of them.
Error Manifestation
Different users or different times get different answers; the Agent’s credibility is damaged. Internal staff make budgets based on “120 million,” while external investors make valuations based on “150 million,” causing confusion.
Solution
- Establish “fact consistency monitoring”: when multiple values exist for the same entity’s same attribute, flag contradictions and trigger human review
- Store “source-value” pairs for contradictory facts; present when answering “Different sources have different data: A says 120 million, B says 150 million”
- Set “authoritative source priority”: financial report > internal email > informal communication; prioritize high-authority sources
Principle
Real-world information sources often have different expressions for the same fact. Without contradiction detection and source evaluation capabilities, Agents become amplifiers of “information noise.”
Source: Agent Search