Skip to main content

Show source citations that point to the retrieved passage

2026-11-11 16:36:31.249490+00:00
Show source citations that point to the retrieved passage

A citation should let a reader inspect the passage that supports a specific answer claim. A link to a handbook homepage is less useful when the claim depends on one exception deep inside an older revision.

In a synthetic answer about export retention, associate each claim with a retrieved source record. Preserve the source ID and revision, section heading and the supporting excerpt. A stored span can locate the excerpt if the viewer uses the same extraction representation.

claim: Export downloads expire after the documented retention window.
source_id: export-guide
revision_id: revision-4
section_id: download-retention
supporting_excerpt: [exact text from the retrieved fixture]

The bracketed excerpt is a placeholder for actual source text. It must never be presented as a quotation. Use a fixture containing a real retention sentence before exercising the citation renderer.

Answer sentences linked to precise document excerpts.

Validate references before rendering them

Let the model refer to a bounded list of source IDs supplied with the request. Reject unknown IDs at the response boundary. Resolve URLs on the server from stored source metadata instead of allowing generated text to invent arbitrary destinations.

The Sentence Transformers semantic-search guide describes finding relevant corpus entries. Retrieval relevance alone does not establish that an entry supports every sentence in the generated answer; that support check needs separate evaluation.

Split compound claims when their sources differ. If one sentence states a retention rule and an access-control condition, attach the supporting evidence for each part or rewrite the answer into smaller claims. A citation at the end of a long paragraph can otherwise imply support the source does not contain.

Preserve access and revision meaning

An anchor can break when a document is edited. Retaining a revision or an archived source snapshot lets a reviewer distinguish an outdated answer from a fabricated one. Respect retention rules and permission changes when storing those snapshots.

If the user cannot open a cited document, avoid pretending the citation is inspectable. Explain the access limitation without leaking its title or excerpt to an unauthorized user. Citation links should enforce current authorization when followed.

Test an answer with one valid citation, an unknown source ID, a valid source that does not support the claim and a deleted source. The renderer should handle each case predictably. A valid URL proves only that a destination exists.

This record format is a proposed application design, not a guarantee of grounded generation. Human review or a separate evidence-checking process still needs to assess whether the quoted passage entails the claim and whether the answer leaves out a relevant exception.