Retrieval & Document Workflows

Custom Content Documents: Controlling Citation Precision

With plain-text documents, the API decides what a citable unit is. With custom content documents, you decide — and that changes how precise your attributions can be.

Claude 3P 101 · Updated July 2026 · Unofficial guide

Claude's citations feature supports three citable document types, and each one points back at your source differently. Plain-text documents are sentence-chunked by the API and cited by 0-indexed character range (char_location). PDFs have their text extracted and sentence-chunked, cited by 1-indexed page range (page_location). The third type — custom content documents — is the one that hands control to you: your content blocks are used exactly as you provide them, and citations come back as 0-indexed block ranges (content_block_location). For retrieval pipelines where attribution precision matters, that control is the point.

What "custom content" actually means

Instead of one string of text, a custom content document's source is an array of text blocks. The API does not re-chunk them. Each block you supply becomes an atomic unit that Claude can cite — whole, or not at all. A content_block_location citation then identifies which document (document_index, 0-indexed across all document blocks in the request) and which range of blocks inside it supported the claim.

{"type": "document",
 "source": {"type": "content", "content": [
     {"type": "text", "text": "Section 4.2: Refunds are issued within 30 days."},
     {"type": "text", "text": "Section 4.3: Exchanges require a receipt."}
 ]},
 "title": "Returns policy",
 "citations": {"enabled": true}}

If Claude relies on the first block, the citation's block range covers index 0 only — your application knows precisely which policy clause was used, with no fuzzy character offsets to map back to your own chunk boundaries.

How this differs from sentence-chunked plain text

With a plain-text document, the API splits your text into sentences and Claude cites at sentence granularity, returning character ranges into the original string. That is convenient and precise for prose, but the chunking logic belongs to the API, not to you. Two consequences follow:

Custom content inverts the deal: you lose the API's automatic sentence granularity, and gain exact alignment between what Claude cites and what your system stores. Anthropic's own RAG guidance in the citations documentation presents both patterns: put each retrieved chunk into its own plain-text document when sentence-level citations are what you want, or use custom content documents to control chunk granularity yourself.

When smaller blocks improve attribution

Because the block is the minimal citable unit, block size sets a floor on precision. Package an entire retrieved passage as one block and every citation of it points at the whole passage — accurate, but coarse. Split that passage into one block per clause or per fact, and citations narrow accordingly. The same granularity model applies to search_result content blocks, whose documentation states it directly: Claude cites whole blocks, not substrings, so split content into smaller blocks for finer citation granularity.

Rule of thumb: make each block the smallest unit a reviewer would want to verify independently. For a contract, that's usually a clause; for an FAQ, one question-answer pair; for a table, one row. Blocks so small they lose meaning out of context help nobody — a citation to "Yes." is precise but useless.

Two supporting details help here. First, the title and context fields on a document block are passed to the model but are never citable — use context for metadata (source system, effective date, tenant) without polluting the citable content; it accepts text or stringified JSON and isn't length-limited the way title is. Second, citations must be enabled on all documents in a request or none, so a mixed corpus can still combine plain-text and custom content types as long as the citation flag is uniform.

Platform availability

Citations, including custom content documents, work on the Claude API, Claude Platform on AWS, Amazon Bedrock, and Google Vertex AI; Microsoft's Foundry documentation lists citations among Claude's supported capabilities there. All active models support citations except Claude Haiku 3.

Where to go next

For the cost side of citations, read citations billing mechanics. If your retrieval results come from a search system, search result content blocks apply the same block-granularity model with source URLs attached.

Sources