Chapter 11
Information Retrieval and RAG: Find Evidence Before You Generate
Chapter: Information Retrieval and RAG, in Daniel Jurafsky and James H. Martin, Speech and Language Processing, 3rd edition draft, August 19, 2026.
Topics to learn
Page numbers refer to the linked chapter PDF.
- Ranked retrieval p. 3
- Documents as vectors p. 4
- TF-IDF and BM25 p. 5
- Scoring a query against a document p. 7
- Inverted indexes p. 9
- The first-stage candidate list as a recall ceiling p. 10
- Retrieval evaluation p. 10
- Precision, recall, and rank-aware measures p. 10
- Why a reranker cannot recover a document the first stage dropped p. 16
- Dense retrieval p. 13
- Learned encoders p. 13
- Why a dense score and a BM25 score are not the same confidence scale p. 13
- Retrieval-augmented generation p. 16
- Putting retrieved text into the prompt p. 16
- Datasets p. 18
- Evaluating the answer separately from the retrieval p. 19
- Citations versus support p. 17
FAQ
Can a perfect reranker repair a missing document?
No. It can only reorder what the first stage returned. If the relevant document was never a candidate, later ranking cannot create it.
Does a citation show that an answer is grounded?
No. The cited passage has to support the specific claim. A pointer is not the same as support.
Is a dense score of 1.04 more confident than a BM25 score of 0.92?
No. They come from different functions. Compare ranks and task metrics under one protocol, not the raw magnitudes.
What does an inverted index avoid?
Scoring every document for a query term that does not occur in it. It stores, for each term, the documents that contain it.