Cross-summit analysis

RAG Chunk Size: Overlap and Citation Checks

Configure RAG chunk size, overlap token budgets, contextual retrieval pooling, and NLI citation verification using grounded framework specifications and retrieval benchmarks.

Two data engineers at a dual-monitor workstation inspecting document chunk token budgets, overlap retrieval curves, and citation character spans.

Selecting a RAG chunk size and chunk overlap requires aligning your text splitter with your embedding model tokenizer, subtracting prepended metadata tokens from the chunk limit, and verifying retrieval precision and citation entailment to prevent truncation and retrieval failure before deployment. In OpenAI's tiktoken library, the cl100k_base encoding is used by text-embedding-ada-002, text-embedding-3-small, text-embedding-3-large, gpt-4-turbo, gpt-4, and gpt-3.5-turbo, whereas o200k_base is used by gpt-4o and gpt-4o-mini.

For data platform teams designing retrieval pipelines across our AI Data Architecture coverage—after selecting between vector retrieval, graph indexing, and weight adaptation in the Agentic RAG vs GraphRAG and Fine-Tuning Guide—this reference specifies the exact token budget equations, overlap efficiency benchmarks, contextual embedding protocols, and citation offset checks required for production ingestion.

Embedding Token Limits and Metadata-Aware Splitter Mechanics

Configuring a text splitter around character heuristics rather than model-specific tokenizers risks silent sequence truncation or unexpected chunk fragmentation. With tiktoken, the exact token count of a text string for a given encoding is computed by loading the encoding with tiktoken.get_encoding(encoding_name) and taking len(encoding.encode(string)). The maximum input text length for the Azure OpenAI text-embedding-3-small model is 8,191 tokens (equivalent to around 6,000 words at roughly four characters per token for common OpenAI models), and staying under the token limit prevents data loss due to truncation. In SentenceTransformers, the SentenceTransformer max_seq_length property returns the maximal input sequence length for the model (Optional[int]), and any longer inputs will be truncated.

An AI engineer at a desk reviewing a Python code editor and printed SEC filing pages with highlighted paragraph boundaries LlamaIndex's SentenceSplitter.split_text_metadata_aware calculates metadata_len = len(self._tokenizer(metadata_str)) and subtracts it from chunk_size via effective_chunk_size = self.chunk_size - metadata_len, raising a ValueError if effective_chunk_size <= 0 and warning if effective_chunk_size < 50 tokens.

Production orchestration frameworks enforce distinct boundary rules, separator hierarchies, and overlap eviction loops when assembling chunks:

Splitter ComponentLlamaIndex SentenceSplitter defaultsExecution StageConstructor validationGrounded Framework Specification

LlamaIndex's SentenceSplitter sets SENTENCE_CHUNK_OVERLAP = 200, CHUNKING_REGEX, and DEFAULT_PARAGRAPH_SEP = '\n\n\n', and raises a ValueError if chunk_overlap is larger than chunk_size.

Splitter ComponentLlamaIndex split and merge guardExecution StageRecursive segmentationGrounded Framework Specification

LlamaIndex's SentenceSplitter._split breaks text into splits smaller than chunk_size in 4 ordered steps (1. paragraph separator, 2. chunking sentence tokenizer, 3. secondary regex, 4. default separator ' '), and _merge raises ValueError('Single token exceeded chunk size') if cur_split.token_size > chunk_size.

Splitter ComponentLlamaIndex merge overlap evictionExecution StageChunk closureGrounded Framework Specification

When closing a chunk, LlamaIndex's SentenceSplitter._merge prepends trailing splits from last_chunk while cur_chunk_len + last_chunk[last_index][1] <= self.chunk_overlap, and if adding the next split to a new chunk makes cur_chunk_len + cur_split.token_size > chunk_size, it pops overlap from the beginning until the split fits.

Splitter ComponentLangChain base TextSplitterExecution StageCharacter offset trackingGrounded Framework Specification

LangChain's base TextSplitter defaults to chunk_size = 4000 and chunk_overlap = 200, raises a ValueError if chunk_size <= 0, chunk_overlap < 0, or chunk_overlap > chunk_size, and when add_start_index=True records each chunk's character start_index in metadata using offset = index + previous_chunk_len - self._chunk_overlap and text.find(chunk, max(0, offset)).

Splitter ComponentLangChain merge_splits retentionExecution StageSeparator accountingGrounded Framework Specification

In LangChain's TextSplitter._merge_splits, separator_len is included whenever len(current_doc) > 0; if total + len_ + separator_len > self._chunk_size, the splitter logs a warning if total > self._chunk_size, emits the current chunk, and pops leading splits from current_doc while total > self._chunk_overlap or total + len_ + separator_len > self._chunk_size.

Splitter ComponentLangChain RecursiveCharacterTextSplitterExecution StageSeparator fallbackGrounded Framework Specification

LangChain's RecursiveCharacterTextSplitter defaults to separators = ['\n\n', '\n', ' ', ''] and keep_separator = True, selecting the first separator present in the text and recursively splitting any piece with _length_function(s) >= _chunk_size using the remaining new_separators.

Splitter ComponentLangChain TokenTextSplitterExecution StageToken ID slicingGrounded Framework Specification

LangChain's TokenTextSplitter and TextSplitter.from_tiktoken_encoder default to encoding_name = 'gpt2' (overridden if model_name is provided via tiktoken.encoding_for_model(model_name)), and TokenTextSplitter.split_text splits token IDs using Tokenizer(chunk_overlap=self._chunk_overlap, tokens_per_chunk=self._chunk_size, decode=self._tokenizer.decode, encode=_encode).

RAG Chunk Overlap and Retrieval Efficiency Benchmarks

Setting a fixed chunk size and overlap ratio trades off index cardinality against redundant token retrieval across neighboring chunks:

  • For fixed-size parsing with overlap, the Microsoft Azure Architecture Center recommends using bidirectional encoder representations from transformers (BERT) tokens instead of character counts because BERT tokens are based on meaningful units of language and preserve more semantic information than character counts.
  • When chunking data based on fixed size, Azure AI Search recommends starting with a chunk size of 512 tokens (approximately 2,000 characters) and an initial overlap of 25%, which equals 128 tokens, and notes that fixed-size paragraphs of 200 words or 600 characters can also use 10-15% overlap.
  • In Azure AI Search's Text Split skill, textSplitMode supports pages (default, multiple sentences per chunk) and sentences (single sentence per chunk); for pages mode, pageOverlapLength must be less than half of maximumPageLength, maximumPagesToTake defaults to 0 (take all pages/chunks), and the recommended character default is maximumPageLength=2000 with pageOverlapLength=500.
  • On NASA's 200-page Earth at Night PDF (average 189 cl100k_base tokens per page, maximum 1,583 tokens), Azure AI Search's Text Split skill in pages mode produces 172 chunks at maximumPageLength=1000 with 0 overlap vs. 216 chunks with 200 overlap, 85 chunks at 2000 with 0 overlap vs. 113 chunks with 500 overlap, 34 chunks at 5000 with 0 overlap vs. 38 chunks with 500 overlap, and 13,361 chunks in sentences mode.

Evaluating retrieval quality solely at the document level hides how much irrelevant text or duplicate overlap is injected into the generator context window. For a query q with relevant excerpt tokens t_e and retrieved chunk tokens t_r in chunked corpus C, Chroma defines token-level Intersection over Union as IoU_q(C) = |t_e cap t_r| / (|t_e| + |t_r| - |t_e cap t_r|), Precision_q(C) = |t_e cap t_r| / |t_r|, Recall_q(C) = |t_e cap t_r| / |t_e|, and F_1 = 2 * |t_e cap t_r| / (|t_e| + |t_r|). Chroma's chunking evaluation dataset spans 5 corpora totaling 328,208 cl100k_base tokens and 472 filtered queries: State of the Union (10,444 tokens, 76 queries), Wikitext (26,649 tokens, 144 queries), Chatlogs (7,727 tokens, 56 queries), Finance (166,177 tokens, 97 queries), and Pubmed (117,211 tokens, 99 queries). Chroma found that LangChain's RecursiveCharacterTextSplitter default separators ['\n\n', '\n', ' ', ''] commonly produced very short chunks that performed poorly compared to TokenTextSplitter, so Chroma modified the separator list to include sentence punctuation: ['\n\n', '\n', '.', '?', '!', ' ', ''].

Two search engineers at a workbench comparing retrieval precision and recall scatter plots on a wide monitor beside a notebook In Chroma's token-level IoU formula, each relevant excerpt token t_e among t_r is counted only once in the numerator while all retrieved tokens are counted in |t_r| in the denominator to penalize redundant excerpt tokens appearing in multiple overlapping chunks, and Precision_Omega measures precision when all chunks containing excerpt tokens are retrieved.

Empirical benchmarks across Chroma, LlamaIndex, and Amazon Bedrock Knowledge Bases show how chunk size and overlap affect recall, token efficiency, and response faithfulness:

Benchmark ConfigurationChroma large overlap baselineModel and Top-k ScopeOpenAI large embeddingsMeasured Retrieval Efficiency and Chunking Rules

In Chroma's evaluation using OpenAI's text-embedding-3-large (n=5 retrieved chunks), a chunk size of 800 tokens with 400 tokens of overlap (the OpenAI Assistants default) using TokenTextSplitter scored 87.9 ± 31.7 Recall, 1.4 ± 1.1 Precision, 4.7 ± 3.1 Precision_Omega, and 1.4 ± 1.1 IoU (while Recursive 800 with 400 overlap scored 85.4 ± 34.9 Recall, 1.5 ± 1.3 Precision, 6.7 ± 5.2 Precision_Omega, and 1.5 ± 1.3 IoU), the lowest efficiency scores across all tested settings.

Benchmark ConfigurationChroma recursive splitter sweepModel and Top-k ScopeOverlap vs zero overlapMeasured Retrieval Efficiency and Chunking Rules

In Chroma's evaluation, RecursiveCharacterTextSplitter with chunk size 400 (mean ~312) and 200 overlap achieves 88.1 ± 31.6 Recall, 3.3 ± 2.7 Precision, 13.9 ± 10.4 Precision_Omega, and 3.3 ± 2.7 IoU; with chunk size 400 (mean ~276) and 0 overlap it achieves 89.5 ± 29.7 Recall, 3.6 ± 3.2 Precision, 17.7 ± 14.0 Precision_Omega, and 3.6 ± 3.2 IoU; and at chunk size 200 (mean ~137) with 0 overlap it achieves 88.1 ± 30.1 Recall, 7.0 ± 5.6 Precision, 29.9 ± 18.4 Precision_Omega, and 6.9 ± 5.6 IoU.

Benchmark ConfigurationChroma semantic chunkersModel and Top-k ScopeCluster and LLM boundariesMeasured Retrieval Efficiency and Chunking Rules

In Chroma's evaluation, KamradtSemanticChunker (mean ~660, 0 overlap) achieves 83.6 ± 36.8 Recall, 1.5 ± 1.6 Precision, 7.4 ± 10.2 Precision_Omega, and 1.5 ± 1.6 IoU (while KamradtMod at 300, mean ~397, achieves 87.1 ± 31.9 Recall and 2.1 ± 2.0 IoU); ClusterSemanticChunker at 400 (mean ~182, 0 overlap) achieves 91.3 ± 25.4 Recall, 4.5 ± 3.4 Precision, 20.7 ± 14.5 Precision_Omega, and 4.5 ± 3.4 IoU, and at 200 (mean ~103) achieves 87.3 ± 29.8 Recall, 8.0 ± 6.0 Precision, 34.0 ± 19.7 Precision_Omega, and 8.0 ± 6.0 IoU, while LLMSemanticChunker (GPT4o, mean ~240) achieves the highest Recall of 91.9 ± 26.5 and 3.9 ± 3.2 IoU.

Benchmark ConfigurationChroma compact embeddingsModel and Top-k ScopeSentence Transformers evaluationMeasured Retrieval Efficiency and Chunking Rules

When Chroma repeated its evaluation using Sentence Transformers all-MiniLM-L6-v2, TokenTextSplitter at chunk size 250 with 125 overlap achieved the highest recall of 82.4 ± 36.2 (0.824, with 3.5 ± 3.1 IoU and 11.4 ± 6.6 Precision_Omega), which dropped to 77.1 ± 39.3 (0.771, with 3.3 ± 3.0 IoU and 16.4 ± 10.3 Precision_Omega) when overlap was set to 0, whereas ClusterSemanticChunker at size 200 (mean ~102, 0 overlap) achieved the highest IoU of 7.2 ± 6.0 and Precision_Omega of 33.6 ± 20.0 at 75.2 ± 39.9 Recall.

Benchmark ConfigurationLlamaIndex SEC filing sweepModel and Top-k ScopeFaithfulness and relevancyMeasured Retrieval Efficiency and Chunking Rules

In LlamaIndex's evaluation across chunk_sizes = [128, 256, 512, 1024, 2048] on the first 20 pages of the 2021 Uber 10K SEC filing (using gpt-3.5-turbo for generation and gpt-4 for FaithfulnessEvaluator and RelevancyEvaluator), a small chunk_size like 128 risks missing vital information when similarity_top_k is as restrictive as 2, whereas both Average Faithfulness and Average Relevancy peak at chunk_size of 1024 with a minor uptick in Average Response Time.

Benchmark ConfigurationBedrock standard chunkingModel and Top-k ScopeCitation page metadataMeasured Retrieval Efficiency and Chunking Rules

Amazon Bedrock Knowledge Bases supports fixed-size chunking (setting maximum tokens per chunk and overlap percentage), default chunking (splitting content into chunks of approximately 300 tokens while honoring sentence boundaries), and no chunking (treating each document as a single chunk, which disables viewing page numbers in citations or filtering by x-amz-bedrock-kb-document-page-number).

Benchmark ConfigurationBedrock table and figure contextModel and Top-k ScopePage context deduplicationMeasured Retrieval Efficiency and Chunking Rules

When a markdown or parsed document page contains a table or figure, Amazon Bedrock Knowledge Bases attaches the full page text or full table as broader context and deduplicates matching chunks into a single result only when the full page text or full table is 10,000 characters or fewer; above 10,000 characters, no broader context is attached.

Benchmark ConfigurationBedrock hierarchical and semanticModel and Top-k ScopeParent-child and buffer rulesMeasured Retrieval Efficiency and Chunking Rules

Amazon Bedrock Knowledge Bases hierarchical chunking supports two levels (parent maximum token size, child maximum token size, and absolute overlap tokens between consecutive parent chunks and consecutive child chunks, replacing retrieved child chunks with parent chunks at retrieval and warning against over 8000 tokens combined due to metadata size limitations), while semantic chunking configures maximum tokens, buffer size (where a buffer size of 1 combines 3 sentences: current, previous, and next), and a breakpoint percentile threshold.

Preserving Cross-Chunk Context with Contextual Retrieval and Late Chunking

Splitting a document prior to embedding severs pronouns, entity references, and temporal scope across chunk boundaries unless document-wide context is restored before indexing. Anthropic's Contextual Retrieval and Jina AI's Late Chunking address cross-chunk context loss at two different stages of the indexing pipeline:

  • Traditional RAG chunking destroys context when an isolated chunk such as 'The company's revenue grew by 3% over the previous quarter.' lacks the company name (ACME Corp) or relevant time period (Q2 2023 and previous quarter revenue $314 million); Anthropic's Contextual Retrieval uses Claude 3 Haiku to prepend usually 50-100 tokens of chunk-specific context to each chunk before embedding (Contextual Embeddings) and before creating the BM25 index (Contextual BM25).
  • Anthropic notes that if a knowledge base is smaller than 200,000 tokens (about 500 pages of material), developers can include the entire knowledge base directly in the prompt without RAG, using prompt caching to reduce latency by > 2x and costs by up to 90%; for larger knowledge bases, assuming 800 token chunks, 8k token documents, 50 token context instructions, and 100 tokens of context per chunk, the one-time cost to generate contextualized chunks with prompt caching is $1.02 per million document tokens.
  • Measured by 1 minus recall@20 (the percentage of relevant documents failing to be retrieved within the top 20 chunks, after testing 5, 10, and 20 chunks and reranking the top 150 initial chunks down to the top 20), Anthropic's Contextual Embeddings reduced the top-20-chunk retrieval failure rate by 35% (5.7% to 3.7%), combining Contextual Embeddings with Contextual BM25 reduced it by 49% (5.7% to 2.9%), and adding Cohere reranking reduced it by 67% (5.7% to 1.9%).
  • In Jina AI's Late Chunking Berlin example using jina-embeddings-v2-small, when sentences containing co-references like 'its' and 'the city' are embedded after naive splitting vs. late chunking, cosine similarity to the query 'Berlin' rises from 0.8486 to 0.8495 on the first sentence ('Berlin is the capital and largest city of Germany'), jumps from 0.7084 to 0.8249 on the second sentence ('Its more than 3.85 million inhabitants...'), and jumps from 0.7535 to 0.8498 on the third sentence ('The city is also one of the states of Germany...').
  • Unlike naive chunking (which splits text into sentences or paragraphs first and embeds each chunk independently), Late Chunking (Algorithm 1) first tokenizes the full text up to the model's maximum token length (8192 tokens for jina-embeddings-v2-small, roughly ten pages of standard text), runs the transformer layers once to produce contextualized token-level representations ϑ1, ..., ϑm, and then applies mean pooling over each chunk's token span (cue_start to cue_end) to produce context-aware chunk embeddings.
  • For documents longer than an embedding model's maximum token length l_max, Long Late Chunking (Algorithm 2) splits the document into macro chunks of l_max tokens augmented with an overlap length of omega tokens (vartheta_{i_start + omega}, ..., vartheta_{i_end}) that provide supplementary context during late chunking.
  • Averaged across three models (jina-embeddings-v2-small, jina-embeddings-v3, and nomic-embed-text-v1) and four BeIR datasets (SciFact, NFCorpus, FiQA, and TRECCOVID) in Table 2, late chunking improves mean nDCG@10 over naive chunking by 3.63% relative (1.9% absolute, 52.4% to 54.3%) for 5-sentence chunks, 3.46% relative (1.8% absolute, 52.2% to 54.0%) for 256-token fixed-size chunks, and 2.70% relative (1.5% absolute, 52.4% to 53.8%) for semantic sentence boundaries.
  • In Jina AI's evaluation on documents truncated at 8192 tokens, late chunking consistently beats naive chunking on NFCorpus and for small chunk sizes, whereas on synthetic Needle-8192 and Passkey-8192 tasks—where short relevant information is placed inside a document of unrelated text—late chunking is not useful because the additional document context is irrelevant.

RAG Citation Accuracy: Offset Tracking and NLI Entailment Checks

Chunk granularity directly governs whether a model can attribute generated statements to exact source spans and pass natural language inference entailment checks. A machine learning engineer auditing highlighted source document passages against generated citation spans on a laptop and tablet Anthropic Claude Citations returns three location schemas with 0-indexed document_index: char_location for plain text with 0-indexed start_char_index and exclusive end_char_index (such as 0 to 20 for 'The grass is green. ' and 20 to 36 for 'The sky is blue.'), page_location for PDFs with 1-indexed start_page_number and exclusive end_page_number, and content_block_location for custom content with 0-indexed start_block_index and exclusive end_block_index.

To audit RAG citation accuracy across retrieval pipelines and API responses, combine the Princeton NLP ALCE entailment definitions, Anthropic Claude Citations block rules, and structured document extraction pointers:

Citation Verification LayerALCE passage segmentationGranularity and ScopeStatement citation bracketsGrounded Protocol and Entailment Specification

The ALCE benchmark evaluates LLM citation generation across ASQA (Wikipedia, 21M passages), QAMPARI (Wikipedia, 21M passages), and ELI5 (Sphere, 899M web pages), dividing corpora into 100-word passages and segmenting LLM outputs by sentence boundaries into statements s1, ..., sn that each cite at most 3 passages Ci = {ci,1, ci,2, ...} in brackets like [1][2].

Citation Verification LayerALCE Citation RecallGranularity and ScopePremise entailment checkGrounded Protocol and Entailment Specification

ALCE defines Citation Recall for each statement s_i as 1 if and only if there is at least one citation (C_i != empty) and phi(concat(C_i), s_i) = 1 (and 0 otherwise), where phi(premise, hypothesis) is the TRUE (T5-11B) NLI model outputting 1 when the concatenated cited passages entail s_i in accordance with the Attributable to Identified Sources (AIS) framework.

Citation Verification LayerALCE Citation PrecisionGranularity and ScopeLeave-one-out irrelevanceGrounded Protocol and Entailment Specification

ALCE defines an individual citation c_{i,j} in C_i as 'irrelevant' if and only if (a) phi(c_{i,j}, s_i) = 0 (it cannot support s_i alone) AND (b) phi(concat(C_i \ {c_{i,j}}), s_i) = 1 (removing c_{i,j} does not affect the rest of the citations supporting s_i); c_{i,j} has Citation Precision = 1 if s_i has recall=1 and c_{i,j} is not irrelevant (and precision = 0 if recall = 0 or c_{i,j} is irrelevant), averaged over all citations in the response.

Citation Verification LayerALCE passage compressionGranularity and ScopeSummary vs full passageGrounded Protocol and Entailment Specification

In ALCE, a 2K context window fits at most k = 3 passages and a 4K window fits at most k = 5 passages (covering 56.8% of ASQA answers); replacing passages with ChatGPT summaries (SUMM, 10-psg) or snippets (SNIPPET, 10-psg) reduces passage length by 6x on average and raises ASQA EM Recall on ChatGPT from 40.4 (VANILLA 5-psg) to 43.3 (SUMM) and 41.4 (SNIPPET), but drops Citation Recall from 73.6 to 68.9 (SUMM) and 65.3 (SNIPPET) and Citation Precision from 72.5 to 61.8 (SUMM) and 57.4 (SNIPPET) due to lossy compression.

Citation Verification LayerALCE rerank vs post-hoc citeGranularity and ScopeGeneration attribution gapGrounded Protocol and Entailment Specification

In ALCE experiments on ELI5, ChatGPT (VANILLA 5-psg) achieves 51.1 Citation Recall and 50.0 Citation Precision and GPT-4 (5-psg) achieves 44.0 Citation Recall and 50.1 Citation Precision (around 50% of generations are not fully supported by cited passages); on ASQA, sampling nsample = 4 responses and selecting the best citation recall (RERANK) boosts ChatGPT Citation Recall from 73.6 to 84.8 and Precision from 72.5 to 81.6, whereas CLOSED BOOK with post-hoc GTR passage matching (POST CITE) drops ASQA Citation Recall to 26.7 (lower than VANILLA by 47%).

Citation Verification LayerClaude custom content blocksGranularity and ScopeCaller-controlled chunksGrounded Protocol and Entailment Specification

In the Anthropic Claude Messages API Citations feature (citations.enabled=true), plain text and PDF documents are automatically chunked into sentences to define the minimum citation granularity, whereas custom content documents (source.type='content') undergo no additional chunking so callers can place RAG chunks into custom content blocks to control citation granularity.

Citation Verification LayerClaude token and format rulesGranularity and ScopeAPI payload constraintsGrounded Protocol and Entailment Specification

In Anthropic Claude Citations, the cited_text field does not count toward output tokens (or toward input tokens when passed back in subsequent conversation turns), the optional title and context fields on a document block are passed to the model for metadata without being cited from, and enabling citations together with structured outputs (output_config.format) returns a 400 error.

Enterprise document pipelines pair these API citation mechanics with pre-ingestion layout extraction and source-position pointers:

  • In the Microsoft Build 2026 DEM331 session ('Agents Can Reason But They Cannot Read') indexed on OnlineSummit, the Microsoft Content Understanding team notes that handing raw scanned PDFs or complex tables to a model degrades quality and increases token cost simultaneously (1:40), whereas running a parse, classify and extract pipeline before the model has a vendor-claimed 85 per cent reduction in tokens (20:22).
  • In the Microsoft Build 2026 Foundry Tools session indexed on OnlineSummit, Joe Filcik highlights that each extracted document field carries both a confidence score and a pointer back to its position in the source document (29:29) to enable selective human review, and distinguishes answers that exist in a document and need finding from answers that must be constructed by reasoning across a chain of amendments or sections (30:57).

Production Chunking and Citation Verification Worksheet

Before locking your indexing pipeline or shipping user-facing citations, verify your configuration across the five engineering gates below:

Verification GateTokenizer and metadata budgetTarget ParameterEffective chunk tokensProduction Acceptance Check

Count tokens with cl100k_base or o200k_base via tiktoken.get_encoding(encoding_name) and len(encoding.encode(string)), keep inputs under the 8,191 token limit of text-embedding-3-small, and verify effective_chunk_size = self.chunk_size - metadata_len stays at or above 50 tokens without raising a ValueError at 0.

Verification GateOverlap and IoU efficiencyTarget ParameterRedundancy vs recallProduction Acceptance Check

Measure token-level IoU_q(C), Precision_q(C), Recall_q(C), F_1 = 2 * |t_e cap t_r| / (|t_e| + |t_r|), and Precision_Omega rather than relying on the 800 token / 400 overlap default (1.4 ± 1.1 IoU on text-embedding-3-large at n=5), comparing 200 to 400 token chunks with 0 overlap against Azure's 512 tokens with 25% (128 tokens) overlap, or, on all-MiniLM-L6-v2, TokenTextSplitter at 250 tokens with 125 overlap.

Verification GateCross-chunk context preservationTarget ParameterContextualization methodProduction Acceptance Check

Include the entire knowledge base in the prompt (with prompt caching) when a knowledge base is smaller than 200,000 tokens (about 500 pages); for larger corpora, either prepend usually 50-100 tokens of context per chunk before embedding and BM25 indexing ($1.02 per million document tokens assuming 800 token chunks, 8k token documents, 50 token context instructions, and 100 tokens of context per chunk) or apply Late Chunking mean pooling up to 8192 tokens on jina-embeddings-v2-small.

Verification GateCitation span and offset indexingTarget ParameterDocument and character pointersProduction Acceptance Check

Enable add_start_index=True in LangChain (offset = index + previous_chunk_len - self._chunk_overlap, max(0, offset)), preserve x-amz-bedrock-kb-document-page-number and the 10,000 character table/figure attachment threshold in Bedrock, and pass pre-chunked RAG blocks via source.type='content' (0-indexed content_block_location) in Claude Citations without output_config.format (which returns a 400 error).

Verification GateNLI citation entailment auditTarget ParameterCitation recall and precisionProduction Acceptance Check

Evaluate generated statements using TRUE (T5-11B) NLI entailment phi(concat(C_i), s_i) = 1 for Citation Recall and ALCE leave-one-out irrelevance (phi(c)=0 AND phi(C \ {c})=1) when scoring Citation Precision (1 iff recall=1 and citation is not irrelevant), avoiding lossy 6x passage summaries (10-psg vs 5-psg) and post-hoc closed-book matching (which drops ASQA Citation Recall from 73.6 to 26.7, lower by 47%).

Once your team has validated chunk token budgets, overlap efficiency, and NLI citation entailment, compare higher-level retrieval control loops in the Agentic RAG vs GraphRAG and Fine-Tuning Guide, review our verification workflow on Methodology, and browse related engineering sessions in AI Data Architecture.

Sources

  • OpenAI Cookbook, How to Count Tokens with Tiktoken.
  • SentenceTransformers Documentation, SentenceTransformer Model Reference.
  • LlamaIndex Core Specification, SentenceSplitter Node Parser Source.
  • LangChain Text Splitters Specification, Base TextSplitter, TokenTextSplitter, and RecursiveCharacterTextSplitter Source.
  • Microsoft Azure Architecture Center, Develop a RAG Solution: Chunking Phase.
  • Microsoft Azure AI Search Documentation, Chunk Large Documents for Vector Search.
  • Chroma Technical Report (Brandon Smith and Anton Troynikov), Evaluating Chunking Strategies for Retrieval.
  • LlamaIndex Engineering Blog, Evaluating the Ideal Chunk Size for a RAG System Using LlamaIndex.
  • AWS Amazon Bedrock User Guide, How Document Chunking Works in Knowledge Bases.
  • Anthropic Research, Introducing Contextual Retrieval.
  • Jina AI Research (Michael Günther et al.), Late Chunking: Contextual Chunk Embeddings Using Long-Context Embedding Models.
  • Princeton NLP (Tianyu Gao et al.), Enabling Large Language Models to Generate Text with Citations.
  • Anthropic Claude API Documentation, Citations Guide.
  • OnlineSummit Talk Archive, Microsoft Build Agent Content Velocity and Agent Tools and Documents Sessions.

How to cite this page

Copy a stable citation for this source-backed profile.