Repository navigation
04 Retrieval and Ranking Math
The formulas that decide which documents an agent ever gets to read. If retrieval misses a document, no reasoning model can recover it.
For term
Intuition: frequent in the document, rare in the corpus ⇒ informative. Reference: Manning et al., IIR ch. 6.
The workhorse lexical ranker (Robertson & Zaragoza, 2009):
Link-based authority (Page, Brin, Motwani & Winograd, 1999). With damping
It is the stationary distribution of a random surfer who follows a link with probability
Encode query and passage into vectors; score by dot product (DPR, Karpukhin et al. 2020):
Late-interaction alternative: ColBERT, Khattab & Zaharia 2020.
Cosine similarity:
Combine rankers without calibrating scores (Cormack, Clarke & Büttcher, 2009):
This is exactly the problem a metasearch engine like SearXNG faces when merging engines (5).
Unique yield per page:
Planned for Stage 2 (21); not yet measured.
Worked example from measured data — mean page yield (pages 1–15):
Q1. Why does BM25 saturate term frequency?
Because the fraction
Q2. Two runs return 200 and 180 URLs with 150 in common. What is $J$ ?
Q3. Why use RRF instead of averaging scores?
Scores from different engines are on incompatible scales; ranks are comparable. RRF uses only ranks.
Q4. What is $PR(u)$ when $d=0$ ?
← Prev 3. Anatomy · Next → 5. Metasearch & SearXNG
Web Search Engine Pipeline Wiki · evidence snapshot 29 Nov 2026 · measured results are from the project's GitHub Actions runs; third-party figures are cited inline and listed in References.
Part I · Mission
Part II · Search Ecosystem
Part III · LLMs Meet the Web
- 6. Parametric vs Retrieved Knowledge
- 7. Agentic Search Architecture History
- 8. How Major Assistants Search
- 9. Search APIs for Agents
- 10. Agentic Browsing & Computer Use
Part IV · Simulation Lab
- 11. Simulation Strategy on GitHub Actions
- 12. Experiments & Measured Results
- 13. Reliability & Failure Taxonomy
- 14. Simulation vs Real Infrastructure
Part V · The Machine-Majority Web
- 15. Bot Traffic & AI Crawlers
- 16. Detection, Blocking & Monetisation
- 17. Detection Gaps
- 18. AI-Generated Content & the Info Ecosystem
- 19. Industry Adoption & Use Cases
Part VI · Future
Appendix