06 section

Retrieval Systems

RAG end to end — chunking, embeddings, vector stores, hybrid search, reranking, graphs and agentic loops — with the failure modes that show up at each stage

12 pages 57 min 12,039 words

01 the section

What is in here

Follow the data: fundamentals first, then chunking and embeddings on the write path, then vector stores, hybrid search and reranking on the read path. GraphRAG, agentic RAG and the advanced patterns are what you reach for once a plain pipeline stops being accurate enough. Three topics appear twice here, once long-form and once as a shorter late-2025 update — the long version is placed first in each pair.

01 3 min RAG Fundamentals Grounding versus training as the core choice, the current RAG taxonomy, and where a two-million-token context window makes retrieval unnecessary — and where it does not ragretrievalfundamentals 02 3 min Chunking Strategies Small chunks find, large chunks explain — resolve that tension with recursive structure splitting, semantic boundaries, and parent-child hierarchies tuned per content type chunkingragretrieval 03 3 min Embedding Models Choosing an embedding model in the Matryoshka and ColBERT era, where truncated dimensions and binary quantization shrink an index twentyfold for under two percent recall embeddingsretrievalmodel-selection 04 11 min Vector Databases The full operating manual for vector stores: HNSW and IVF index tuning, metadata filtering, upserts and reindexing, cost modelling, and a selection framework vector-dbretrievalproduction 05 3 min Vector Database Comparison A vendor-by-vendor read on Pinecone, Qdrant, Weaviate, Milvus and pgvector, scored on scale, filtering, tenancy and the real cost of managed versus self-hosted vector-dbretrievalcost 06 10 min Hybrid Search The long-form treatment of dense plus sparse retrieval: query-type analysis, fusion by RRF or weighted scores, tuning alpha, and running both indexes in production searchretrievalrag 07 3 min Hybrid Search in Brief A condensed pass on fusing keyword and vector results: where dense retrieval misses part numbers, how RRF works, and what learned-sparse SPLADE changes searchretrievalembeddings 08 9 min Reranking Second-stage precision in depth: cross-encoder architectures, hosted rerankers, LLM listwise scoring, latency budgets, and deciding which queries are worth reranking at all rerankingretrievalproduction 09 3 min Reranking Strategies The bi-encoder to cross-encoder funnel in brief, with listwise LLM reranking and distilled small-model rerankers weighed against the milliseconds they add per query rerankingretrievallatency 10 3 min GraphRAG When the question spans the whole corpus rather than one chunk: entity extraction, community summarization, relationship traversal, and the indexing cost that buys it knowledge-graphragretrieval 11 3 min Agentic RAG Turning the retrieval pipeline into a loop the model controls — Self-RAG reflection, corrective re-retrieval, multi-hop chains, and the latency variance that comes with them ragagentsreasoning 12 3 min Advanced Retrieval Patterns The techniques that close the query-document gap: multi-query decomposition, HyDE, Anthropic-style contextual retrieval, iterative enrichment, and in-context reranking retrievalragsearch