Retrieval-augmented generation answers from the passages a search puts in the prompt, so an answer can only use the evidence that survives every stage between the corpus and the model; each stage is a separate choice, measured on its own.
Retrieval-augmented generation (RAG): before a language model answers, a search system finds the few passages of a document collection that bear on the question and pastes them into the prompt, so the model answers from text it can read and cite rather than from memory.
Fig. 1: one question's path, and the page that owns each stage
The towers follow the 188 SciFact claims that have annotated evidence through one pipeline: BM25 and Qwen3-Embedding-0.6B fused by reciprocal rank fusion, Qwen3-Reranker-0.6B on the top 30, the top 3 abstracts to Qwen3-1.7B, which must give the right label and cite an evidence abstract (a deterministic check, no judge) measured on Apple M1 Pro. The first two stages almost never lose the evidence (186 of 188 in the top 30, 178 kept in the top 3); the generator gets 96 right. The figure is a map: its shapes stand for the stages, and only the towers are measurements.
You need little beyond a language model's prompt. The ranking scores used throughout are defined in one line each below; their formulas and confidence intervals are on Evaluation metrics, and judged answer quality (faithfulness, relevance) on RAG and retrieval evaluation. How a database stores postings lists and HNSW pages, and BM25 and pgvector inside PostgreSQL, is Search and vector databases in Topic: databases; this topic owns the retrieval view (which model, which index settings, what quality you get) and links it instead of repeating it.
New terms
The running example. Every page of this topic measures on the same public data, models and machine, so numbers can be compared across pages. The main set is SciFact: 5,183 scientific abstracts and 300 test claims (short statements such as "Activation of PPM1D suppresses p53 function"), each with the abstracts human annotators marked as evidence. NFCorpus (3,633 medical documents, many relevant per query), QASPER (281 long NLP papers, for cutting documents into pieces) and HotpotQA (200 questions that need two Wikipedia paragraphs each, over 9,760 paragraphs, for multi-step search) cover what SciFact cannot. Everything runs locally on an Apple M1 Pro laptop with open models (four embedding models, three rerankers, Qwen3 1.7B and 4B as the answering model), with no paid APIs. Numbers are labelled: measured means produced on this topic's pages in October 2026, vendor a figure a company publishes about its own product, published a paper or independent benchmark, derived computed from other numbers with the formula shown, and illustrative an input chosen for teaching. The definition of the running example, with every model revision and its baseline scores against BEIR and MTEB, is in this page's src/data/README.md; the topic's shared runs, which the child pages build on, are recorded under src/pipe, src/vec and src/agent.
A language model's weights hold a compressed, lossy memory of its training text (its parametric memory): frozen at a cutoff date, with no record of where any fact came from. Its context window is different: whatever text is placed in the prompt is read now, exactly, and can be quoted. Retrieval moves knowledge from the first place to the second, and that buys four things, each measured in this topic:
| What retrieval buys | Measured here | Owner |
|---|---|---|
| Grounding | Closed book, Qwen3-1.7B gets the SciFact label right on 45 of 188 claims and has nothing to cite; with the gold abstracts in the prompt it gets 112 right and cites them measured. | The retrieval pipeline, section 9 |
| Updating | New knowledge means re-indexing documents, not retraining weights; not free (refresh intervals, deleted text that survives in index files, re-embedding on a model change). | RAG in production, sections 2 to 4 |
| Citing | The system knows which passages it put in the prompt, so it can show them, and a checker can verify that the answer cites one of them, as the SciFact check of the figure above does. | The retrieval pipeline, section 8 |
| Access control | Only retrieval can give each user a different view of the same corpus, and only at retrieval: with a restricted document in the prompt and a system prompt forbidding it, Qwen3-1.7B revealed the restricted fact in 17 of 18 answers; with the document filtered out at retrieval, 0 of 18. A rule in the prompt is not a security boundary. | RAG in production, section 5 |
Why not fine-tune the facts in instead? Fine-tuning changes how a model behaves but is a poor way to add facts: it cannot be updated per document, cannot cite, cannot give two users different views, and still hallucinates on what it saw once. The two combine: fine-tune for format and domain style, retrieve for facts.
The old version of this page quoted OpenAI's Astra for Law (September 2026): GPT-6 Astra plus a legal index of more than 230 million URLs built on CourtListener, 54% against 38.7% for the same model with ordinary web search on the Vals AI Legal Research Bench vendor. The lesson stands, with two corrections from the Topic: benchmarks page's check (read 2026-10-04): the product also adds legal instructions and was scored on OpenAI's private validation set, so the index's own effect is not isolated; and Vals AI's public leaderboard lists GPT-6 Astra at 39.42% with its standard tooling. So a retrieval-sensitive score quoted without its index carries little information, and a vendor's own split of the gain is a claim, not a measurement.
Every scorer trades the same two things: how much it can compute about a document before the query exists (so it can scan the whole corpus), against how much the query and the document meet (so it can judge relevance). The first stage needs the left end; a reranker sits at the right end.
| Scorer | Stored per SciFact abstract | Work per candidate at query time | SciFact nDCG@10 | Owner |
|---|---|---|---|---|
| BM25 (words) | term counts in postings lists | a sum over shared terms; 0.25 ms a query, no model | 0.679 | The retrieval pipeline, 2 |
| Learned sparse (SPLADE) | about 239 weighted vocabulary terms | a sum over shared terms | 0.708in-domain | Rerankers and late interaction, 10 |
| Bi-encoder (dense vectors) | 1 vector, 4,096 bytes (Qwen3-Embedding) | one dot product (49 ms to embed the query) | 0.700gte-modernbert 0.767, MiniLM 0.645 | Embedding models |
| Late interaction (ColBERT) | 236 token vectors of 96, 45,245 bytes | MaxSim, about 1.4 MFLOP | 0.7430.758 reranking | Rerankers and late interaction, 8 |
| Cross-encoder (reranker) | nothing | a full forward pass: 8.9 GFLOP (MiniLM) to 416 (Qwen3-Reranker) | 0.782reranking the hybrid top 20 | Rerankers and late interaction, 2 to 5 |
| Hybrid (BM25 + Qwen3-Embedding, RRF) | both indexes | two searches, then fusion by rank | 0.724 | The retrieval pipeline, 4 |
300 SciFact test claims, exact search, deterministic measured (the learned-sparse row by the retrieval pipeline page on the same data). Vectors are compared by cosine, dot product or L2 distance; on normalised vectors all three give the same order, so normalise once at write time.
Three distinctions only show across the children:
A production pipeline runs in two halves. At index time, before any question: parse documents, cut them into chunks, attach metadata, write a keyword index and a vector index. At query time: rewrite the question if it needs it, search both indexes with the filters inside each search, fuse the two lists, rerank the top of the fused list, and put the best few chunks, with their ids, into the prompt. Most knobs move a result by a point or two; the table keeps the one measured lesson per stage that changes a design.
| Stage | The lesson, measured on the running example | Owner |
|---|---|---|
| Parse | Of 107 evidence paragraphs in QASPER papers' PDFs, MinerU (flash) kept 94 intact and pdfplumber 1: the parser decides what can ever be found. | Document ingestion and multimodal retrieval |
| Chunk | On QASPER's 892 questions, fixed 256-token windows keep the evidence paragraph whole for 607 (68.0%), splitting on blank lines first for 838 (93.9%). Compare chunkers at an equal token budget: at a fixed top 3, 512-token windows beat paragraph-aware chunks (61.4% of questions found against 45.3%, with BM25) only because they send three times the text; at 1,024 tokens each the order flips, 45.9% against 64.5%. | The retrieval pipeline, 1 |
| Index | Exact search streams about 37 GB of vectors a second on one core: 112 ms for a million vectors of 1,024 numbers, so below roughly a million it is often fast enough and always the honest baseline. Approximate indexes read less and miss a little (ANN recall@10 on SciFact: IVF 0.901 with 8 of 72 cells, HNSW 0.991, PQ at 16 bytes 0.914 after rescoring); int8 vectors with a float query keep 0.996, binary codes 0.674 alone and 0.990 after rescoring 100. | Vector indexes; smaller vectors (Matryoshka, quantised embeddings) Embedding models, 7 |
| Rewrite | HyDE (embed a generated answer passage) lifts Qwen3-Embedding from 0.700 to 0.718 on SciFact, multi-query does nothing (0.699), and each costs a generator call before retrieval can start (about 2.2 s and 0.8 s per claim with the 1.7 B model, more than the whole retrieval stage). Rewriting a chat follow-up into a standalone question is the one rewrite that always pays (on eight constructed two-turn chats it put the evidence in the top 3 for 6 to 7 of 8, against 3 to 5 for the follow-up alone). | The retrieval pipeline, 5 |
| Fuse | Section 2: RRF lifts models close to BM25 and hurts clearly stronger ones; tune any weight on held-out queries. | The retrieval pipeline, 4 |
| Filter | A filter applied after the index (a post-filter) silently returns fewer results: when a user may see 10% of SciFact, fetching 10 and filtering leaves 1.73 on average. Filter inside the search; with a graph index a restrictive filter cuts the paths the walk needs, which engines fix with iterative scans, filter-aware traversal (ACORN) or a switch to exact search. | The retrieval pipeline, 6; inside the index Vector indexes, 9 |
| Rerank | Section 2: only a stronger model helps, and its time is linear in the depth K. | Rerankers and late interaction |
| Prompt | The prompt is a knob, tuned on held-out data like any other: the first SciFact prompt made Qwen3-1.7B answer "NOT ENOUGH INFO" almost always (23 of 188 right even with the gold abstracts), the one chosen on training claims 112. More context is not free for a small model: with the reranker on, g falls from 0.626 with one abstract to 0.539 with three and 0.530 with five. | The retrieval pipeline, 8 |
A question is answered correctly for the right reason only if its evidence survives three stages in a row, so end-to-end accuracy factors into three shares, each measured apart and each with its own fix (the towers of Fig. 1 are these shares as counts):
A = rK × pk|K × g = 0.989 × 0.957 × 0.539 = 0.511
rK: share whose evidence is in the first stage's top K (here K = 30: 186 / 188), fixed by chunking, hybrid search, rewriting or a larger K. pk|K: of those, share the reranker keeps in the top k that reach the prompt (k = 3: 178 / 186), fixed by a better reranker or a larger k. g: of those, share the generator answers correctly and cites (96 / 178), fixed by the model, the prompt and the context format. On this run the generation bucket is 82 of 92 failures: no retrieval change can buy more than 10 answers, while the oracle run (gold abstracts only, 112 of 188) shows how much a better prompt or model could. One accuracy number (96 of 188) would hide that every one of the 59 CONTRADICT claims that reached the prompt was answered wrongly: the 1.7 B model never said CONTRADICT with abstracts in front of it. To debug one bad answer, ask first "was the evidence in the prompt?", then "was it in the top K?". The method, the golden set (a few hundred real labelled questions, knobs chosen on a tuning split: here 809 training claims, 300 test claims reported once) and the citation check are The retrieval pipeline section 9.
Two recalls, often confused. ANN recall asks how much of the exact top 10 an index returned: it needs no labels and measures only the index. Retrieval recall asks how many labelled relevant documents are in the top 10: it measures the embedding model first and the index second. The index loses relevant abstracts at about the rate it loses any neighbour (IVF with 8 cells: ANN 0.901, retrieval 0.779 against 0.761 expected from 0.901 × 0.845) measured, and a perfect index cannot lift retrieval above the model's 0.845 (exact search finds a labelled abstract in the top 10 for 84.5% of claims). Tune the index on the first; judge the system on the second.
Everything above is a fixed pipeline: the engineer decided in advance to search once, with the user's words, and to pass the top k on. Naive RAG embeds the question, takes the top k and generates; advanced RAG adds the designer's rewrite, hybrid, filter and rerank stages; agentic retrieval lets the model decide at run time, with search as a tool it may call zero or more times with queries it writes itself (the reason-then-act loop of ReAct; "deep research" products are the same loop with a budget of minutes). Moving the decision is the axis the remaining children differ on. The first four steps are measured on 200 two-hop HotpotQA questions (F1, the bars of Fig. 2); the last three answer other questions and have their own numbers.
Fig. 2: seven places the decision can live
Why long context does not replace retrieval: every query pays for every token. With illustrative prices of $3 per million input tokens, $0.30 cached and $15 output, a 1-million-token corpus, a 500-token question and a 500-token answer, RAG with 10 chunks of 400 tokens costs $0.021; the whole corpus in the window $3.009 uncached (143 times) and $0.309 cached (15 times) derived. Prefill alone takes seconds (Qwen3-1.7B needs 9.3 s for 7,611 prompt tokens here). Long context wins for a small corpus read once; retrieval wins on cost, latency, scale beyond the window and per-user access control, and the two compose: retrieve, then read generously. The shape transfers to frontier models (loops pay only when the model can plan searches); the absolute F1 of small local models does not. KV-cache sizing and effective context are Long context.
Once users arrive the system is judged on what no notebook evaluation measures, and every fix that holds lives in the index and the search, not the prompt. One line each; RAG in production owns them all.
| Concern | The lesson, measured |
|---|---|
| Freshness | The lag from a source change to a searchable chunk is a sum (detect, queue, parse, embed, write, visible), and the slowest term is usually not the one people tune. How documents are chunked decides what a revision costs: on ten revised arXiv papers whose revisions changed 15.0% of the words, fixed 200-word windows re-embedded 75.8% of the words, structure-aware chunks 49.2%. |
| Model upgrades | The vectors of two models cannot share an index even at the same dimension: halfway through a backfill from MiniLM to bge-small, nDCG@10 falls to 0.374 to 0.379 from 0.645 and 0.713. Build the new index beside the old one, then switch. |
| Access and tenants | Filter by tenant and permission inside the search (section 1), then check the engine's plans: with prepared statements PostgreSQL reused one generic HNSW plan across users and a user allowed 2.1% of the corpus got 0.96 rows of 10. |
| Latency | Time the whole request, under the real sharing of hardware: embedding the query took 49 ms alone and 428 ms inside the full request, because three models share one GPU; the whole request 2,981 ms, of which 2,114 ms the generator's first token. |
| Caches | A prompt (prefix) cache is safe and large (4,149 ms for the first call, 73 ms after); a semantic answer cache breaks on near-duplicates with opposite meanings: at a threshold of 0.95, 57% of hits returned the opposite claim's answer. |
| Cost | $0.0012 per query at list prices for a hosted stack (1 million queries a month), generation 62% and reranking 36%: the reranker reads 30 passages where the generator reads 5. |
| Injection | Retrieved text is read as text: an instruction planted in a public document was followed in 6 of 6 cases with a plain prompt. Defences are Agent security's. |
A retrieval system is a stack of separate choices: a parser, a framework or your own code to chunk and wire the steps, an embedding model, an ANN index inside a vector store (or a library such as FAISS), a keyword engine, a reranker and an evaluation tool. A vector store wraps an index with storage, metadata and filtering. The Tool map is a dated atlas of each layer (owner, licence, latest release, status, the algorithm it actually runs, when to choose it), a "which store" chooser and a timeline. Its measured lesson: the defaults differ more than the algorithms. Given the same SciFact bge-small vectors and nothing changed, hnswlib (ef 10) returns 0.876 of the exact top 10, FAISS IVF (nprobe 1) 0.420, LanceDB's default IVF_PQ index about 0.59, Chroma 0.996 to 0.998, and Qdrant's local mode and Milvus Lite 1.000 because they never build an index; one knob each recovers nearly everything. Framework defaults bite the same way: LlamaIndex returns 2 chunks unless told otherwise, and LangChain's text splitter cuts 4,000 characters while MiniLM reads only its first 256 tokens.
In one line each: pgvector when the data already lives in PostgreSQL and fits one server; Qdrant, Weaviate or Milvus as dedicated engines with in-graph filtering and built-in hybrid search; Elasticsearch or OpenSearch when BM25 is already there; FAISS as a library for experiments and exact baselines; a managed service when nobody can operate a database. For models, shortlist open ones you can measure locally (Qwen3-Embedding, bge, gte) against hosted ones (OpenAI, Gemini, Voyage, Cohere) on your own golden set; for evaluation, ranx or pytrec_eval for retrieval metrics, and RAGAS, DeepEval or TruLens for judged ones, by way of RAG and retrieval evaluation.
This page gives the map and the comparisons across the whole stack; eight child pages own the depth, each measured on the same running example. In the order of a question's path:
Neighbours: Search and vector databases (the engine view of the same structures, under Topic: databases), RAG and retrieval evaluation (retrieval and judged RAG metrics), Context engineering (what to keep in an agent's window, and agent memory), Contrastive and self-supervised learning (InfoNCE in general).
A retrieval system is a stack of separate choices: something that splits documents and wires the steps together (a framework), a model that turns text into vectors (an embedding model), a structure that finds the nearest vectors fast (an ANN index, approximate nearest neighbour), usually wrapped in a vector store that also keeps the text and metadata, a keyword engine (BM25), a second model that re-scores the shortlist (a reranker), and tools that evaluate the result. This tab is a dated atlas of the tools at each layer as of 13 October 2026: who owns each one, its licence, its latest release, whether it is alive, what algorithm it actually runs (read in source or docs, not from marketing pages), and when to choose it.
The database-engine side of the same structures (how pgvector stores HNSW pages, what a filter does to a graph, measured pgvector curves, when to stay in Postgres) belongs to Search and vector databases; this tab does not repeat it and agrees with it. How each index works is taught on Vector indexes from the inside; judged RAG metrics belong to RAG and retrieval evaluation.
Read from the top: a question arrives, a framework (or your own code) splits and wires; the embedding model and BM25 turn the question into something searchable; the index finds candidates; a reranker or late-interaction model orders them; an evaluation tool tells you whether any of it worked. Click a layer to filter the atlas below to it.
Every card is one tool. Filter by layer, licence, how it is deployed and status; click a card for the details and the sources. "Latest" is the newest stable release on PyPI or GitHub as read on 2026-10-13; for open-weight models it is the date the model card was last revised; for hosted APIs it is the date the docs were read.
Measured on Apple M1 Pro, CPU, 2026-10-13, one thread where the library allows, versions: . The two servers ran in Docker (pgvector/pgvector:pg17, qdrant/qdrant:v1.19.2) on 2026-10-14; recall only, no timing. Scripts src/map/defaults_real.py and defaults_compact.py; vectors from the setup agent (sha256 of corpus.npy recorded in src/map/inputs/defaults_real.json). Chroma and pgvector build their graphs with several threads and LanceDB seeds k-means randomly, so those three move slightly between runs (two runs each: Chroma 0.998 and 0.996, pgvector 0.988 and 0.985, LanceDB IVF_PQ 0.598 and 0.591); the rest repeated exactly. A small corpus: at millions of vectors every index loses more, and the knobs matter more.
Here is the claim from the top of the tab, measured. Take the running example's real vectors: the 5,183 SciFact abstracts and the 300 test questions, each turned into a 384-number vector by bge-small-en-v1.5. Give exactly the same vectors to ten libraries and two servers (pgvector and Qdrant in Docker), change nothing, and ask each for the 10 nearest abstracts. Exact search (compare the question with every abstract) defines the right answer; each tool's ANN recall@10 is the share of those 10 it returned. This is the index's recall, not the retrieval's: it asks whether the tool found the true nearest vectors, whatever their relevance. Relevance is the second number, nDCG@10 against SciFact's human labels (a ranking score from 0 to 1 that rewards relevant abstracts near the top; defined on the Reading tab).
The animation: one question through every tool, one step per tool
What it shows. Besides the reference (FAISS Flat), three tools are exact at their defaults: Qdrant's Python client in local mode and Milvus Lite never build an index (they scan), and LanceDB scans until you call create_index(); on a collection this small the Qdrant server scans too (box below). pgvector's HNSW with its default ef_search 40 sits with the other graph indexes. The graph indexes (Chroma, USearch, FAISS HNSW, hnswlib) are close but not exact, and the gap is the search-breadth knob: hnswlib ships ef = 10 and FAISS efSearch = 16, Chroma ef_search = 100. The cluster indexes lose most: FAISS IVF (72 clusters here, the common square-root-of-N choice; FAISS has no default for it) searches only the nearest cluster by default (nprobe 1), and LanceDB's default IVF_PQ compresses each vector, so the ranking inside the shortlist is approximate too. One knob each recovers nearly everything, which is why "we tried X and recall was bad" usually means "we did not set the knob".
indexing_threshold (10,000 KB), and with the graph built its planner still scans any segment under full_scan_threshold (10,000 KB), so all 5,183 vectors were searched exactly. Only with both lowered did the graph answer (0.996 at the default search breadth, 0.925 at hnsw_ef 16). Small test collections hide the index you will run in production. Qdrant's QdrantClient(":memory:") and Milvus Lite are for development. Both scan every vector, so their recall is perfect and their speed says nothing about the server's index. Milvus Lite even reports HNSW from describe_index after you ask for it, while returning flat-scan results (measured above in the atlas card). Benchmark the server you will run.| Tool and setting | Index actually built | ANN recall@10 | nDCG@10 | recall@10 (labels) |
|---|
Choosing a store is mostly choosing an operating model, not an algorithm. Answer six questions; the chooser ranks the stores in the atlas with the reasons that moved each one, every reason linked to the card that sources it. The rules are rules of thumb written for this page from the atlas facts (they are not a benchmark): read the reasons, then measure your top two on your own data, at your own recall target, the way the section above does. For the database-engine side of "stay in Postgres or not", the Search and vector databases page has the memory arithmetic and the measured pgvector curves.
Paper dates are arXiv first versions (checked against the arXiv API by src/map/gen_data.py); release dates are GitHub release publication dates, PyPI upload dates or the project's changelog; every event links its source. "Latest release" is the newest stable version on PyPI or a GitHub release as read on 2026-10-13 (model cards: last revision; hosted APIs: the docs read date, shown hollow).
The field moved in three waves: the index algorithms (HNSW 2016, FAISS 2017, DiskANN 2019), then the retrieval models and benchmarks (ColBERT, RAG and BEIR in 2020 and 2021, MTEB in 2022), then the products (every store added HNSW, hybrid search and quantisation between 2023 and 2026). The animation plays the years, one step each (the list below); tap a dot for its source. The second view sorts every tool in the atlas by the date of its latest release, which is how "quiet" projects show up.
The animation: one step per year
Every embedding model is sold with a leaderboard number. Know what it is before trusting it. BEIR (2021) is 18 retrieval datasets used zero-shot: the model is tested on domains it was not trained for, scored by nDCG@10. MTEB (2022) widened this to 8 task types and 58 datasets, of which retrieval is one type; the headline is an average of each task's main score (nDCG@10 for retrieval). MMTEB (2025) grew it to more than 500 tasks in 250+ languages and added smaller benchmarks, among them the English benchmark the leaderboard shows today, MTEB(eng, v2): .
| Model (mteb metadata) | Parameters | Zero-shot, all 41 tasks | Zero-shot, 10 retrieval | Retrieval tasks it trained on | BEIR-family data declared |
|---|
measured computed on 2026-10-13 with mteb : ModelMeta.zero_shot_percentage and is_zero_shot_on over MTEB(eng, v2), and get_training_datasets() (which follows a model's adapted_from chain). It reflects what each model's authors declared to MTEB; a model that declares nothing would look 100% zero-shot. "BEIR-family data" lists any declared dataset whose name starts with a BEIR task (for example NQHardNegatives counts as NQ). Script: src/map/checks_frameworks.py.
| nDCG@10, test split | SciFact published | SciFact here | NFCorpus published | NFCorpus here | Published by |
|---|
measured "here" is the running example's shared baseline, computed by the setup agent with pytrec_eval on 2026-10-13 (see the root's src/data/README.md); the Tool map's own exact bge-small run gives the same SciFact value. Every embedding model lands within 0.005 of its published number; BM25 differs more because BEIR used Elasticsearch's analyser and here it is bm25s.
src/map/checks_stores.py, synthetic vectors); the defaults experiment on the running example's real vectors (defaults_real.py); framework defaults read from the installed source (checks_frameworks.py); mteb zero-shot metadata.published_at; the Atom feeds were not used for dates because their "updated" field changes when a release note is edited: hnswlib v0.9.0 shows 2026-09-13 there but was published 2026-03-28), Hugging Face model API (licence tag, revision, parameters from safetensors metadata), arXiv API. Raw records are in src/map/inputs/; gen_data.py re-checks every timeline date against them.The tabs of this page, its eight child pages, the knowledge base pages it leans on and the best outside resources, each with an approximate time (knowledge base pages: the reading time each page's header states). Links checked on 2026-10-14.
The map: one question's path with the page that owns each stage, four ways to score a passage compared, the lesson of each stage, where an answer gets lost (A = r × p × g on 188 real claims) and the two recalls, who decides what to read, what changes after launch, the tools. Reading: 21 min, plus 1 in closed details.
A dated atlas of stores, models, rerankers, frameworks, GraphRAG and evaluation tools; the defaults each ships, measured on the same vectors; a store chooser; a timeline; reading MTEB and BEIR. 19 min, plus 2 in closed details
The Pipeline lab, Vector search lab and Agentic lab tabs were retired on 2026-10-24: every stage they measured is now taught, with those runs, on the child page that owns it (below). The runs themselves stay in this page's src/pipe, src/vec and src/agent, which the children read.
Parsers on real papers and what each loses, OCR, tables, figures and other formats, metadata, re-indexing after revisions, page-image retrieval with ColPali-style models; a Parser viewer tab. Reading: 28 min, plus 8 in closed details.
Chunking with the real LangChain splitters, BM25, fusion, query rewriting and routing, filters, duplicates, prompt assembly and citations, measuring a pipeline and where an answer is lost. Reading: 47 min, plus 35 in closed details.
Pooling, the contrastive loss, hard and false negatives, a real fine-tune, prompts, Matryoshka and quantised embeddings, long inputs, domains and languages, MTEB, choosing a model. Reading: 30 min, plus 12 in closed details.
Every index family built and measured, HNSW ported line by line from hnswlib, Vamana from its paper, filtered search and ACORN, deletes, memory and scale; a Frontier tab on 522,931 vectors. Reading: 39 min, plus 15 in closed details.
Cross-encoders, training and distillation, rerank depth and latency, evaluating a reranker, calibration, LLM rerankers, ColBERT, MaxSim and PLAID, learned sparse (SPLADE); a Depth chooser tab. Reading: 34 min, plus 8 in closed details.
Retrieval as a tool, the second hop, loops and their token cost, evaluators and routers, trajectories, deep research, long context against retrieval, retrieval over an agent's own reads; Trajectory comparer and Long-context calculator tabs. Reading: 35 min, plus 20 in closed details.
Extraction and entity resolution, communities, GraphRAG's search modes, cheaper graphs and personalised PageRank, multi-hop measured, text-to-SQL, tables and Cypher; a Cost calculator tab. Reading: 40 min, plus 21 in closed details.
Freshness, model upgrades, deletes, access control and tenants, the latency budget, caches, cost per query, monitoring, injection, recurring failures; a Cost calculator tab. Reading: 37 min, plus 11 in closed details.
The database-engine view of the same structures: postings storage, BM25 and HNSW inside PostgreSQL, when to stay in Postgres. 33 min, plus 13 in closed details
Every retrieval metric with a calculator on real runs, the judged RAG metrics and their tools; where the old "RAG evaluation" child was merged. 27 min, plus 4 in closed details
Before trusting a faithfulness score: judge biases and calibration against hand labels. 29 min, plus 7 in closed details
How to evaluate an agentic retrieval loop by its trajectory. 30 min, plus 6 in closed details
InfoNCE and contrastive losses in general, the theory behind embedding training. 31 min, plus 8 in closed details
The subword tokens models read, as distinct from BM25's search terms. 46 min, plus 15 in closed details
What to put in the window once retrieval has found it, and agent memory: fact stores, temporal graphs and the memory-layer libraries (Mem0, Graphiti, Letta); the old Agent memory layers page is now part of it. 39 min, plus 25 in closed details
How long-context claims are tested (needle tests, NoLiMa and the rest). 27 min, plus 4 in closed details
Where a RAG system's wiring usually lives. 28 and 35 min, plus 3 and 10 in closed details
The loop that calls retrieval as a tool. 24 min, plus 3 in closed details
Serving the generator: prefill, prefix caching, llama.cpp and MLX, used for every generator run here. 29 and 41 min, plus 3 and 53 in closed details
The engine side of stores, and how retrieval-sensitive scores (Astra for Law) are read. 27 and 21 min, plus 1 and 6 in closed details
Dot products, norms and projections behind every similarity here. 45 min, plus 13 in closed details; dip into the vectors part
Lewis et al. 2020, the paper that named the pattern. 19 min, plus 1 in closed details
The reason-then-act loop that agentic retrieval instantiates. 21 min, plus 3 in closed details
A second model deciding when to remind an agent; corrected against the paper. 27 min, plus 2 in closed details
Curating memory when the task arrives; where the gain really comes from. 19 min, plus 3 in closed details
The textbook: inverted indexes, TF-IDF, evaluation (chapters 1, 2, 6, 8). about 3 h for those chapters
The zero-shot retrieval benchmark the running example's SciFact and NFCorpus come from; why BM25 is a strong baseline. 45 min
The bi-encoder with in-batch negatives that started modern dense retrieval. 40 min
How a current open embedder and reranker are trained: synthetic pairs, filtering, merging. 40 min
Filter by the retrieval tasks closest to your domain; read the zero-shot column. 10 min to explore
The layered graph index, with the neighbour-selection heuristic that does the real work. 45 min
The vector-search toolkit's design space: IVF, PQ, HNSW, and how to choose. 60 min
int8 and binary quantization with rescoring, measured. 15 min
Two pages behind RRF and k = 60. 10 min
Context written per chunk, with BM25 and a reranker; vendor numbers. 15 min
Search with a generated answer instead of the question. 30 min
The controlled pipeline against agent comparison, quoted on Agentic retrieval, long context and memory. 45 min
Retrieval interleaved with reasoning, and a router that decides how much to retrieve. 40 and 30 min
The GraphRAG pipeline and its global search. 45 min
The two cheaper graph variants; the first is vendor claims. 12 and 40 min
Position and literal-match effects in long contexts. 30 min each
The head-to-head study, quoted on Agentic retrieval, long context and memory. 45 min
HNSW and IVFFlat in PostgreSQL, filtering and iterative index scans. 30 min