RAG and Knowledge Engineering

RAG and Knowledge Engineering

Citation and Grounding — Stack

Citation and grounding › Stack

69 of 81 in this book · 2 min read

Technology landscape as of 2026-10-10. Knowledge cutoff May 2026.

Selection criteria

Two components are being chosen: a mechanism for producing attributions and a mechanism for verifying them. They have different requirements and are frequently, wrongly, the same model.

  • Attribution granularity achievable — document, passage, sentence, or character span — and what it costs per answer at each level.
  • Verifier independence. Whether the check can be performed by something other than the generator, since self-assessment is systematically generous.
  • Entailment accuracy on your domain, measured on examples where the passage is topically related and does not support the claim, which is the case that matters.
  • Latency position. Whether verification runs before the answer is shown, streams alongside it, or runs asynchronously and can only annotate afterwards.
  • Identifier durability. Whether the citation target survives re-segmentation and index rebuilds, which is a property of your pipeline rather than of any tool.
  • Rendering and resolution. Whether a citation can be resolved to a viewable location — page, highlight, anchor — and whether that view re-checks entitlement.
  • Cost per answer, since a per-sentence check multiplies the generation cost by the number of sentences.
  • Auditability. Whether the verification result is recorded with the answer, so a later dispute can be examined rather than re-litigated.

Options

Option Best for Watch out for
Inline citation markers produced by the generator The cheapest possible attribution, adequate when a verifier follows Markers are generated text and can be fabricated; useless as evidence without a check
Provider-native grounding and citation features (hosted model APIs that return source spans) Getting structured, span-level attributions without building the alignment yourself Scope is the provider's retrieval or your supplied documents only; behaviour changes with the model
Post-hoc alignment of answer sentences to passages (lexical overlap, embedding similarity, span matching) Attribution that does not depend on the generator's honesty Topical similarity is not support; this finds the most similar passage, not the entailing one
Natural language inference models as entailment verifiers Checking support rather than similarity, cheaply and independently Trained on short premise-hypothesis pairs; long passages and multi-sentence claims degrade them
Instructed language model as a verifier, separate from the generator Flexible checking including partial support and multi-passage claims Expensive per sentence; use a different model or at minimum a different prompt and context
Grounding evaluation frameworks (RAGAS, DeepEval, TruLens) with faithfulness metrics Measuring grounding across a population during development Built for offline measurement; adapting them to per-answer serving-time checks is not their design point
Rendering components that resolve a citation to a highlighted location (PDF viewers with span anchors) Products where the reader is expected to verify against the source The anchor must survive the pipeline; entitlement has to be re-checked at the view, not only at retrieval