What is chunking in RAG and AI search?
Chunking splits a document into passages before indexing. OpenAI uses 800-token chunks by default; Google says pages need no chunking for its AI.
In short. Chunking is splitting a document into smaller passages before indexing, so that a retrieval system can return the relevant part of a page. OpenAI's file search splits files into 800-token chunks with a 400-token overlap by default. Google says site owners do not need to break their content into small pieces for its generative AI features.
On this page 7 sections
The evidence
OpenAI's vector stores split each file into chunks of 800 tokens with a 400-token overlap by default. Developers can set the chunk size between 100 and 4,096 tokens.1
1OpenAI API documentationOpenAI API documentation. Checked Nov 20, 2026.Anthropic says RAG systems usually split documents into chunks of no more than a few hundred tokens, and that a chunk can lose the context it needs to be understood.2
2AnthropicAnthropic, Sep 19, 2024.In Anthropic's tests, adding 50 to 100 tokens of context to each chunk, with embeddings and BM25 together, cut the top-20 retrieval failure rate by 49%, from 5.7% to 2.9%.2
2AnthropicAnthropic, Sep 19, 2024.Google says there is no requirement to break content into tiny pieces for AI, because its systems understand several topics on one page and show the relevant piece.3
3Google Search CentralGoogle Search Central, revised Jul 10, 2026.Chunking decides which part of a page a retrieval system can hand to a language model, and Google says site owners do not need to do it themselves for its generative AI features. In developer tools it happens automatically, and OpenAI's file search splits files into 800-token chunks by default.
Chunking is the step in a retrieval system that splits each document into smaller passages, called chunks, before they are indexed. The system then searches the chunks and returns the passages that match a query, instead of whole documents.
#Why retrieval systems chunk
Anthropic's post on Contextual Retrieval describes the usual pipeline for retrieval-augmented generation. The system breaks the documents into chunks of usually no more than a few hundred tokens, turns each chunk into an embedding, and stores the embeddings in a vector database. At query time, it finds the chunks closest to the query and adds them to the prompt sent to the model.2
OpenAI's retrieval guide shows the same step in a product. When a developer adds a file to a vector store, OpenAI chunks, embeds and indexes it automatically. A search returns the relevant chunks with their similarity scores and the file each came from.1
#Chunk size and overlap
By default, OpenAI splits each file into chunks of 800 tokens, with 400 tokens of overlap between consecutive chunks. Developers can change the size to anything from 100 to 4,096 tokens, and OpenAI says the overlap should not exceed half the chunk size.1 A token is a unit of text of about a word or part of a word; What are tokens in AI? explains how they are counted.
Anthropic says the choice of chunk size, chunk boundary and chunk overlap can affect retrieval performance.2
#The context problem
A chunk can lose the context it needs. Anthropic gives the example of a chunk that reads "The company's revenue grew by 3% over the previous quarter". On its own, the chunk does not say which company or which quarter, so it is hard to retrieve for a question about either.2
Anthropic's fix is to prepend 50 to 100 tokens of explanatory context to each chunk before embedding it and before building the BM25 keyword index. In its tests, contextual embeddings and contextual BM25 together cut the top-20 retrieval failure rate by 49%, from 5.7% to 2.9%.2
#Chunking and web pages
For web pages, Google's advice is to leave the splitting to its systems. The OpenAI and Anthropic documentation describes chunking for documents that developers index themselves. It does not describe how ChatGPT search or Claude split web pages.
Google addresses web pages directly. Google's guide to generative AI features in Search, revised July 10, 2026, lists "chunking" content among the things site owners do not need to do. It says Google's systems understand the nuance of several topics on a page and show the relevant piece. It also says there is no ideal page length and that pages should be made for their audience.3 Google's guide to its ranking systems also lists passage ranking, a system that identifies individual sections of a page to judge how relevant the page is.4
The risk in Anthropic's revenue example applies to any system that splits text. A passage that names its subject can be understood without the rest of the page, so it still makes sense when a system retrieves it alone. How to write content that AI search can cite covers writing self-contained sections, and What is retrieval-augmented generation (RAG)? covers the rest of the retrieval pipeline.
Read next
AI search
What is retrieval-augmented generation (RAG)?
RAG retrieves documents at query time and gives them to a language model to write a cited answer. How ChatGPT, Claude, Google, Bing and Perplexity use it.
AI search
What is semantic search and how does it differ from keyword search?
Semantic search matches the meaning of a query, often with vector embeddings. Keyword search matches its words. Hybrid search runs both and merges the results.
GEO
How to write content that AI search can cite
Eight steps for writing pages that AI search can cite, each graded by its evidence. Only adding sources and statistics has been tested, in a lab study.
LLMs
What are tokens in AI?
A token is the unit of text a language model reads and writes. OpenAI estimates that 100 tokens are about 75 English words. Counts and limits by provider.
Questions
What is a good chunk size for RAG?
There is no single right size. OpenAI's file search defaults to 800-token chunks with a 400-token overlap, and Anthropic describes chunks of no more than a few hundred tokens. Anthropic says chunk size, boundaries and overlap can all affect retrieval, so the size is best tested against real queries.
Should I split my web pages into chunks for AI search?
Google says no for its generative AI features. Its guide says there is no requirement to break content into tiny pieces, that its systems can show the relevant part of a page, and that there is no ideal page length.
What is chunk overlap?
Overlap is text that two consecutive chunks share. With OpenAI's defaults, each 800-token chunk repeats 400 tokens of the chunk before it, so text near the end of one chunk also appears at the start of the next.
Notes
- 1
- 2
- 3
- 4
About this page
Researched and reviewed by Promptly Found. Reviewed Nov 20, 2026. Next review due Feb 2027.
Cite this page
Promptly Found. (2026, November 20). What is chunking in RAG and AI search? https://promptlyfound.com/glossary/chunking
Revisions 1
- First published.