Topic: rag-and-retrieval

How a system finds the right passages and answers from them: the stages from a document to a cited answer, how the ways of scoring a passage compare, where an answer gets lost, who decides what to read, and what changes after launch. A map with eight child pages; measured on an Apple M1 Pro with open models and public datasets, published results kept apart. Data as of October 2026. Reading: 21 min, plus 1 in closed details.

The idea in one screen

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

  1. Parse the documents. Index time, once per document: PDFs, HTML and office files become text, and the parser decides what can ever be found (MinerU keeps 94 of 107 evidence paragraphs intact; section 3). Document ingestion and multimodal retrieval.
  2. Cut them into chunks. A chunk is indexed on its own and is what retrieval returns; splitting on blank lines first keeps the evidence paragraph whole for 838 of 892 QASPER questions, fixed windows for 607. The retrieval pipeline, section 1.
  3. Embed and count terms, then index. Each chunk becomes a vector (an embedding model) and a row of term counts (BM25's postings lists); the vectors go into an ANN index, where HNSW returns 0.991 of the exact top 10 on SciFact. Embedding models; Vector indexes.
  4. A question arrives; rewrite it if it needs it. Query time, once per question: a chat follow-up becomes a standalone question; HyDE lifts Qwen3-Embedding from 0.700 to 0.718 on SciFact. The tower is the 188 SciFact claims with annotated evidence that the next three steps follow. The retrieval pipeline, section 5.
  5. First stage: search both indexes, fuse. BM25 and dense search run side by side with the filters inside each, and their lists merge by reciprocal rank fusion into a shortlist of 30: 186 of the 188 claims have their evidence in it. The retrieval pipeline, sections 2 to 6.
  6. Rerank the top 30. A cross-encoder reads the question with each candidate and keeps the best 3: 178 kept. Rerankers and late interaction.
  7. Prompt, generate, cite. The top 3 abstracts go into the prompt with their ids; the generator gives the right label and cites an evidence abstract for 96 of 188. The tallest drop is here, at generation (section 4). The retrieval pipeline, sections 8 and 9.
  8. Around the path. Three axes the other children own: who decides what is read (the model in a loop, a router, nobody), on Agentic retrieval, long context and memory; structure built before the question (a graph, a table), on GraphRAG and structured retrieval; and what changes once users arrive (freshness, access, latency, cost), on RAG in production. Sections 5 and 6.

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

first stage: the search over the whole corpus that keeps a shortlist of K candidates.
reranker: a slower model that re-scores only the shortlist.
generator: the language model that writes the answer from the top k passages.
chunk: a piece of a document indexed on its own; the unit retrieval returns.
BM25: the standard keyword score over an inverted index (each term's list of documents).
bi-encoder: an embedding model that encodes query and document separately, so document vectors are computed ahead of time (dense retrieval).
cross-encoder: a model that reads query and document together and outputs one score; accurate, nothing to precompute.
hybrid search: BM25 and dense search run side by side and their lists merged, usually by reciprocal rank fusion (RRF: each list adds 1 / (60 + rank)).
ANN index: approximate nearest-neighbour search that reads a small part of the vectors and sometimes misses a true neighbour.
recall@K: the share of a question's relevant passages in the top K; with one relevant passage, "found or not".
nDCG@10: a 0 to 1 score of how high the relevant passages sit in the top 10 (each earns its grade divided by log2(rank + 1), normalised by the best possible order).
golden set: real questions, each with the passages a human marked as answering it.

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.

1. Why retrieve at all

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 buysMeasured hereOwner
GroundingClosed 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
UpdatingNew 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
CitingThe 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 controlOnly 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 corpus can matter more than the model (a vendor case, and why its number says little)

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.

2. Four ways to score a passage, and hybrids of them

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.

ScorerStored per SciFact abstractWork per candidate at query timeSciFact nDCG@10Owner
BM25 (words)term counts in postings listsa sum over shared terms; 0.25 ms a query, no model0.679The retrieval pipeline, 2
Learned sparse (SPLADE)about 239 weighted vocabulary termsa sum over shared terms0.708in-domainRerankers 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.645Embedding models
Late interaction (ColBERT)236 token vectors of 96, 45,245 bytesMaxSim, about 1.4 MFLOP0.7430.758 rerankingRerankers and late interaction, 8
Cross-encoder (reranker)nothinga full forward pass: 8.9 GFLOP (MiniLM) to 416 (Qwen3-Reranker)0.782reranking the hybrid top 20Rerankers and late interaction, 2 to 5
Hybrid (BM25 + Qwen3-Embedding, RRF)both indexestwo searches, then fusion by rank0.724The 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:

  • Words and vectors miss different things. BM25 finds exact names (identifiers, gene names, error codes) and fails on paraphrase: an abstract that says "lowers LDL" never matches "decrease cholesterol"; embeddings find the paraphrase. So hybrid search is the default first stage, but it is not always better: equal-weight RRF helps a dense model about as good as BM25 that disagrees with it (MiniLM 0.645 to 0.713, Qwen3-Embedding 0.700 to 0.724) and hurts the two that clearly beat BM25 (gte-modernbert 0.767 to 0.763, ColBERT-small 0.743 to 0.731): equal weight gives the weaker list the same say. A weight chosen on SciFact's training claims (z-score fusion) reaches 0.739 for Qwen3; picking it on the test claims would claim 0.744, a leak.
  • A reranker helps only when it is stronger than the first stage. Qwen3-Reranker-0.6B lifts the fused list from 0.724 to 0.782 at K 20; the small MiniLM cross-encoder, trained on web search, pulls it down to 0.689 at K 100. Its price is linear in K: at K 30, 155 ms for MiniLM and 6,618 ms for Qwen3-Reranker on this laptop's GPU, batch 1.
  • Model size is not a ranking; your data decides. The 149 M gte-modernbert beats the 0.6 B Qwen3-Embedding on SciFact (0.767 against 0.700), Qwen3 wins NFCorpus, and bge-small (33 M) wins the multi-hop set; every embedding model here lands within 0.005 of its published MTEB number on SciFact and NFCorpus. Shortlist on the retrieval tasks closest to your domain, then measure on a few hundred of your own labelled queries. Scores are not probabilities and not comparable across models, so any threshold is tuned per model.

3. The stages, and the one lesson each taught here

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.

StageThe lesson, measured on the running exampleOwner
ParseOf 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
ChunkOn 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
IndexExact 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
RewriteHyDE (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
FuseSection 2: RRF lifts models close to BM25 and hurts clearly stronger ones; tune any weight on held-out queries.The retrieval pipeline, 4
FilterA 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
RerankSection 2: only a stronger model helps, and its time is linear in the depth K.Rerankers and late interaction
PromptThe 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

4. Where an answer gets lost, and the two recalls

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.

5. Who decides what to read

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

  1. The engineer, in advance: one search, top k. Pays off when the answer is in one or two passages similar to the question. Top 5: 0.402 with Qwen3-1.7B, 0.490 with Qwen3-4B. One search finds the first hop and misses the second: with bge-small at least one gold paragraph is in the top 10 for 199 questions, both for 164. The retrieval pipeline.
  2. The model, at every step (agent loop). Pays off on multi-hop and exploratory questions, with a model that can plan its next search; it wastes tokens on lookups a single search answers. With the 4B the loop pays: 0.574 against 0.490, +0.084 (paired 95% interval 0.022 to 0.144) for about 3 times the input tokens and seconds. With the 1.7B it does not: 0.411 against 0.402 at 3.3 times the tokens. Each call re-reads everything before it, so tokens grow quadratically with the number of searches. Agentic retrieval, long context and memory, sections 1 to 3.
  3. A router, once, before anything runs. Pays off on traffic mixing questions that need different strategies, when the expensive path really is better on some. A one-line rule sending questions with a comparison word to the agent: 0.444 against 0.402 for always the pipeline (+0.042). Agentic retrieval, long context and memory, section 5.
  4. Nobody: everything in the window (long context). Pays off for a small corpus read once or holistically. The question's own 10 paragraphs (always both gold ones): 0.456 (1.7B), 0.576 (4B); widened to 8,000 tokens of mostly distractors, 0.320 and 0.475 (the bars). Evidence in the middle of a long prompt is used worst. Agentic retrieval, long context and memory, section 8.
  5. The index: structure built before the question (GraphRAG). Pays off on questions about the whole corpus ("main themes") or chains of entities, when the links are real. Published: global search judged more comprehensive than vector RAG's in 72 to 83% of comparisons; indexing the first corpus took 281 minutes with GPT-4-Turbo. For lookups, hybrid search with a reranker is cheaper and at least as good. GraphRAG and structured retrieval.
  6. The database: the data is already a table (text-to-SQL). Pays off on counts, joins and aggregates over every row. The model writes SQL; retrieval moves to the schema: with 5 retrieved tables Qwen3-1.7B gets 56 of 100 Spider questions right, from the question alone 2. GraphRAG and structured retrieval, section 10.
  7. The agent's own history (memory). Pays off for agents that run for hours or across sessions. Retrieval turned inward: the corpus is the agent's own past; deciding what to write, update and expire is the hard part. Context engineering; Agentic retrieval, long context and memory, section 9.

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.

6. After launch

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.

ConcernThe lesson, measured
FreshnessThe 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 upgradesThe 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 tenantsFilter 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.
LatencyTime 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.
CachesA 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.
InjectionRetrieved 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.

7. The tools

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.

8. The child pages

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:

Document ingestion and multimodal retrieval: PDFs, tables, imagesReading: 28 min, plus 8 in closed details.Turning PDFs and other files into text a retriever can use: parsers and what each loses, OCR, tables, figures, metadata, re-indexing after revisions, and retrieving page images directly (ColPali).
The retrieval pipeline: chunking, query rewriting, hybrid search, filteringReading: 47 min, plus 35 in closed details.Every stage around the index: chunking, BM25, fusion, query rewriting and routing, filters, duplicates, prompt assembly and citations, and measuring where an answer is lost (A = r × p × g).
Embedding models: training, choosing and fine-tuningReading: 30 min, plus 12 in closed details.Bi-encoders from pooling to the contrastive loss, hard and false negatives, prompts, Matryoshka truncation and quantised embeddings, MTEB and what it predicts, choosing and fine-tuning.
Vector indexes from the inside: flat, IVF, PQ, HNSW, DiskANN, filtered searchReading: 39 min, plus 15 in closed details.Exact search and its bandwidth limit, IVF, quantisation and PQ, HNSW, DiskANN on SSD, filtered search, deletes, memory formulas and scaling.
Rerankers and late interaction: cross-encoders, ColBERT, LLM rerankersReading: 34 min, plus 8 in closed details.The second stage: cross-encoders, rerank depth and latency, evaluating a reranker, scores and abstaining, LLM rerankers, ColBERT and PLAID, learned sparse retrieval (SPLADE).
Agentic retrieval, long context and memoryReading: 35 min, plus 20 in closed details.When the model drives retrieval: the loop and its token cost, the second hop, iterative methods, evaluators and routers, trajectories, deep research, long context against retrieval, retrieval over an agent's own reads.
GraphRAG and structured retrievalReading: 40 min, plus 21 in closed details.Knowledge graphs built by a model, entity resolution, communities and global, local and DRIFT search, cheaper graphs (LightRAG, HippoRAG), text-to-SQL with schema retrieval, Cypher.
RAG in production: freshness, access control, latency and costReading: 37 min, plus 11 in closed details.Freshness, model-upgrade backfills, deletes, access control and tenants, the latency budget, caches, cost per query, monitoring, injection through retrieved text, recurring failures.

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).