A text chunk is a small, coherent segment of a source document, often a paragraph or section. In retrieval-augmented generation (RAG), chunks make detailed documents easier to process and help the system retrieve information relevant to a question. section 14.1
A chunk moves through a RAG workflow in four steps:
- Parse a document to extract its text, then divide that text into coherent chunks. section 14.1
- Pass each chunk through an embedding model and store its vector representation in a vector database. section 14.1
- Embed a user's query and use vector search to find relevant document chunks. section 14.1
- Place retrieved chunks in the prompt so the language model can ground its response in the source documents. section 14.1
Chunking a source document
A PDF or Microsoft Word document can be parsed into text and segmented so that a paragraph or section forms one complete piece of information for later retrieval. section 14.1


















