BuildSpark AI
Dismiss

BuildSpark AI: practical AI concepts for builders. New here? Start with Tokens.

Home · Retrieval & Grounding · 10 · Citation & grounding check

Concept card · Retrieval & Grounding

Citation & grounding check

A citation and grounding check ties a claim in the reply to a source you actually retrieved.

Checking that a claim in the reply is tied to a source you actually retrieved.

Last checked 2026-10-18 Free card 5 min

Ask about Citation & grounding check

What changed

Oct 18: First card. The picture ties a claim to a chunk, then cites the wrong chunk. Sources are Anthropic's citations guide and OpenAI's file search guide.

1 What it is

Anthropic's citations guide says you enable citations on a document and the response can attach a citation to a claim. The guide says the API extracts cited_text from the document, and that those citations contain valid pointers to the documents you provided. That statement is Anthropic's. A pointer is not a grade of the answer. OpenAI's file search guide says the message can include file_citation annotations with a file id and a filename. The support-docs answer bot on this site asks for a citations array in JSON. Anthropic's guide says citations cannot be used together with structured outputs, and that the API returns a 400 error if you enable both. The picture shows a claim with its source, then the same shape with the wrong source. It does not call either API.

Illustration. One claim, then a source you can open. The sentences are written for this picture.

ClaimWeekday support is open from 09:00 to 17:00.

Sourcehours. The sentence is in that chunk.

The picture ties the claim to a chunk the page retrieved. Opening the chunk confirms the sentence.

2 Why it matters

Cost

Anthropic's guide says enabling citations adds some input tokens because of the prompt and the chunking, and that cited_text does not count toward output tokens. This card does not turn that into a dollar figure.

Quality

A file id lets you open the file. It does not prove the sentence is in the chunk. On the support-docs answer bot, the template copies a sentence from the cited chunk. A model can name an id and write a sentence that chunk does not contain.

Risk

If one request needs both a JSON schema and Anthropic citations, the guide says the API returns a 400. Pick one on that request. A citation of a chunk you did not retrieve fails the check, even when the pointer is well formed.

3 How to apply · try today

Take one answer from the support-docs answer bot. Open the citation id. If the sentence is not in that chunk, the check fails.

Common mistake

Showing the citation and skipping the open-the-chunk step. Anthropic's pointer statement is about the document you sent, not about a file the model named from memory.

Self-check

The reply cites the hours chunk and says the refund window is 90 days. The hours chunk is about weekday hours. What failed?

Questions

What is a citation and grounding check?
A citation and grounding check ties a claim in the reply to a source you actually retrieved.
Does a citation prove the sentence is in the chunk?
No. Anthropic's guide says the pointer refers to a document you provided. You still open the chunk and read the claim against it.
Can Anthropic citations sit in the same request as structured outputs?
Anthropic's guide says no. Enabling both returns a 400 error.