Apply to my task
arXiv:2604.02230 ★ 76 Apr 2, 2026

Trace Inversion: Catching Hallucinations by Reconstructing the Question

Key result

The paradox: when an LLM hallucinates, it isn't "unsure." It confidently answers its own question, not yours. You ask one thing, it quietly rephrases it into a "convenient" version and reports back with total confidence. Trace Inversion lets you catch the swap — ask the model to reconstruct, from its own reasoning, what it actually answered, and compare that to the original. The trick: reasoning is a trace of interpretation. A swapped question leaves a fingerprint in the reasoning — and that's exactly where you catch it.

01

TL;DR

Trace Inversion is a way to check whether the model just made something up. The idea: ask the model to work backward from its own reasoning and reconstruct which question it actually answered — then compare that to the question you asked.

Models don't hallucinate because they're "unsure" — they hallucinate because they quietly swap the question. You ask "Who didn't know how to use a phone?" — and somewhere in its reasoning the model rephrases it to "Who most likely didn't know how?" and confidently answers a different question. Classic verification methods look at answer confidence — but a model can be supremely confident while answering the wrong question.

The method catches the swap in three steps: the model answers with reasoning → the "question the model heard" is reconstructed from that reasoning → the two questions are compared. If they diverge, the answer is unreliable.

Want this for your own case? Apply this study to your task: AI adapts its method to what you are working on and writes the prompt.

02

Method Blueprint

(3 consecutive messages in the same chat)

STEP 1: Ask your question + "think step by step"
        → get an answer + reasoning

STEP 2: Using only the reasoning → ask the model to reconstruct 
        the question it actually answered
        → get the reconstructed question

STEP 3: Compare the original question with the reconstructed one
        → a big gap = the answer is unreliable, 
          double-check it
03

Example

Task: A startup founder is prepping for an investor meeting. Before pitching a fund that invests through convertible notes, she asks ChatGPT about the legal requirements for a convertible note agreement under New York law.

Prompt — Step 1:

What mandatory terms must a convertible note agreement 
between a startup and a venture fund include 
under New York law? Think step by step and show every step.

Prompt — Step 2:

Look only at your reasoning above — not at the question 
I asked. Based solely on the course of your 
reasoning, state: what question were you actually 
answering? Write it down precisely.

Prompt — Step 3:

Compare two questions:

MY QUESTION: "What mandatory terms must a convertible note 
agreement between a startup and a venture fund 
include under New York law?"

THE QUESTION YOU ANSWERED: [paste from step 2]

Do they match in meaning, intent and context? 
If there are discrepancies, name them specifically 
and explain how much they affect the reliability of the answer.

Result: At step 3 the model will either say "the questions match, the answer is reliable" — or describe the swap in concrete terms. For example: "I was answering about generic loan requirements, not the specifics of note conversion under New York law" — and it will point out exactly where the answer is shaky. Without this check, a swap like that goes unnoticed.

04

Why It Works

The model isn't "lying" — it's filling in the gaps. When a question contains ambiguity, unknown facts or a false premise, the model quietly patches the gap and answers a slightly different, "fixed" question. The answer sounds confident — because the model really did answer its own question correctly.

The reasoning (Chain-of-Thought, the step-by-step chain) is a trace of how the model interpreted the request. From that trace you can reconstruct what the model "heard". A swapped question leaves a fingerprint in the reasoning — and that's exactly where you catch it.

The method leans on something models are good at: paraphrasing and comparing meanings. "Do these two questions mean the same thing?" is squarely in an LLM's comfort zone. The weakness (an invisible swap) gets bypassed through a strength (analyzing differences in meaning).

Control knobs: - Step 3 detail — add "rate the divergence on a 1-10 scale" to get a numeric signal - Comparison focus — name specific axes: "compare by intent / facts / context" for sharper diagnostics - Shortcut — no time for 3 steps? Merge steps 2-3 into one message (a minor loss of accuracy)

05

Prompt Template

Step 1 — Answer with reasoning:

{question}

Think step by step. Show every step of your reasoning.

Step 2 — Reconstruct the question:

Look only at your reasoning above — not at the question 
I asked. Based solely on the course of your 
reasoning, state: exactly which question were you 
actually answering? Write it down precisely, in one sentence.

Step 3 — Compare:

Compare two questions:

MY QUESTION: {paste the original question}

THE QUESTION YOU ANSWERED: {paste from step 2}

Do they match in intent, factual content 
and context? If there are discrepancies, name them specifically.
Verdict: how much can the first answer be trusted?

Placeholders: - {question} — any question where accuracy matters (legal, medical, financial, historical) - Steps 2 and 3 are universal and stay as is


🚀 Quick start — paste into the chat:

Here is a three-step hallucination check called Trace Inversion. 
Adapt it to my task: {your task}. 
Ask me questions so you can fill in the steps correctly.

[paste the template above]

The LLM will ask about your specific question and context — because step 3 needs the original question restated exactly for the comparison. It will take the structure from the template and tailor it to your request.

06

Limitations

⚠️ Overhead: Three messages instead of one — this is for situations where a mistake is expensive. Overkill for checking a dinner recipe.

⚠️ Subtle gaps: If the swap is tiny ("who didn't know" vs "who most likely didn't know"), a language-level comparison may miss it. A numeric similarity score helps but guarantees nothing.

⚠️ Models without detailed reasoning: The method only works if the model produces extended reasoning. With short, "no explanation" answers the trace is too thin to reconstruct anything.

⚠️ Strong tasks, strong results: Works best on questions with clear-cut facts (legal, math, historical). Weaker on subjective, judgment-based questions where a "swap" is harder to pin down.

07

Resources

Answering the Wrong Question: Reasoning Trace Inversion for Abstention in LLMs Abinitha Gourabathina (MIT), Inkit Padhi (IBM Research), Manish Nagireddy (MIT-IBM Watson AI Lab), Subhajit Chaudhury (IBM Research), Prasanna Sattigeri (MIT-IBM Watson AI Lab) github.com/abinithago/trace-inversion

Research digest

Key result

The paradox: when an LLM hallucinates, it isn't "unsure." It confidently answers its own question, not yours. You ask one thing, it quietly rephrases it into a "convenient" version and reports back with total confidence. Trace Inversion lets you catch the swap — ask the model to reconstruct, from its own reasoning, what it actually answered, and compare that to the original. The trick: reasoning is a trace of interpretation. A swapped question leaves a fingerprint in the reasoning — and that's exactly where you catch it.

Principle

Three messages in a row in the same chat. First: ask your question with step-by-step reasoning — get an answer and the chain of steps. Second: ask the model to look only at its reasoning and state which question it was really answering. Third: compare both questions — the original and the reconstructed one. A big gap = the answer is unreliable; fix the question or double-check the facts. Models are good at comparing meanings — and that same strength exposes them.

Why it works

An LLM hits ambiguity in a question — and fills it in. It quietly "patches" the request to fit what it knows and confidently answers the patched version. Standard checks look at answer confidence. But confidence is maxed out — the model did answer correctly, just not your question. The swap leaves a trace in the step-by-step reasoning — from it you can reconstruct what the model "heard". "Compare two questions by meaning" is an LLM's strong suit. The weakness gets caught by its own strength.

When to apply

Legal, medical, financial and historical questions — wherever a mistake is costly. Especially useful when the question contains ambiguity, jurisdiction-specific details or a hidden premise the model might quietly replace. Not for routine tasks — three messages instead of one is too expensive when the stakes are low.

Mini recipe

1. Answer with reasoning: ask your question and add "think step by step, show every step" — get the answer plus the reasoning chain. 2. Reconstruction: ask the model to look only at its reasoning — not your question — and write, in one sentence, which question it was really answering. 3. Comparison: put both questions side by side — the original and the reconstructed one. Ask it to find gaps in intent and content and give a verdict: how far can the first answer be trusted? 4. Optional — numeric signal: add "rate the divergence on a 1–10 scale" to step 3 — you get a concrete number instead of a vague "slightly different."

Examples

[BAD]: `What terms are mandatory in a convertible note agreement under New York law?` — you get a confident answer but have no idea whether it answers your question. [GOOD]: Step 1: `What terms are mandatory in a convertible note agreement under New York law? Think step by step and show every step of your reasoning.` Step 2: `Look only at your reasoning above. Not at the question I asked. Which question were you actually answering? Write it down precisely, in one sentence.` Step 3: `Compare two questions. MY QUESTION: "What terms are mandatory in a convertible note agreement under New York law?" THE QUESTION YOU ANSWERED: [paste from step 2]. Are there gaps in intent or content? How far can the first answer be trusted?` If the model answered about "generic loans" rather than the specifics of conversion, it will tell you so itself. Without this check, the swap goes unnoticed.

In plain words

Here's the problem: AI models almost never say "I don't know." When you ask a tricky or badly worded question, the model doesn't admit the gap in its knowledge — it quietly "fixes" your request in its head, swapping it for one it does have an answer to. This is a fundamental design bug: LLMs are trained to keep the text going at any cost. So you get a confident, logical and completely useless answer, because the model didn't answer you — it answered some imaginary user with a different question.

It's like asking a stranger for directions to the library, and instead of admitting he has no idea, he enthusiastically walks you through how to get to the nearest bar. He's so sure of himself that you believe him, go there, and only on arrival realize you've been totally played. It's not that he's mean — his brain just auto-completed the route to the nearest place it knew, ignoring where you actually wanted to go.

To catch the model in the act, researchers came up with Trace Inversion. It takes three moves. First you ask your question and get an answer with reasoning. Then you paste that reasoning into a new chat and ask: "Hey, what question is all this an answer to?" If the model reconstructs your original question, you're good — you can trust it. But if it comes up with something else, then somewhere in its reasoning it took a wrong turn and started hallucinating.

Picture a startup founder asking ChatGPT about the fine print of convertible notes under German law. The model spits out a wall of text that sounds authoritative. But run that text through Trace Inversion and you may find out the model actually described Delaware law and just "forgot" to mention it. The principle is universal: you can check medical advice, legal summaries or complex code the same way. If the reconstructed question doesn't match the original, you're looking at garbage.

Bottom line: stop taking AI answers on faith, especially when the stakes are high. Use a reverse check through the reasoning to see whether the model swapped the context behind your back. It's the easiest way to make an AI admit it's out of its depth. Either the question and the answer line up, or you're just wasting time reading confident nonsense.

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 Trace Inversion: Catching Hallucinations by Reconstructing the Question arXiv:2604.02230

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