A citation is only useful if someone can follow it back to the source and find the claim actually there. That word — verifiable — is what separates real sourcing from decoration. Claude offers two routes: prompt-level patterns, where you instruct the model to include references in its text, and the API's structured citations feature, where the platform returns machine-readable pointers into the documents you supplied. Most enterprise document workloads should use the second and reserve the first for cases the feature doesn't cover.
Prompt-level citation patterns
When you're working from supplied documents, three prompt ingredients produce auditable references. First, give every document a handle: wrap each in a <document> tag with a <source> subtag, per Anthropic's long-context guidance, so Claude can name what it's citing. Second, demand verbatim quotes, not paraphrases — "for each claim, include the exact supporting sentence in quotation marks with its source name." A fabricated claim usually cannot produce a real quote, and a reviewer can string-search a quote in seconds. Third, define the failure mode: if no supporting passage exists, Claude should say so rather than cite loosely.
One boundary to draw clearly in your prompt and your product: references to the model's general training knowledge ("this is standard practice in the industry") are not citations. If a claim can't point at supplied material, it should be labeled as unsourced. And treat model-generated URLs with particular suspicion — unless the link came from your documents or a search tool result, verify it before display.
The built-in citations feature
For document Q&A, the Messages API can do the heavy lifting. Enable citations per document and Claude's response text comes back interleaved with structured citation objects, each carrying the cited text and the index of the document it came from:
from anthropic import AnthropicAWS # Claude Platform on AWS
client = AnthropicAWS()
msg = client.messages.create(
model="claude-opus-4-8",
max_tokens=1024,
messages=[{"role": "user", "content": [
{"type": "document",
"source": {"type": "text", "media_type": "text/plain",
"data": policy_text},
"title": "Expense Policy 2026",
"citations": {"enabled": True}},
{"type": "text", "text": "What is the travel approval limit?"},
]}],
)
The citation format matches the document type: plain-text documents yield character-range locations (sentence-chunked), PDFs yield page locations, and "custom content" documents let you supply your own blocks — useful for RAG, where each retrieved chunk becomes its own citable unit. All active models support the feature except Claude Haiku 3, and it works as a standard API feature with no beta header.
Three practical notes from the official docs. Cited text doesn't count toward output tokens (and doesn't count as input when passed back later), so structured citations are cheaper than prompting for long quotes. Scanned PDFs without extractable text can't be cited — run OCR upstream first. And citations cannot be combined with structured outputs; enabling both in one request returns a 400 error, so pick one per call.
Auditing what comes back
Whichever route you use, verification should be a pipeline step, not a hope. For structured citations, your rendering code can jump to the cited range and display it beside the claim; a human reviewer then checks support, not existence. For prompted quotes, run an automated exact-match check of each quote against the source text and flag misses. Track two numbers per prompt version: the share of claims carrying a citation, and the share of citations that check out. The second number is your real quality metric — a response with ten decorative references is worse than one with three verified ones.
Sampling matters more than volume. A weekly human review of a few dozen cited answers, scored against a simple rubric ("quote present, quote accurate, quote actually supports the claim"), catches drift that automated string-matching can't — especially the subtle failure where the quote is real but doesn't say what the surrounding sentence claims it says.
Where to go next
Citations are one tool in the anti-hallucination kit — see reducing hallucination through prompt design for the rest. For rendering citation objects in applications and audit trails, the citations API article goes deeper, and citation grounding without embeddings covers RAG-shaped uses.