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.
BuildSpark AI: practical AI concepts for builders. New here? Start with Tokens.
Home · Retrieval & Grounding · 10 · Citation & grounding check
Concept card · Retrieval & Grounding
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.
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.
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.
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.
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.
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.
Take one answer from the support-docs answer bot. Open the citation id. If the sentence is not in that chunk, the check fails.
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.
The reply cites the hours chunk and says the refund window is 90 days. The hours chunk is about weekday hours. What failed?
Support-docs answer bot uses this concept in one build. The set on this tab is still the note below.
Coming soon. One support-bot answer, with the cited chunk opened and the sentence marked or marked missing.
Coming soon. How Anthropic attaches a citation to a document you sent, and how OpenAI's file search puts a file_citation on the message.