Generative AI / TECHNICAL PERSPECTIVE

RAG Chunking Strategies: Why Your AI Misses the Right Answer

Learn how RAG chunking strategies preserve meaning, improve document retrieval and help AI assistants deliver reliable, evidence-based answers at a manageable cost.

RAG chunking strategiesRetrieval-augmented generationSemantic chunkingDocument retrievalContext engineeringRAG evaluation
REFERENCE WORKFLOW03 stages
01Parse approved documents and preserve their logical structure, source references and permissions
02Create searchable chunks, retrieve relevant evidence and assemble sufficient authorised context
03Generate and verify the answer; measure retrieval quality, business correctness and cost
EXECUTIVE SUMMARY

Key takeaways

  • An AI assistant cannot reliably use an important policy exception if the retrieval system fails to supply it.

  • Choose chunk boundaries around meaningful evidence, not simply a convenient token count.

  • Use a simple sentence-aware baseline before investing in semantic or hierarchical chunking.

  • Tune chunk size, overlap and retrieval depth together under a consistent context budget.

  • Keep headings, table headers, document versions, citations and access permissions attached to the evidence they describe.

  • Select a strategy using measured answer quality and cost per accepted task, not retrieval similarity alone.

01 PRACTICAL GUIDANCE

The answer was in the document. Why did AI miss it?

Imagine a customer-service team using an AI assistant to search its returns policy. A customer asks whether a damaged product can be returned after the standard return period. The assistant confidently says no. Yet the next paragraph of the policy allows an exception for damaged products under specific conditions.

The organisation has uploaded the correct policy. The search service is working. The language model is capable of answering questions about the policy. The missing exception, however, never reached the model because the document had been divided into separate pieces and the search retrieved only the general rule.

This is why replacing an AI model is not always the best response to an incorrect answer. Sometimes the problem lies much earlier, in the way business knowledge has been prepared for search. RAG chunking strategies determine which pieces of information the assistant can discover and how much surrounding context accompanies them.

For businesses building knowledge assistants, this decision affects more than technical accuracy. It can influence customer advice, employee decisions, the amount of manual checking required and the cost of operating the application.

02 PRACTICAL GUIDANCE

What chunking actually does in a RAG system

Retrieval-augmented generation (RAG) gives a language model relevant information from an external knowledge source when it answers a question. Instead of placing an entire document library in every prompt, a typical RAG application prepares documents for search and retrieves a manageable selection of evidence for each request.

A chunk is a searchable unit of that information. It may contain a paragraph, a policy clause, a group of sentences, a table with its headings or an entire short document. A common implementation creates an embedding, or numerical representation of meaning, for each chunk and stores it in a search index alongside source metadata. Keyword search can complement vector similarity search, particularly for policy codes, product names and other precise identifiers.

When a question arrives, the retrieval system searches eligible records, optionally reranks the candidates and sends selected passages to the language model. The model uses this evidence to construct an answer. Retrieval, context assembly and generation are separate stages, and each can fail for different reasons.

Chunking makes it possible to locate a small portion of a large document without representing the entire document as one broad search record. It also helps respect embedding and generation input limits. But a passage that is easy to find is not necessarily complete enough to answer the question. Microsoft documents several approaches to dividing and indexing text, including fixed-length, structural and meaning-based segmentation.[1]

03 PRACTICAL GUIDANCE

Five ways to divide business knowledge

Fixed-size chunking: Split text into windows of a configured number of tokens, optionally sharing text between adjacent windows. It provides a reproducible baseline and is inexpensive to implement. A hard boundary can, however, separate a rule from its qualification.

Recursive chunking: Try natural boundaries such as sections, paragraphs and sentences before splitting oversized units into smaller pieces. This is a useful general-purpose approach to prose, but it cannot recover document structure that was lost during extraction.

Structure-aware chunking: Use the document hierarchy, clauses, headings, lists and table structure to determine boundaries. It suits policies, manuals and contracts in which the document layout conveys meaning. Oversized sections still require subdivision, and inconsistent source formatting requires careful parsing.

Semantic chunking: Identify shifts in subject matter, commonly by comparing representations of neighbouring sentences or passages. This can help separate topics in unstructured text. It introduces additional ingestion work, and a definition or exception may still be separated from the rule to which it applies.

Hierarchical chunking: Index smaller child passages for search and associate them with larger parent sections. When a child matches, return the parent or another bounded expansion as needed. This can improve the completeness of the evidence delivered to the model, although it increases context-management complexity. Amazon Bedrock documents this child-to-parent retrieval pattern for its knowledge bases.[2]

These approaches are not mutually exclusive. A sensible document pipeline might identify headings first, recursively divide lengthy sections and retain parent identifiers for selective expansion. The right combination depends on the documents, the questions and the amount of evidence a correct answer requires.

04 PRACTICAL GUIDANCE

How large should a RAG chunk be?

There is no universal best chunk size. Small passages can focus a search on a particular fact, but they may omit definitions, conditions or antecedents. Large passages provide more surrounding information, but unrelated material can make a search match less precise and consume more of the model’s input budget.

Tokens are units of text used by a model, not words or characters. Count them using the relevant tokenizer, and leave room for any heading or metadata appended to the text. Different languages and embedding models can have different tokenisation behaviour.

For ordinary prose, a practical experiment is to compare target sizes of 256, 512 and 1,024 tokens. These are proposed test settings, not measured optimums. Use the same documents and questions and compare them under a similar retrieval context budget. Microsoft’s documentation suggests 512 tokens with 25% overlap as one starting configuration, while recognising that requirements vary.[1]

Overlap repeats part of a passage in its neighbour so that information near a boundary can survive in one complete chunk. Test no overlap alongside modest overlap, such as 10% or 20%. Where clauses are already intact and self-contained, repetition may add little value. Excessive overlap can fill the top search results with near-identical passages instead of complementary evidence.

For a 10,000-token document, fixed 500-token windows produce 20 chunks without overlap. With 100 tokens of overlap, the window advances by 400 tokens, producing 25 chunks when the last window stops at the document end. The indexed text rises to 12,400 tokens, including repeated content. This arithmetic demonstrates the storage and embedding workload implications, not a prediction of actual provider charges or answer quality.

05 PRACTICAL GUIDANCE

Keep the exception with the rule

Return to the damaged-product question. Suppose a retailer’s approved policy states: Standard returns are accepted within 30 days of delivery. A damaged product may be returned within 60 days if the damage was reported within 48 hours of delivery. These are assumed policy terms for this example, not a real retailer’s policy.

A short chunk containing only the standard rule may produce an incorrect answer. A larger window could preserve both rules if its boundaries happen to align with the policy. A structure-aware or hierarchical approach can deliberately preserve the rule, exception and reporting requirement together, or retrieve them through explicit relationships.

The assistant should explain that a return after 30 days may qualify under the damage exception and ask when the customer reported the damage. It should cite the applicable policy rather than approve the return without the necessary facts and authorisation.

In contracts, the same principle applies to obligations and exclusions. In financial-services policies, it applies to thresholds, eligible populations and approval authorities. A meaningful evidence unit is determined by what someone needs to make a correct decision, not by the visual length of a page.

06 PRACTICAL GUIDANCE

Different documents deserve different treatment

Policies and contracts: Preserve clause numbers, definitions, cross-references, exceptions and effective dates. Retrieve related clauses when needed rather than assuming every condition can be captured by overlap.

Knowledge-base articles and support FAQs: Keep a question with its answer, related product identifiers and any prerequisites. An entire short entry may already be a useful search record.

Tables and financial reports: Preserve column headers, row labels, units, reporting periods and relevant footnotes. Reattach headers when dividing large tables. For exact aggregations or frequently updated figures, a governed database query may be more dependable than asking a language model to reconstruct numbers from text chunks.

Scanned documents: Validate optical character recognition and reading order before chunking. Multi-column pages, incorrectly recognised numbers and detached footnotes can introduce errors that no choice of chunk length can repair.

For every document family, retain the original source and map each searchable unit back to an appropriate page, clause, section or record. When a model generates a citation, the application should be able to show the evidence supporting the claim, not merely the name of a long file.

07 PRACTICAL GUIDANCE

Is a more advanced chunking strategy really better?

Semantic chunking sounds attractive because it attempts to preserve the meaning of text rather than following arbitrary lengths. Yet meaning-based boundaries are not guaranteed to preserve all the evidence needed for a particular question.

A 2025 study by Qu, Tu and Bao compared semantic and fixed-size chunking across document search, evidence retrieval and answer generation. It found that the additional computation associated with semantic methods was not consistently rewarded by better performance in the evaluated tasks.[3] This is a strong reason to benchmark simpler approaches first, not a reason to rule out semantic chunking entirely.

Sending substantially more retrieved material to the model is not automatically a solution either. Liu and colleagues found that the placement of relevant information within long inputs influenced performance in the language models and tasks they examined.[4] Modern models should be evaluated directly rather than assuming that the results apply unchanged to every system.

A useful design separates the precision of search from the completeness of the generation context. Retrieve focused passages, expand them selectively if necessary, remove duplicate content and give priority to the evidence that actually answers the question. Where several independent facts are required, ensure that the assembled context includes all of them.

08 PRACTICAL GUIDANCE

How to test chunking before rebuilding your index

Start with representative questions from the business, not only easy demonstration queries. Include direct fact lookups, exceptions, questions spanning multiple sections, exact identifiers, tables, ambiguous questions and requests that the approved knowledge base cannot answer. Have subject specialists identify the evidence and acceptable response for each case.

Create a simple baseline with sentence-aware splitting and a small set of size and overlap configurations. Keep the document snapshot, embedding model, retriever, reranker, generation model and prompt fixed for the initial comparison. Compare evidence at a similar token budget: retrieving five large chunks and five small chunks does not deliver an equivalent amount of information.

Measure evidence recall at a defined retrieval depth: the proportion of required annotated source passages that appear in the retrieved evidence. Use stable source spans rather than configuration-specific chunk IDs so different strategies can be compared fairly. Also measure the proportion of questions for which all necessary evidence is present, since retrieving just one of several conditions can still lead to an incorrect answer.

Then measure the final response: factual correctness, completeness, citation support, appropriate refusal or clarification when evidence is missing, and the frequency of consequential errors. Record ingestion cost, index size, retrieved and model-input tokens, end-to-end latency and the total cost per accepted answer. Track these metrics separately for important document types, languages and business workflows.

Inspect failed examples before changing the design. If the source was extracted incorrectly, repair parsing. If complete evidence exists but is not found, investigate search ranking, query wording and chunk boundaries. If the evidence was supplied but the model misused it, investigate generation instructions and validation. Each problem calls for a different remedy.

Use a held-out evaluation set to confirm the selected configuration and pilot it before wider adoption. Select the simplest approach that meets agreed quality, risk and service targets. Reevaluate important workloads after changing document parsers, embedding models or chunking logic.

09 PRACTICAL GUIDANCE

Governance begins before text enters the search index

A chunk can contain commercially confidential or personal information. Preserve access restrictions when creating searchable units and enforce them using trusted user identity before returning evidence to the model. Parent expansion, neighbouring-chunk retrieval and caching must respect the same restrictions. Never combine passages with different access permissions unless the resulting record and retrieval checks correctly protect all of its content.

Keep stable source identifiers, version information, effective dates and the chunking configuration used to create the index. On a policy update, supersede or remove stale chunks and invalidate affected caches. On deletion or permission revocation, make the change effective across derived search records as well as the original document store.

Treat retrieved content as untrusted evidence rather than executable instructions. A document can contain misleading instructions, including text designed to manipulate the AI assistant. Security testing should cover document-level prompt injection, unauthorised retrieval and leakage across access boundaries; chunking alone cannot prevent these risks.

A change to the chunking strategy can require reprocessing documents and rebuilding search records. Plan a versioned index rollout, validate representative queries and retain an approved rollback route. This turns what appears to be a minor configuration change into a manageable engineering decision.

10 PRACTICAL GUIDANCE

Before you spend more on the AI model

If your existing assistant struggles with internal knowledge, examine the evidence it receives for the questions it gets wrong. A more expensive model may produce a more polished response without knowing the exception or definition that was omitted during retrieval.

For a small, well-structured document collection, straightforward search or whole-entry retrieval might be enough. For diverse enterprise knowledge, document-specific splitting and selective expansion may be worth the additional implementation work. The investment decision should follow the observed failure patterns and the cost of correcting them.

If your organisation is planning a RAG application or reviewing an assistant that employees do not yet trust, a focused review of document preparation, retrieval behaviour and answer quality can identify whether chunking is the real issue or whether the underlying architecture needs attention.

The goal is not to find the perfect chunk size. It is to ensure that the AI receives the right evidence, with enough context to interpret it correctly, whenever a business decision depends on the answer.

11 PRACTICAL GUIDANCE

References and further reading

[1] Microsoft Learn. Chunk large documents for RAG and vector search in Azure AI Search. https://learn.microsoft.com/en-us/azure/search/vector-search-how-to-chunk-documents

[2] Amazon Web Services. Amazon Bedrock: How content chunking works for knowledge bases. https://docs.aws.amazon.com/bedrock/latest/userguide/kb-chunking.html

[3] Qu, R., Tu, R. and Bao, F. S. (2025). Is Semantic Chunking Worth the Computational Cost? Findings of the Association for Computational Linguistics: NAACL 2025, 2155–2177. https://aclanthology.org/2025.findings-naacl.114/

[4] Liu, N. F., Lin, K., Hewitt, J., Paranjape, A., Bevilacqua, M., Petroni, F. and Liang, P. (2024). Lost in the Middle: How Language Models Use Long Contexts. Transactions of the Association for Computational Linguistics, 12, 157–173. https://aclanthology.org/2024.tacl-1.9/

WORKED EXAMPLE / SAMPLE DATA

Apply the approach

Consider a retailer evaluating its RAG assistant against an assumed returns policy. Standard returns are accepted within 30 days of delivery. A damaged product may be returned within 60 days if the damage was reported within 48 hours of delivery. The same customer question tests whether three retrieval configurations preserve the exception and its eligibility condition. The outcomes below describe possible retrieval behaviour, not measured benchmark results.

Fixed-size splitGeneral rule only

If only the first passage is retrieved, the model may incorrectly conclude that all returns after 30 days are prohibited.

Overlapping windowsBoundary protection

An overlapping passage may include the exception and reporting condition if the overlap and retrieval ranking are sufficient; repeated content adds indexing work.

Structure-aware or parent expansionComplete policy evidence

Retrieve the standard rule and related exception together. The assistant can explain the conditional 60-day provision and request the missing reporting date.

IMPLEMENTATION CHECKLIST

Put the approach into practice

  1. 01Inspect the actual retrieved passages for incorrect or incomplete answers and identify missing source evidence.
  2. 02Group documents by structure and decision requirements; preserve headings, conditions, tables, versions and permissions.
  3. 03Build a sentence-aware baseline and compare selected chunk sizes and overlap settings under a comparable context budget.
  4. 04Evaluate evidence coverage, answer correctness, citations, appropriate abstention, latency and cost using held-out business questions.
  5. 05Pilot the best-performing acceptable configuration in a versioned index and monitor results before introducing more advanced chunking.
COMMON QUESTIONS

Frequently asked questions

Can I use different chunk sizes in the same RAG application?

Yes. A short FAQ, a contract clause and a lengthy narrative may need different boundaries. The index can support different document preparation policies as long as the application preserves comparable retrieval behaviour, source traceability and access controls.

Should I always use chunk overlap?

No. Overlap helps when a necessary passage crosses a boundary. With self-contained sections, it may simply duplicate evidence. Compare zero overlap with modest overlap on representative queries before committing to extra indexing and retrieval overhead.

What is the difference between chunk size and the context window?

Chunk size is the amount of text in an individual searchable record. The context window is the model’s supported input and output capacity under its particular API conventions. Several chunks, instructions, conversation history and the generated answer must fit within the applicable model limits.

Does changing the chunking strategy require new embeddings?

Usually, yes for records whose text changes. Their embeddings need to correspond to their new contents. Unchanged records may be reused if their embedding model and preprocessing remain identical. Rebuild or reconcile affected index entries and test retrieval before switching production traffic.

Can better chunking eliminate hallucinations?

No. It can improve the relevance and completeness of retrieved evidence, but models can still misunderstand or invent claims. Use source validation, citation checks, appropriate abstention and human review where business consequences warrant it.

CONTINUE EXPLORING

Related articles

Continue through the same expertise domain or explore another perspective.

Generative AI
Puneett Bhatnagr · 14 min read

Advanced RAG Architecture Patterns: Beyond the Basic AI Chatbot

Discover how advanced RAG architecture patterns help enterprise AI find better evidence, handle complex questions, respect permissions and deliver more dependable answers without unnecessary complexity.

Advanced RAG architecture patternsHybrid retrievalContext engineeringHierarchical retrievalGraphRAGAgentic RAGRAG evaluation
Read article
Generative AI
Puneett Bhatnagr · 13 min read

Beyond OCR: How Multimodal AI Can Understand Enterprise Documents

Explore how multimodal AI for enterprise documents interprets text, tables and images, supports reliable extraction, and reduces manual work with human oversight.

Multimodal AI for enterprise documentsDocument intelligenceVision-language modelsOptical character recognitionMultimodal RAGHuman-in-the-loop validation
Read article
Generative AI
Puneett Bhatnagr · 12 min read

Embedding Model Selection: Why Your AI Must Find the Right Evidence

Choosing an embedding model shapes the quality, cost and reliability of enterprise AI search. Learn how to evaluate models, benchmark retrieval and build a dependable RAG system.

Embedding model selectionRetrieval-augmented generationSemantic searchVector embeddingsHybrid retrievalRetrieval evaluationGenerative AI
Read article
Generative AI
Puneett Bhatnagr · 12 min read

Enterprise Context Engineering: Why Better AI Needs Better Context

Discover how enterprise context engineering helps AI use relevant, authorised business information to improve answer reliability and reduce avoidable rework.

Enterprise context engineeringGenerative AIRetrieval-augmented generationContext managementEnterprise knowledge assistantsAI evaluationAI security
Read article
Generative AI
Puneett Bhatnagr · 13 min read

Hybrid Search for Generative AI: Better Answers Start with Better Search

Why do AI assistants miss information your business already holds? Discover how keyword and vector search work together to improve enterprise RAG, retrieve relevant evidence and make AI answers more dependable.

Hybrid searchGenerative AIRetrieval-augmented generationBM25Vector searchSemantic rerankingEnterprise knowledge management
Read article
Generative AI
Puneett Bhatnagr · 13 min read

LLM Fine-Tuning vs RAG: Which Approach Does Your Business Need?

Should your AI learn new behaviour or retrieve better information? Explore LLM fine-tuning vs RAG through business examples, architecture choices, cost trade-offs and practical evaluation criteria.

LLM fine-tuningRetrieval-augmented generationEnterprise generative AIModel adaptationKnowledge groundingLLM evaluationLoRAAI architecture
Read article
Generative AI
Puneett Bhatnagr · 12 min read

Prompt Injection Defence for LLMs: When AI Reads the Wrong Instructions

Learn how prompt injection threatens enterprise AI assistants and how layered security, restricted permissions and independent checks can reduce business risk.

Prompt injection defence for LLMsGenerative AI securityIndirect prompt injectionRAG securityAI guardrailsAI agent securityLeast privilege
Read article
Generative AI
Puneett Bhatnagr · 13 min read

RAG Reranking Techniques: Why Finding the Right Evidence Matters

Explore how RAG reranking techniques improve the relevance of evidence behind AI answers, compare retrieval strategies and learn when a reranker is worth the investment.

RAG reranking techniquesRetrieval-augmented generationCross-encoder rerankingHybrid searchSemantic searchRetrieval evaluationContext engineering
Read article
Generative AI
Puneett Bhatnagr · 12 min read

Structured Outputs in LLM Applications: Beyond Better Answers

Turn AI-generated language into dependable application data. Learn how JSON Schema, independent validation and safe workflow integration make structured outputs useful for business.

Structured outputsGenerative AIJSON SchemaConstrained decodingLLM applicationsOutput validationDocument intelligenceFunction calling
Read article
Generative AI
Puneett Bhatnagr · 12 min read

Synthetic Data for Generative AI: When Real Data Is Not Enough

Learn how synthetic data can strengthen generative AI training and testing, expand coverage of rare scenarios and reduce dependence on sensitive records while preserving reliability.

Synthetic dataGenerative AIInstruction tuningAI evaluationData augmentationData privacyModel collapse
Read article
Generative AI
Puneett Bhatnagr · 12 min read

When AI Sounds Certain but Is Wrong: LLM Hallucination Detection

Can your business trust its AI-generated answers? Explore how LLM hallucination detection combines evidence checks, uncertainty signals and human oversight to catch unreliable claims before they influence decisions.

LLM hallucination detectionGenerative AIAI factualityRetrieval-augmented generationSemantic entropyLLM evaluationAI reliabilityHuman oversight
Read article
LET'S CONNECT

Let’s build something with AI.

I welcome conversations about enterprise AI, strategic advisory, executive leadership and research collaboration.

Use the inquiry form below
  • AI engineering and enterprise architecture
  • Responsible AI and model risk
  • Executive opportunities and consulting
  • Research and technical collaboration
AI collaborationA message connects enterprise AI strategy, AI engineering and responsible governance.AI COLLABORATIONConnectStrategyEngineeringGovernance

Send me an inquiry

Tell me about your AI challenge, leadership opportunity or research idea.

Please do not include confidential business data.

Enter the answer to confirm you are human.
Let’s connect

Explore the portfolio

Search the eight expertise pages, selected case studies and research records.