Agent Wealth HubFree public resources
中文 EN العربية

Back to catalog / Agent research

Return traceable citations for document question answering

Provide documents as trusted sources and preserve source locations in answers instead of asking the model to invent citations.

Goal

Answer document questions while linking each checkable claim to an input document.

Steps

  1. Prepare a small authorized document set with stable source IDs and recognizable titles/content. [citations]
  2. Follow the citations example using document content blocks with citations.enabled, passing only authorized text in the message. [citations]
  3. Read citation objects and locations, render links to source documents, and verify each span falls within the source. [citations]

How to verify

Test with a question containing an unsupported trap; citations point only to supplied documents and positions are verifiable.

Troubleshooting

If no citation is returned, report insufficient evidence; do not fall back to generated page numbers or URLs.

Permissions

Prerequisites

Permissions

Limitations

This feature depends on supported models and supplied sources; a citation does not prove an inference is correct or authorize disclosure.

Pinned upstream source

https://github.com/anthropics/anthropic-cookbook/blob/9c1e493ddd2b82df399d2a61b9c806c539e18be6/misc/using_citations.ipynb

Repository
anthropics/anthropic-cookbook
File path
misc/using_citations.ipynb
Pinned commit
9c1e493ddd2b82df399d2a61b9c806c539e18be6
Source checked
2026-10-14 · Reviewed against the pinned upstream source

Repository metrics

These values describe the upstream repository, not popularity or likes for an individual skill or playbook.

Stars
Not collected
Forks
Not collected
Observed at
Not collected

No metrics snapshot is available yet.

License: MIT

Main topic

Turn ecommerce campaign materials into a reviewable weekly brief

Related resources