Skip to content
mentoor

Topic 3 of 5 · 5 min read

Citation formats users can check

Goal: Design a citation display for an answer that lets a user reach the exact supporting passage, and fix a citation that points to the wrong chunk.

A citation is only useful if the reader can get from the claim to the exact supporting passage in one step. A list of document titles at the bottom looks careful but makes the reader search for the evidence themselves, and most will not.

Check yourself · 1 of 3

Which citation is easiest for a reader to verify?

Choose one answer

Why it matters

People treat a cited answer as more trustworthy than an uncited one, whether or not the citation is right. That makes citations a risk when they are decorative: they raise trust without letting anyone check. The point of the format is to make checking cheap enough that people do it, and to make wrong citations easy to catch.

How to do it

  1. Cite at claim level. Put the marker right after the sentence it supports, such as [1], not once at the end of a long paragraph. One marker per claim lets a reader see which sentences have support.
  2. Point to a location, not just a document. Store the document id, version, page or section heading, and character offsets of the chunk. "Employee Handbook, v4, section 6.2, page 31" is checkable. "Employee Handbook" is not.
  3. Show the passage. On hover or click, open a preview with the quoted span highlighted inside its surrounding text. Seeing the neighbours helps the reader judge if the sentence was taken out of context.
  4. Link to the source at its anchor. Deep link to the page or heading in the original document. For PDFs use the page number; for web pages a heading anchor or text fragment.
  5. Show the source's date and version. A reader should see at a glance that the policy cited is from 2023.
  6. Keep ids stable. Your marker [1] is a display label. Underneath, store the chunk id so the link still works after the corpus is re-indexed.

Before and after

Weak:

Contractors get 30 days of notice. Remote work needs approval.
Sources: Handbook.pdf, Contractor FAQ

Better:

Contractors get 30 days of notice [1]. Remote work needs manager approval [2].

[1] Contractor Agreement Template v3, section 9.1, page 12 (updated 2026-03-01)
[2] Employee Handbook v4, section 6.2, page 31 (updated 2026-01-15)

Each marker opens the passage with the supporting sentence highlighted.

What goes wrong

  • Citing the document but not the chunk. The link opens page 1 of a 200-page PDF.
  • Off-by-one markers. Numbers are assigned after sorting, or after dropping a chunk, so [2] shows the passage that belongs to [3]. Build markers from one list and render from that same list.
  • Citing a neighbouring chunk. The claim is in chunk 14, but the model cited chunk 13 because both were in the context. A highlight that does not contain the claim exposes this at once.
  • Too many markers. Five citations after one short sentence make nothing checkable. Cite the best one or two.

Examples

What to store per citation

{
  "marker": 1,
  "chunk_id": "handbook-v4#6.2#0",
  "doc_title": "Employee Handbook",
  "version": "v4",
  "updated": "2026-01-15",
  "page": 31,
  "section": "6.2 Remote work",
  "span": [412, 538]
}

With the span and page, the UI can open the PDF at page 31 and highlight characters 412 to 538 of the chunk.

Fixing a wrong pointer

Answer sentence: "Refunds take 5 business days [2]." Marker 2 opens a passage about shipping times. The claim sits in the next chunk of the same document. The fix is in the pipeline, not the prose: re-run the claim against the retrieved chunks, choose the chunk that contains the quote and rebuild the marker list.

Key points

  • Cite at claim level, with a marker right after the sentence it supports.
  • Store and show a precise location: document, version, section or page, and the exact span.
  • Open the passage with the supporting text highlighted inside its surroundings, in one click.
  • Show the source's date and version so stale documents are visible.
  • Display labels are separate from stable chunk ids, and markers must be built from the same list that is rendered.

Common mistakes

  • Listing document titles at the bottom of the answer instead of citing each claim.
  • Linking to a whole document when the claim lives on one page or section.
  • Numbering markers after reordering chunks, so labels and passages no longer match.
  • Hiding the source date, so a reader cannot tell the policy cited is two years old.

Check yourself · 2 of 3

A user clicks marker 2 and sees a passage about shipping times, but the answer sentence is about refunds. What is the most likely cause?

Choose one answer

Check yourself · 3 of 3

Why show the updated date of a cited document next to the marker?

Choose one answer

Practice items, not counted towards your mastery.

Start here

More for this topic