Cross-Industry & Business Teams

Why Do LLMs Misquote? Stop Letting Them Type the Quote

Why do LLMs misquote sources even with web search? I replayed a code-only quote checker on 96 answers. See what it caught, what it missed and the fix.

November 28, 20268 min read
Hand-drawn stamp copying lines from a source page onto a card, illustrating code inserting exact quotes instead of a model typing them

What matters most

  • Search gives a language model better evidence, but the model still generates quoted words instead of copying them.
  • In a replay on 96 answers, an exact-paragraph code check caught all 6 wrong quotes; a whole-document check caught 5.
  • The strict check also flagged 20 of 62 correct answers, so checking free text afterwards is noisy.
  • Reliable citation systems have the model return passage IDs and let code insert the stored text.
  • Exact wording is only part of accuracy; the right paragraph, the right version and real support still need checking.

Most advice on making an LLM cite correctly is some version of "give it search and tell it to quote exactly." We did both. In our test of four AI tools on 24 regulatory paragraphs, every tool had live web search and every prompt asked for the exact text word for word. One of them still put wrong wording inside quote marks 6 times, each time with a link to an official government site.

My position is simple. If your product needs exact quotes, the model should never type them. Let it choose which passage matters. Let ordinary code copy the words. Everything else in this article is why, with numbers from replaying a quote checker with no AI in it on all 96 answers from that test.

Here is what matters most:

  • A language model writes a quote the same way it writes any other sentence, one predicted word at a time. Quote marks do not switch it into copy mode.
  • A code-only check against the exact paragraph asked for caught all 6 wrong answers in our replay.
  • The same check against the whole document caught only 5 of 6, because one "wrong" quote was real text from a neighbouring paragraph.
  • Checking free text after the fact is noisy: the strict check also flagged 20 of 62 correct answers, mostly over formatting and stitched passages.
  • The design that removes the problem is to have the model return a passage ID and let code insert the text.

Why a model with search still misquotes

Search changes what the model reads. It does not change how the model writes. After retrieval, the model holds some text in its context and then generates an answer token by token. When it types a quote, it is predicting what comes next, with the retrieved text as strong evidence. Strong evidence is not a copy operation.

Three things in our audit made that gap visible.

The paragraph was never retrieved. Search tools return fragments: a snippet, a scrambled PDF column, a third-party copy. Claude said so repeatedly and refused. ChatGPT, on the SEC Marketing Rule, wrote that it couldn't open the rule page and then produced a one-line quote that is not in the current rule. The link next to it pointed to a real SEC page.

The right section was retrieved, the wrong paragraph was quoted. Asked for paragraph (a)(3)(i)(E) of the IRS section 7216 consent regulation, which says a consent must be signed and dated by the taxpayer, ChatGPT returned a real sentence about naming the recipient of the information. Those words exist in the regulation. They are not paragraph (E).

Near-memory filled the edges. On India's RBI customer-identification rules, one answer dropped two small words from an otherwise correct sentence. On the SEC code of ethics rule, another rephrased the reporting line into tidier English. These are the dangerous ones, because they read better than the original.

Research points the same way. A 2026 study of LLMs checking legal citations found models flagged 93% to 100% of citations where the case itself had been swapped, but only 37% to 61% where just the page number was wrong in court opinions. The model sees that the topic matches and calls it supported. So asking a second model to check the first one is weakest exactly where a legal reader is strictest.

What happened when code did the checking

I wrote a checker with no model in it. It takes every quoted passage of 12 words or more in an answer, normalises punctuation, case and formatting, and asks whether those words appear, in order and unbroken, in the official text. I ran it two ways on the 96 saved answers: against the whole regulation or document, and against only the paragraph the question asked for.

On the 6 answers we had reviewed by hand as wrong:

  • Whole-document check: caught 5. It passed the 7216 answer, because the sentence really is in the regulation.
  • Exact-paragraph check: caught all 6.

On the 62 correct answers that contained a quote:

  • Whole-document check: wrongly flagged 12.
  • Exact-paragraph check: wrongly flagged 20.

The false alarms came from ordinary things. Answers glued a section heading onto the first sentence. They used "..." to join an opening line to the paragraph under it. They included surrounding text inside one quote block. A person would accept each of these. A strict matcher shouldn't, or it stops being strict.

So after-the-fact checking works as an alarm. It does not work as a finished product. If one in three good answers gets flagged, reviewers learn to click through the warning, and then the warning protects nothing.

This is a small test. Six wrong answers, all from one model, on 24 paragraphs of mostly US federal rules. Treat the exact ratios as a picture of the failure, not as a benchmark.

The design that removes the problem

Reverse the job. Don't ask the model to write the quote and then check it. Give the model passages that each carry an ID, ask it to answer with IDs, and have code place the stored text in the output.

1. Build a source store you control. Each document is saved in the version you retrieved, with its source link, date and a fingerprint of the file. Then it is split along its own structure: section, paragraph, sub-paragraph, page. A paragraph ID like "26 CFR 301.7216-3, (a)(3)(i)(E), version of 20 November 2026" is the unit. Splitting by fixed character count destroys this, and it is the most common mistake in retrieval systems. If you're weighing this against training a model on your documents, read fine-tuning vs retrieval first.

2. Retrieve passages, then let the model choose. The model sees candidate passages with their IDs and returns its answer as claims, each tied to one or more IDs. It can explain in its own words. It cannot supply quoted words.

3. Let code write every quote. The application looks up each ID and inserts the stored text, with the version and page. A misquote now requires a bug in your copy step, which you can test like any other code. An ID that doesn't exist is rejected outright.

4. Check the one thing the model still decides. The model can still pick the wrong paragraph, or claim a paragraph says something it doesn't. That is the hard part, and the citation study above shows why a second model alone is a weak judge of it. Show the reviewer the claim beside the full passage, and make approval a human step for anything that leaves the firm.

5. Version everything. The right words from last year's version are a wrong quote. Store superseded versions with the dates they applied, and require every query to say which date it is asking about. We cover how to keep that history in how to prove a regulator archive is missing nothing.

How to test your own system

Don't trust a citation feature you haven't attacked. Build a set of known failures and run it on every change:

  • Change one word in a real quote to a near synonym.
  • Attach a real quote to the neighbouring paragraph's ID.
  • Use wording from a superseded version.
  • Ask for a paragraph that is not in your store, and confirm the system says so instead of answering.
  • Ask for a sentence split across two pages or two columns.

Record two numbers every time: how many planted errors got through, and how many good answers were blocked. A system that reports only the first can score perfectly by blocking everything.

What this changes for a firm

The cost of a misquote in litigation or compliance is not the seconds it takes to fix. It is a partner finding out that the checking they assumed happened did not. With code-inserted quotes, review time moves from "are these the right words?" to "is this the right passage for the point?", which is the judgment you are paying a lawyer or analyst for in the first place.

It also settles part of the security question. The source store and the matching step can run inside your own cloud account, under your access controls and audit trail. Only the passages needed for a question go to the model, under whatever data terms you approve. Associates keep doing the analysis. The system handles finding, copying and recording, which is how we approach AI knowledge systems and the legal and regulatory engine.

FAQ

Does retrieval-augmented generation stop LLM hallucinations in citations?

It reduces them by putting the real text in front of the model. It doesn't stop the model rewriting that text when it types a quote, or attaching real words to the wrong paragraph. To stop wrong wording, code has to insert the quote from your stored copy.

Can a second LLM verify the first model's citations?

It helps with obvious failures such as the wrong case or an unrelated source. A 2026 study found models caught only 37% to 61% of wrong page references in court opinions, so it should not be the last check on anything filed or sent to a client.

How do I measure LLM citation accuracy?

Keep an answer key of exact passages, then score three things separately: whether the quoted words match, whether they come from the cited paragraph, and whether the cited version applied on the relevant date. One blended score hides the failure that matters most to you.

What can't a verbatim check catch?

It can't tell whether the passage supports the claim made about it, or whether a more relevant passage was missed. Those need good retrieval, a complete source store and a person's judgment.

Build citations you can defend

If your product or practice depends on exact quotes from regulations, contracts or case files, we can scope a source store and citation layer around your documents, inside your own systems. Book a free call and bring the hardest quote your current tool gets wrong.

Cross-Industry & Business TeamsWhy Do Callers Hang Up on AI Receptionists?Cross-Industry & Business TeamsDoes Your AI Receptionist Really Integrate With ServiceTitan?Cross-Industry & Business TeamsHow Should an HVAC After-Hours Answering Service Work?