RAG and Knowledge Engineering

RAG and Knowledge Engineering

Citation and Grounding

66 of 81 in this book · 4 min read

What it is

Binding the statements in a generated answer to the retrieved material that supports them, and checking that the binding holds. Two distinct mechanisms sit under one name: attribution, which produces a resolvable pointer from a claim to a passage a reader can open, and entailment checking, which asks whether that passage actually supports the claim rather than merely mentioning its subject.

Why it matters

A retrieval-grounded answer that cites nothing asks a reader to trust a paraphrase of a document they cannot see. A citation that resolves to the wrong passage is worse: it converts an unverifiable claim into an apparently verified one, and the markers themselves become a reason not to check. In regulated and professional settings the citation is often the deliverable — the value is in being pointed at the clause, not in the summary of it. And because a model will happily attach a plausible reference to a sentence it produced from its own parameters, the presence of citations in an output is evidence about formatting and nothing else until something verifies them.

Why it is not retrieval evaluation

Measuring retrieval asks whether the right material was found and ranked, over a population of queries, offline, before anything is generated. This capability operates on one answer at a time, at serving time, and asks a different question: does this particular sentence follow from the passages it points at. A system can retrieve excellently and cite dishonestly, and a system with mediocre retrieval can be scrupulously accurate about the weak evidence it found.

Key decisions

  • Granularity. A list of sources at the end of an answer is cheap and nearly unfalsifiable; a span-level pointer per claim is expensive, far more useful, and much harder to produce correctly.
  • Whether the model emits citations as it generates, or whether a separate step aligns the finished answer to the passages. Generated markers cost nothing extra and can be invented; post-hoc alignment is an additional call and can be audited.
  • What happens to a sentence that nothing supports: removed, rewritten, flagged in the output, or left alone with the whole answer marked low-confidence.
  • Identifier stability. A citation has to resolve months later, across re-segmentation, re-encoding and index rebuilds, which makes it a constraint on unit identity rather than a display concern.
  • What is cited when the supporting text was itself derived — a transcription, a generated caption, a summary of a region of a graph — since the reader must be able to tell a quotation from a machine's account.
  • Whether the verifier is independent of the generator. Asking the same model whether its own sentence is supported is a check that agrees with itself.
  • What the reader is actually shown: the document, the page, the passage, or a highlighted span, and whether that target enforces the same entitlement the retrieval did.

Failure modes

  • The model places markers that look correct and point at the wrong member of the retrieved set, which is undetectable by eye and found only by a checker.
  • Citations resolve to unit identifiers that were invalidated by a re-segmentation, so every reference in every stored answer returns nothing.
  • A sentence synthesising two passages cites one of them, and a reader who checks the cited passage concludes the answer is overreaching when it was supported.
  • A claim the model produced from its own parameters is given a citation to a topically related passage, which is the most dangerous output the system can produce.
  • Citations are attached from the candidate set rather than from the passages the generator actually read, so they are correct about the topic and wrong about the provenance.
  • The cited passage mentions the entity in the claim but does not assert the claim, and a similarity-based verifier scores it as supported.
  • A generated figure description is cited as though it were text in the document, and a reader who opens the source cannot find the sentence.
  • The citation link bypasses the entitlement check that retrieval applied, so following it discloses a document the reader could not have retrieved.

Related capabilities


Applies: Production readiness · Design questions