Learning to rank
LTR · LambdaMART
Training a model to order results from labeled examples, combining many signals such as BM25, vector similarity, freshness and clicks into one ranking.
Related techniqueGlossary entry
On this page
Learning to rank (LTR) trains a model to order search results. Instead of hand-picking a formula such as “BM25 plus twice the vector score”, you describe each (query, document) pair with features and let training find how to combine them.
Features might include the BM25 score, the vector similarity, whether the query words appear in the title, document age and past click-through. The training data is a set of queries with relevance judgments: for “How far above our margin target are we?”, q3-earnings-memo.pdf p.3 is marked highly relevant and charter-agreement.pdf p.2 marginal.
There are three classic training styles:
- Pointwise: predict each document’s relevance grade on its own.
- Pairwise: learn which of two documents should rank higher. RankNet works this way.
- Listwise: optimize a measure of the whole ranking, such as nDCG. LambdaMART, a gradient-boosted tree method, approximates this and was long a standard choice in web search.
Neural cross-encoders are trained with the same pointwise, pairwise and listwise ideas, but they read raw text instead of hand-built features.
The gotcha
The model learns whatever the labels teach. Few or biased judgments produce a ranker that is confidently wrong, and click data carries position bias: people click the first result because it is first. A learned ranker also needs retraining when the corpus, the features or user behavior shift. Compare it against simple baselines, such as RRF, on held-out queries before trusting the gain.
DocSlurp does not train a ranking model. It fuses retrievers by rank with RRF and can rerank with BM25 or a pretrained hosted reranker (core/server/src/search/session-execution.ts). Project boosts and ranking rules are set by hand (core/server/src/services/search-controls.ts).
In DocSlurp
Related technique
DocSlurp does not train a ranking model on its own signals. It fuses lists with RRF and can rerank with BM25 or a pretrained hosted reranker (core/server/src/search/session-execution.ts); project boosts and ranking rules are hand-set (core/server/src/services/search-controls.ts).