Published on 2026-11-03 by Aakarsh Gupta and Badal Sah
Your AI Agent Remembers Everything. So Why Does It Still Make Wrong Decisions?
Retrieving relevant information is not the same as establishing whether that information is valid for the decision at hand. Why memory recall is not enough when agents take real actions.
Your AI Agent Remembers Everything. So Why Does It Still Make Wrong Decisions?
Retrieving relevant information is not the same as establishing whether that information is valid for the decision at hand.
Aakarsh Gupta and Badal Sah
Co-founders, MemVyasa
A correct citation can support the wrong answer
An AI agent can retrieve an authentic document, quote it accurately, and still give a customer the wrong answer.
One difficult failure mode in multi-brand systems is cross-brand context confusion: information belonging to one business appears in the context of a request about another. This can happen even when the retrieved text is highly relevant and the underlying document is genuine.
Consider a fictional car-rental group, Cedarline Mobility, with two brands: Cedarline Drive, for everyday rentals, and Cedarline Reserve, for luxury vehicles. Both publish cancellation policies. Their documents share terms such as booking, pickup, cancellation, fee, and refund.
A customer asks a support agent:
What cancellation fee applies to a $1,200 Cedarline Reserve booking cancelled on September 15, 2026, less than 48 hours before pickup?
Imagine that the agent retrieves a policy stating a 10% fee. It cites the document and calculates $120. The arithmetic is sound. The citation is real within the fictional system. Yet the answer may still be wrong: the document could have expired or applied to a different brand.
This is not necessarily a failure of language generation. It is a failure to establish which evidence is applicable before using it.
All companies, policies, dates, and amounts in the Cedarline example are synthetic. The scenario is not a description of any organization's internal incident or a measured MemVyasa result.
Memory helps with recall. Decisions require applicability.
Retrieval-augmented generation (RAG) made it practical to ground model responses in external material rather than model parameters alone [1]. Agent systems now use lexical and vector retrieval, persistent conversation memory, structured databases, knowledge graphs, and long-context models to make information available when needed.
These are important capabilities. Modern retrieval systems can already filter by metadata, search temporal records, and preserve source attribution. Some memory tools also maintain evolving facts and historical relationships. Graphiti, for example, documents time-aware graph retrieval, while Hindsight documents temporal retrieval as part of a broader search pipeline [4, 5]. The issue is not that existing systems know nothing about time.
The issue is that different questions are often collapsed into a single relevance score:
- Relevance: Does the evidence discuss the requested subject?
- Applicability: Does it govern this brand, action, and effective date?
- Authority: Is it a source the application recognizes as governing this decision?
- Access: Is the caller permitted to access the underlying information?
- Sufficiency: Have the facts required by the decision actually been established?
A document can be highly relevant while failing one or more of the other conditions. For an assistant answering general questions, an imperfect response might be repaired in conversation. For an agent that modifies bookings, processes refunds, or changes account state, the same mistake can affect a real transaction.
Three failure modes hidden inside "good retrieval"
Scope confusion. Documents for two brands or products may use nearly identical language. An agent asked about Cedarline Reserve might retrieve a Cedarline Drive policy because both discuss cancellation fees. The problem is business applicability, not necessarily unauthorized access.
Temporal staleness. A document may once have been valid but no longer govern the transaction. Its ingestion or modification timestamp does not necessarily tell us when its rules took effect. Selecting the most recently written document does not answer historical questions either.
Missing or conflicting evidence. A required policy may fall outside a retriever's final top five. A summary may omit an exception. A support article and an approved policy registry may disagree. When the agent receives only part of that evidence, it may produce a fluent response without knowing the decision's prerequisites are unresolved.
There is also an important security distinction. Brand applicability is not tenant authorization. A policy can belong to the wrong brand while still being publicly readable. Conversely, a record can be relevant to the correct brand but inaccessible to the caller. Authorization must be grounded in trusted identity and enforced by the application and its underlying data systems; semantic matching is not a substitute.
The Cedarline example: one request, three plausible documents
To make the correct answer unambiguous, we need to specify the business rule before evaluating any retrieval result.
For this illustration, assume Cedarline's governing contract states that cancellation fees are determined by the policy effective when the cancellation is submitted, regardless of the booking's creation date. An approved central policy registry is authoritative, and there are no grandfathering clauses, promotional exceptions, negotiated terms, or customer-specific overrides. All the policies below apply to cancellations made less than 48 hours before pickup, with the fee calculated as a percentage of booking value.
| Document | Brand | Effective period | Fee |
|---|---|---|---|
reserve-policy-v1 |
Cedarline Reserve | Jan 1–Jul 31, 2026 | 10% |
reserve-policy-v2 |
Cedarline Reserve | Aug 1, 2026 onward | 25% |
drive-policy-v1 |
Cedarline Drive | Jan 1, 2026 onward | 5% |
For a Cedarline Reserve cancellation submitted on September 15, 2026, the applicable record is reserve-policy-v2. Under these fictional rules, a $1,200 booking incurs a $300 cancellation fee.
But two other documents could produce plausible-looking answers:
reserve-policy-v1produces $120. It refers to the correct brand but was no longer effective on the cancellation date.drive-policy-v1produces $60. It is effective on that date but applies to the wrong brand.
Neither problem is corrected merely by attaching a citation. A citation shows where an answer came from, not necessarily why that source was eligible to govern the decision.
Now change one input: suppose the same kind of Reserve cancellation was submitted on July 15, 2026. In that case, reserve-policy-v1 is applicable, and the fee is $120. Always choosing the latest policy would fail this historical query.
The fee calculation itself needs no language model: once an applicable percentage is established, ordinary deterministic code can multiply it by the booking amount. The harder context question is which percentage the application is justified in using.
Two timelines, not just one
The July and September examples illustrate valid time: when a policy was effective. A second timeline becomes important when an update is recorded later than its effective date.
Suppose, in an additional hypothetical scenario, an approved policy change took effect on August 1 but entered the authoritative registry on August 10. Two questions would then differ:
- What does the registry now indicate was effective on August 5? This asks about the policy's valid time using present knowledge.
- What did the registry have on record as of August 5? This asks what the system knew at that earlier record time.
A historical answer may need both dimensions. This is the idea behind bitemporal history, which distinguishes when something was valid from when it was recorded or known [2]. It does not imply that a late-recorded policy can automatically be imposed retroactively on a customer. Contractual and legal rules still determine that.
Not every agent needs a bitemporal store. The point is to identify the time semantics the decision requires instead of treating all timestamps as interchangeable.
Why bigger context windows, more retrieval, and compression are not enough
A reasonable response is to retrieve more documents, increase top_k, or supply the full policy corpus to a long-context model. These can improve coverage. Hybrid search, temporal indexes, metadata filters, and graph traversal can also recover facts missed by one retrieval strategy.
But candidate discovery and evidence admission are different operations.
If an authoritative policy never enters the candidate set, the model cannot reason over information it has not seen. If the policy is available but the application has not specified which source governs the decision, sending more text may give the model more conflicting answers rather than resolving the conflict.
Long-context capacity is useful, but capacity alone does not guarantee consistent use of every relevant passage. The 2024 Lost in the Middle study found position-sensitive performance on the specific long-context tasks and models it evaluated [3]. That is a reason to test context assembly carefully, not a claim that every modern model behaves identically.
Compression adds a similar trade-off. Removing repeated logs is often harmless; removing a policy's effective-date condition may change the outcome. A context system should distinguish optional supporting material from decision-critical evidence that must remain available or be recoverable.
A well-engineered RAG application can already address many of these problems through strict metadata filtering and direct source-of-truth queries. That is often the right solution. The harder engineering problem appears when multiple agents, memory systems, tool outputs, and business data sources must apply compatible evidence rules consistently, and teams need to understand why a decision was allowed or withheld.
From retrieving evidence to checking whether it can be used
For the Cedarline workflow, source authority should not be inferred from recency, embedding similarity, or an LLM's confidence. The application must define its governing source and business rules. A policy registry may outrank a support article; a conversation proposing a policy change is not equivalent to an approved policy version.
A context-verification layer can then evaluate the evidence against those requirements. In simplified form, a policy contract might look like this:
# Illustrative design, not a released MemVyasa API
contract: cancellation-fee-v1
required_evidence:
source: approved_policy_registry
attribute: cancellation_fee
scope:
brand: cedarline_reserve
temporal:
effective_at: cancellation_submitted_at
on_missing_evidence: insufficient
on_unresolved_conflict: hold
The contract does not magically make the registry correct. It makes the application's criteria explicit. The implementation must still retrieve the relevant record, validate source identity and version, check the policy's effective interval, enforce the caller's actual access rights, and account for any configured exceptions.
For required facts, verification cannot rely exclusively on whatever happens to be inside semantic search's top five. Where possible, it should query the authoritative source by exact entity, attribute, and time constraints—or a versioned projection with a defensible freshness guarantee. If that evidence is unavailable, the appropriate result may be insufficient, not an apparently confident answer.
flowchart TB
Q["Agent request and business context"]
subgraph BASIC["Illustrative retrieval-only path"]
direction TB
B1["Retrieve semantically relevant documents"]
B2["Select top-ranked passages"]
B3["Generate an answer"]
B1 --> B2 --> B3
end
subgraph VERIFIED["Proposed task-aware verification path"]
direction TB
V1["Retrieve candidates and query required sources"]
V2["Check configured authority, time, scope and access"]
V3{"Required evidence established?"}
V4["Assemble context and record evidence decision"]
V5["Refresh evidence, hold or report insufficiency"]
V6["Proceed with admitted evidence"]
V1 --> V2 --> V3
V3 -->|Yes| V4 --> V6
V3 -->|No| V5
end
Q --> B1
Q --> V1
Conceptual comparison, not an experimental result. The left path deliberately illustrates a retrieval-only configuration; production RAG systems can and often do incorporate filtering, policy checks, and authoritative lookups.
The evidence decision should be inspectable. Useful fields include the policy version and source ID, effective time, admitted and excluded candidates, relevant authority rule, and the reason for a hold or insufficiency result. This record can later support debugging and regression tests.
What would a successful check actually mean? Only that the available evidence satisfies the configured conditions, within the limits of the sources and verification mechanism. It would not prove that no relevant information exists elsewhere, that the upstream database is objectively correct, or that the language model's eventual answer will be correct.
Nor would verification before inference replace an authorization or state check immediately before executing a consequential action. The underlying record can change between the two steps.
Why we're building MemVyasa
These distinctions led us to MemVyasa.
Our working thesis is that teams building production agents will need a reusable way to declare what evidence a task requires, establish whether that evidence is admissible, and record why it was included or rejected. We are starting with context verification: time-aware applicability, application-defined source authority, and inspectable evidence decisions.
This is not an assertion that temporal retrieval or policy validation is new. Existing systems already address meaningful parts of the problem, and an agent connected to one trusted database may need nothing more than a carefully written query and deterministic business logic.
The opportunity we want to test is narrower and more demanding: can these checks become consistent, low-friction infrastructure across heterogeneous agent architectures, without forcing teams to replace their memory or retrieval stack? That requires evidence from real integrations, fair comparisons, and measurements of false decisions, false blocks, latency, and developer effort. We do not yet treat that hypothesis as proven.
We approach the question from complementary backgrounds in distributed systems and production machine learning. One perspective asks how state, source identity, and policy should be enforced. The other asks what retrieval and model context actually preserve—and what they fail to establish. Both matter when agents begin taking actions rather than only producing text.
The question worth asking before an agent acts
A useful question for many AI applications has been: Can the model retrieve the information it needs?
For agents acting on changing business state, we should add another: Does the evidence satisfy the requirements for this decision, for this entity, at this time?
Memory helps an agent recall. Context verification asks whether recall is enough.
If you're building agents across evolving policies, business systems, or customer records, we're interested in the failure cases that have been hardest to reproduce—and in the simplest engineering controls that actually prevent them.
About the authors
Aakarsh Gupta is a co-founder of MemVyasa, with a background in distributed systems and production software infrastructure. Badal Sah is a co-founder of MemVyasa, with a background in production machine learning and AI-agent systems. Together, they are exploring reliable context infrastructure for AI agents.
References and further reading
- Patrick Lewis et al. Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks. NeurIPS, 2020.
- Martin Fowler. Bitemporal History. 2021.
- Nelson F. Liu et al. Lost in the Middle: How Language Models Use Long Contexts. Transactions of the Association for Computational Linguistics, 2024.
- Zep. Graphiti: Overview. Documentation of an open-source temporal knowledge graph framework.
- Hindsight. Recall Memories. Documentation of temporal retrieval controls, including the distinction between ranking and hard filtering.
- PostgreSQL. Range Types. Documentation of date/time-range representation, indexing, and constraints.
Disclosure: Cedarline Mobility and its brands, policies, dates, fees, and transactions are entirely synthetic. The examples are illustrative, not customer incidents, experimental benchmarks, or claims about capabilities already shipped in MemVyasa.