Apply to my task
arXiv:2507.21017 ★ 80 Jul 28, 2025

MIRAGE-Bench: the three types of LLM agent hallucinations and how to shut down each one in your prompt

Key result

Finding: an LLM agent doesn't check reality; it generates the most likely continuation. Does the context hint that the previous step succeeded? The model will grab onto that, even if the opposite is written right next to it. MIRAGE-Bench lets you pin down the exact type of failure: the model distorted the instruction, ignored the action history, or invented data about the current situation. Agent hallucinations aren't random noise but three specific breakdowns, and you can close off each one with a separate rule right in the prompt.

MIRAGE-Bench:LLMAgent is Hallucinating and Where to Find Them

Key Aspects of the Research:

The study introduces MIRAGE-Bench, a framework for detecting and classifying hallucinations in LLM agents. The authors identify three main types of errors: actions that contradict (1) the original instruction, (2) the history of previous actions, or (3) the current observations in the environment. Using this taxonomy, they show that even the most advanced models regularly "make up" information or ignore facts sitting right there in the context.

Key Result: Hallucinations are not a random glitch but a systemic problem, often showing up as unjustified optimism: the model assumes its previous actions succeeded, even when the evidence says otherwise.


The Core of the Method, Explained:

Imagine you're giving errands to a robot assistant. The study shows the robot can "daydream" and go wrong in three main ways:

  1. Forgetting or twisting the order (Instruction infidelity): You ask it to "buy apples and nothing else," and it buys apples and oranges because it "figured" the oranges would come in handy too. It filled in your instruction with its own guesswork.

  2. Ignoring what it just did (History infidelity): You say: "Try to open the door. The door is locked." On the next step it acts as if the door is already open: "Now I'll carry the stuff into the room." It ignored the result of its own previous action.

  3. Seeing things that aren't there (Observation infidelity): The robot looks at a table holding only a book and a pen. You ask it to "grab the key from the table," and it tries, "hallucinating" a key instead of saying: "There's no key on the table."

The takeaway for users: To avoid these errors, your prompt should leave as little room for guesswork as possible. When you set up complex, multi-step tasks, always spell out all three components explicitly and clearly: * Goal: What exactly needs to be done and what the constraints are. * History: What has already been done and what came of it (failed attempts matter most). * Current situation: What the model "sees" right now and what it has to base its decision on.

The less ambiguity in these three items, the less room the model has for dangerous hallucinations.


Practical Applicability:

  • Direct applicability: You can use the study's taxonomy as a checklist when debugging prompts that don't work. If the LLM produces something weird, ask: "Where exactly did it break? Did the model distort the instruction, ignore the history, or invent something about the current context?" That pinpoints the weak spot in your prompt so you can reinforce it. For example, you can add an explicit list of previous failed steps to the prompt.

  • Conceptual value: The study delivers a key idea: by default, an LLM doesn't check facts; it generates the most likely continuation. If the context hints at success, the model will grab onto it, even if a refutation sits right next to it. It doesn't "think" critically; it follows the path of least textual resistance. Once you get this, you stop writing prompts as if for a sensible colleague and start writing them for a very capable but naive doer who needs every step and its outcome spelled out.

  • Adaptation potential: You can adapt the methodology by building a forced self-check into your prompts. Ask the model outright to check three points before every action: "1. Does my next action match the original instruction? 2. Does it contradict the results of previous steps? 3. Is it based on real data from the current observation rather than my guesses?" This makes the model imitate the verification process described in the study.


A Practical Example:

Say you're using an LLM to help organize an event.

You are my assistant for organizing an online meetup. Your job is to help me draft and send out the invitations.

**# INSTRUCTION**
Your main goal: write a personalized invitation email for each person on the guest list. Each email must include the guest's name, the meetup title, and a unique join link. Do not send any email without a unique link.

**# HISTORY OF PREVIOUS ACTIONS**
1.  I asked the IT team for 10 unique links for 10 key guests.
2.  IT replied that their system is overloaded and they could generate **only 7 links**. Three guests were left without links.

**# CURRENT OBSERVATION**
Here is the guest list and the links issued:
- Anna: `link123`
- Ben: `link456`
- Chloe: `link789`
- David: `link101`
- Ella: `link112`
- Frank: `link131`
- Grace: `link415`
- Henry: **(no link)**
- Isla: **(no link)**
- Jack: **(no link)**

**# TASK**
Draft emails for every guest on the list.

**# IMPORTANT VERIFICATION RULE**
For each guest, check that a link exists before you write the email. If there is no link, do not invent one and do not reuse someone else's. Instead of an email for that guest, write: "Cannot prepare an email for [Name] because the unique link is missing. Open a ticket with IT."

Why It Works:

This prompt directly counters the three types of hallucinations described in the study:

  1. Protection against instruction infidelity: The INSTRUCTION says plainly: "Do not send any email without a unique link." That's a hard constraint.
  2. Protection against history infidelity: In the HISTORY we explicitly flag the failure: "could generate only 7 links." That stops the model from "assuming" all 10 links were created as requested.
  3. Protection against observation infidelity: The CURRENT OBSERVATION explicitly shows which guests have no link, using the marker (no link). That stops the model from "dreaming up" links for Henry, Isla, and Jack.
  4. Forced verification mechanism: The IMPORTANT VERIFICATION RULE section makes the model follow a safe algorithm, spelling out exactly what to do when data is missing. This is a direct adaptation of the study's findings.

Another Practical Example

Task: analyze customer reviews and put together a report for your manager.

You are a customer experience analyst. Your job is to analyze reviews and prepare a short report.

**# INSTRUCTION**
Goal: Group the reviews by topic (price, delivery, quality) and, for each topic, pull out the main positives and negatives. Only include topics that have at least one review. Do not invent problems or praise that aren't in the text.

**# HISTORY OF PREVIOUS ACTIONS**
- Last week we analyzed the May reviews. The main problem was "slow delivery."
- This time the manager asked us to focus **only on the new June reviews** and not mix them with May's.

**# CURRENT OBSERVATION (June reviews)**
1.  "Great price, but the courier was two hours late."
2.  "Everything's awesome, top-notch quality! Thanks!"
3.  "A bit pricey, sure. But it arrived fast."
4.  "Terrible product quality, it fell apart in my hands."

**# TASK**
Analyze the June reviews provided and write a report by topic.

**# VERIFICATION RULE**
Before drawing any conclusion about a topic (for example, "packaging"), make sure the reviews provided mention that topic at least once. If there are no mentions, leave the topic out of the report. Do not refer to past problems (May) unless they show up in the June reviews.

Why This Example Works: The Mechanism.

This prompt works through tight control over the context, which minimizes the room for hallucinations:

  1. Countering instruction infidelity: The instruction "Only include topics that have at least one review" and the verification rule "If there are no mentions, leave the topic out of the report" forbid the model from "filling in" popular topics that aren't in the data (say, "packaging" or "website issues").
  2. Countering history infidelity: Explicitly noting the May problem ("slow delivery") in the HISTORY, followed immediately by the constraint to "focus only on the new June reviews," keeps the model from carrying the old problem into the new report out of inertia when fresh data doesn't back it up. The model sees that "delivery" comes up, but it can't mistakenly claim it's "the same old problem."
  3. Countering observation infidelity: You provide an exhaustive, numbered list of reviews. This grounds the model, forcing it to work only with this specific text rather than its general knowledge about typical customer complaints.

Usefulness Score: 88

02

Main Evaluation Criteria

  • A. Relevance to prompting techniques: Yes. Rather than specific phrases, the study offers a fundamental taxonomy (classification) of LLM agent errors that directly helps you understand which aspects of a prompt need reinforcing for reliability.
  • B. Better conversational answers: Yes. Understanding the three types of "infidelity" (to instructions, history, observations) lets you phrase requests so as to minimize the risk of hallucinations and illogical actions.
  • C. Direct practical applicability: Yes. Although the study is academic, its findings can be applied immediately as a "mental model" or checklist when writing complex, multi-step prompts. No code or special tools required.
  • D. Conceptual value: Very high. This is the study's main strength for users. It brilliantly explains why LLM agents fail and builds intuition about their "blind spots," such as the tendency to assume the previous step succeeded.
  • E. New useful practice: The work fits neatly into these clusters:
    • #2 (LLM behavioral patterns): Reveals hallucination patterns such as "inventing" interface elements or ignoring failed previous steps.
    • #7 (Reliability and stability): The whole study is about detecting and classifying hallucinations, which is the foundation for more reliable answers.
  • Practicality checklist (+15 points): Yes, the study reveals non-obvious features of LLM behavior and suggests ways to improve answer consistency/accuracy by understanding those features.
03

Numerical Usefulness Score

The study scores high because it gives users a powerful conceptual framework for understanding and preventing one of the most serious LLM flaws: hallucinations in actions. It's not just a "trick" but fundamental knowledge about how models behave.

Arguments for the score: * Fundamental value: The proposed taxonomy (instruction, history, and observation infidelity) is essentially a checklist for any complex prompt. You can test your request: "Did I describe the task clearly enough? Did I account for previous steps? Did I describe the current situation accurately?" * Explaining the "why": The paper explains that LLMs tend toward a "presumption of success": they may act as if their previous command worked, even when the context says otherwise. That's a critical insight for anyone building chains of commands. * Universality: The principles apply to any LLM (GPT, Claude, Gemini, etc.) and to a wide range of tasks that require a sequence of actions.

Counterarguments (why the score could have been lower): * Academic language: The paper is written for researchers, not end users. Terms like "LLM-as-a-Judge," "contextual snapshots," and "agentic environments" may scare off an unprepared reader. * No "ready-made recipes": The study doesn't hand you phrases to paste into a prompt. It asks you to think the findings through and adapt them to your own tasks.

The final score of 88 reflects the balance between enormous conceptual value and the need for users to "translate" academic findings into the language of practical prompting on their own.


Research digest

Key result

Finding: an LLM agent doesn't check reality; it generates the most likely continuation. Does the context hint that the previous step succeeded? The model will grab onto that, even if the opposite is written right next to it. MIRAGE-Bench lets you pin down the exact type of failure: the model distorted the instruction, ignored the action history, or invented data about the current situation. Agent hallucinations aren't random noise but three specific breakdowns, and you can close off each one with a separate rule right in the prompt.

Principle

Three types of failure, three different questions to check. Type 1: Instruction infidelity. The model "filled in" the goal. You asked it to buy apples, and it bought oranges too, "because it decided they were needed." Type 2: History infidelity. The most dangerous one: the agent is sure the previous step worked, even if the log says "error." The door is locked, yet the next action is already "carrying the stuff into the room." Type 3: Observation infidelity. The model sees what isn't there. The table holds only a book and a pen, but the agent "picks up the key," because by the logic of the task a key should be there.

Why it works

The model doesn't think; it predicts the next token. If the text contains a "task → action → success" pattern, the model will fill in "success" automatically, even when the action failed. It's the path of least textual resistance: the model goes where its training statistics lead, not where reality's logic does, like a student confidently answering a question they don't actually know. That's exactly why explicitly recording failures in the history ("IT provided only 7 of 10 links") isn't just useful, it's critical. Without it, the model will "paint in" the success on its own.

When to apply

Multi-step agent tasks: workflow automation, step-by-step data processing, planning with dependent stages, especially where a previous step may have failed. The taxonomy works as a debugging tool: if the agent behaves strangely, check the three points to find where it broke: in the goal, the history, or the data. NOT a technique for improving answers to simple one-shot questions: there's no agent loop there, so these breakdowns don't occur.

Mini recipe

1. State the goal with constraints: not "solve the task" but "do X, never do Y." The sharper the boundary, the less room for guesswork. 2. Explicitly record failures in the history: not just "tried to open the door" but "attempt to open the door: result, locked." The model will account for successes on its own; failures only if you write them down. 3. Ground the current situation: list what's there right now. If there's no key, write "(no key)." Otherwise the model will "find" one. 4. Add a verification rule: ask the model to check before every step: does the action match the instruction, does it contradict past results, is it based on real data rather than an assumption?

Examples

[BAD]: `Go through the inbox and write replies to the emails that haven't been answered` [GOOD]: `# INSTRUCTION Goal: prepare draft replies to unanswered emails. Do not reply to emails older than 30 days; archive them only. # ACTION HISTORY - June 10: attempt to reply to the email from Peterson failed to send, mailbox full. - June 11: emails from Miller and Collins moved to the archive as outdated. # CURRENT SITUATION Active unanswered emails: - Johnson, June 12 (no reply yet) - Peterson, June 10 (send failed) - Nolan, May 8 (older than 30 days) # VERIFICATION RULE Before each reply, check: is the email no older than 30 days? Has a reply not already been sent successfully? If something's off, write the reason instead of a draft.` All three types of breakdown are covered here: an instruction with a hard date limit, a history with an explicit failure note for Peterson, and a current situation with the "(older than 30 days)" marker for Nolan.

In plain words

Hallucinations in LLM agents aren't just "mistakes"; they're a systemic failure in the decision-making chain. When you ask a model not just to write text but to take an action (say, book a hotel or call an API), it turns into an unreliable operator. The problem isn't only that the agent mixes up facts: it invents tools that don't exist, ignores real data from external databases, and loses the plot halfway through the task. The MIRAGE-Bench study proves it: the more complex the chain of actions, the higher the chance the model starts "seeing ghosts" where there are none.

It's like hiring a daydreaming intern who's afraid to admit they don't know something. You ask them to order pizza through an app, and they come back saying: "All done, but there was no app, so I made a deal with a pigeon, he'll deliver it." In LLM land it looks like this: the model sees that the function it needs doesn't exist in the code, but instead of throwing an error it invents a phantom tool and pretends it used it successfully. On paper the report is done; in reality it's a total fail.

To keep this mess from wrecking your project, you have to fight on three fronts: tool hallucinations, knowledge hallucinations, and logic holes. If you ask an agent to organize an event, it may try to call a send_invites() function that never existed in your code. Or, worse, it ignores your guest list and builds its own based on "hallucinated experience." To prevent this, the prompt has to fence the model in hard: "use only the provided list of APIs" and "confirm every step with data from the database."

Even though the study ran on technical benchmarks, the principle applies to any AI assistant. Legal bot, browser autopilot, or spreadsheet analyzer: anywhere the model gets a line to the "outside world," it starts screwing up. MIRAGE-Bench makes it clear that standard text checks won't cut it here. You need to test the execution logic specifically, or your agent becomes a generator of confident nonsense that looks logical right up until you hit "run."

Bottom line: if you're building an agent, forget blind trust in the model's output. The study's main conclusion is that hallucinations are inevitable unless you limit the model's room to maneuver. Either you set hard boundaries and run every little move through external filters, or sooner or later your "smart assistant" will send an important report to a recipient who doesn't exist. Controlling the tools matters more than pretty text, otherwise all your automation turns into a dangerous lottery.

AI lab assistant

Apply this study to your task

Describe what you're working on. AI takes the method and the measured results from this paper and adapts them to your case, or writes a ready prompt built on them.

Based on MIRAGE-Bench: the three types of LLM agent hallucinations and how to shut down each one in your prompt arXiv:2507.21017

Sign in to apply this study New accounts get 50 free credits.

Get the week’s best papers by email

One email on Sundays with the highest-rated new techniques. Unsubscribe with one click.