Chunk and index documents for retrieval-augmented generation
8 steps · about 2 h 50 min · Beginner
- Map the retrieve-then-generate pipeline (reference, Wikipedia, 15 min)
Clarifies how grounding prompts in retrieved passages reduces hallucination and stale knowledge.
- Read the foundational RAG formulation (article, arXiv, 25 min)
Shows how dense passage retrieval pairs with sequence generation over non-parametric memory.
- Compare fixed-size, recursive and structure-aware chunking (guide, Pinecone, 20 min)
Explains how chunk size and overlap trade off local context completeness against retrieval noise.
- Match chunking rules to tables, code and prose (article, Weaviate, 20 min)
Shows why splitting blindly by character count breaks markdown headings, code blocks and tables.
- Use recursive separators and attach source metadata (guide, LangChain, 20 min)
Demonstrates how hierarchical splitting preserves paragraph boundaries and keeps citations intact.
- Parse documents into hierarchical nodes (guide, LlamaIndex, 20 min)
Illustrates parent-child node relationships for retrieving small snippets with surrounding context.
- Choose a FAISS vector index for your corpus size (guide, Meta FAISS, 20 min)
Compares exact flat search with IVF and HNSW indexes as document counts grow.
- Evaluate chunk retrieval quality systematically (tutorial, Hugging Face, 30 min)
Tests whether changing chunk size or overlap actually improves grounded answer faithfulness.