Grafy News
Try Grafy free

Researchers Identify Use-Time Memory Hallucinations in AI Agents

Researchers have uncovered a phenomenon where AI agents ignore or misapply retrieved information, causing errors despite having access to correct data.

Illustration for the news story: Researchers Identify Use-Time Memory Hallucinations in AI AgentsSource: Grafy Research Lab

Large language model (LLM) agents are increasingly dependent on external memory to perform complex tasks, yet they frequently fail to use the information they retrieve correctly. This discrepancy leads to "use-time memory hallucinations," where an agent possesses the right data but produces an incorrect or contradictory response.

What are use-time memory hallucinations?

According to research by Jinkun Zhao and Wenjun Wu, use-time memory hallucinations occur when an AI agent successfully retrieves relevant information from an external source and places it into its prompt, but subsequently fails to incorporate that information into its final answer. Unlike standard hallucinations where a model might invent facts from thin air, these errors are characterized by a conflict between the information provided in the context and the model's own internal logic or training.

This phenomenon is distinct because the "knowledge" is present in the agent's immediate workspace, yet the agent's output contradicts the very evidence it is looking at. This suggests that simply providing better context or more data is not a complete solution for improving agent reliability.

How do these memory errors manifest?

In their study of five open-weight models, the researchers identified several specific ways these hallucinations occur. The most prominent issue is "memory-ignoring," where the model reverts to a stale or outdated fact stored within its own parametric weights instead of using the updated information provided in the external memory. The study found that this occurs in up to 46% of queries.

Another significant error type is "memory-misapplying." In these instances, the model retrieves the correct information but attributes it to the wrong entity or applies it to an unrelated part of the query. This creates a scenario where the agent appears to be working with the correct dataset but draws incorrect conclusions about the relationships between the data points.

Why does this conflict happen?

The root cause of these errors appears to be a fundamental tension between parametric knowledge and external memory. Parametric knowledge refers to the information a model learned during its initial training phase and stored in its weights. External memory refers to the real-time data injected into a prompt via retrieval-augmented generation (RAG) or other memory tools.

When the external memory provides information that contradicts the model's pre-trained weights, the model faces a conflict. The researchers suggest that the model's internal training can be so dominant that it overrides the fresh, correct data provided in the prompt. This makes it difficult for agents to stay grounded in the specific documents or databases they are meant to be analyzing.

Can these hallucinations be prevented?

The research explores the potential for "activation steering" and "knowledge editing" as methods to mitigate these issues. Activation steering involves adjusting the model's internal states during inference to prioritize external context over parametric weights. Knowledge editing aims to more directly address the underlying conflict by modifying how the model treats specific facts.

Addressing these errors is critical for the development of autonomous agents. As agents move from simple chat interfaces to complex workflows—such as browsing the web, managing files, or conducting scientific research—the ability to accurately respect retrieved memory becomes a prerequisite for trust and utility.

How to explore memory and research with Grafy

While the research focuses on the underlying mechanics of model failures, users can observe how different models handle complex information by using Grafy Chat to compare outputs side by side. For those working with dense technical documents or long-form papers, Grafy Reader provides a way to interact directly with PDFs, allowing you to verify if a model is accurately interpreting the text or if it is falling into the traps of memory-ignoring or misapplying information discussed in this research.

Frequently asked questions

What is the difference between parametric knowledge and external memory?

Parametric knowledge is the information a model has internalized during its training process and stores within its neural weights. External memory is information retrieved from outside the model, such as a PDF or a database, and is provided to the model as part of the current conversation context to ensure it has access to up-to-date or specific data.

Why do models ignore retrieved information?

Models often ignore retrieved information because of a conflict with their pre-existing parametric knowledge. If the information in the external memory contradicts what the model learned during training, the model may default to its internal weights, leading to a "memory-ignoring" hallucination where it returns a stale or incorrect fact despite having the correct data in its prompt.

Does retrieving more data solve memory hallucinations?

Simply retrieving more data does not necessarily solve the problem. Because use-time memory hallucinations are caused by the model's inability to correctly apply or prioritize the provided context over its internal weights, providing more information can sometimes lead to "memory-misapplying," where the model attributes the correct data to the wrong entities or context.


Source: Grafy Research Lab — TASK Memory: Beyond Text-Only Memory with Activation Steering and Knowledge Editing against Memory Hallucination