What are chunks in RAG?
What is it?
A chunk is a segment of text cut from a larger document. Instead of indexing an entire 50-page manual as one block, RAG systems split it into smaller pieces — paragraphs, sections, or fixed-size text blocks.
Each chunk is indexed and retrieved independently.
Why does it exist?
LLMs have a limited context window — they cannot process entire large documents in one request. Retrieval also works better with focused pieces: a question about "500-hour maintenance" should match a specific section, not an entire manual.
Chunking balances:
- Precision — small enough to match the right topic
- Context — large enough to contain a complete idea
How does it work conceptually?
Full document text
↓
Split by rules (size, paragraphs, headings)
↓
Chunk 1 | Chunk 2 | Chunk 3 | …
↓
Each chunk embedded and indexed separatelyExample
A manual chapter on scheduled maintenance becomes several chunks:
- Chunk A: introduction to maintenance schedule
- Chunk B: 500-hour service checklist
- Chunk C: 1000-hour service checklist
A question about 500 hours should retrieve Chunk B.
Where does it fit in a RAG pipeline?
Chunking is part of preparing knowledge, after extraction:
Document → Extract text → Chunk → Embed → IndexAt query time, retrieval returns chunks (not whole documents). Those chunks become context for the LLM.
Future concepts in this learning path cover chunk size, overlap, and chunking strategies in more depth.
How this relates to Noulek
When you upload a document to Knowledge Base, Noulek's pipeline includes a Chunking stage visible in Job detail. Noulek applies internal chunking rules during indexing — you do not configure chunk size in the MVP admin UI.
- Each indexed chunk is embedded and stored in your Weaviate collection.
- Search and Chat retrieve the most relevant chunks for a query.
- Document status must be Ready before chunks are available.
If chunking fails, Job detail shows the failure at the Chunking stage. See document processing problems.