RankEvolve: Automating the Discovery of Retrieval Algorithms via LLM-Driven Evolution
Organizations: Santa Clara University, Santa Clara, CA, USA · Independent Researcher, Bothell, WA, USA · Walmart Global Tech, Sunnyvale, CA, USA
Abstract
Retrieval algorithms like BM25 and query likelihood with Dirichlet smoothing remain strong and efficient first-stage rankers, yet improvements have mostly relied on parameter tuning and human intuition. We investigate whether a large language model, guided by an evaluator and evolutionary search, can automatically discover improved lexical retrieval algorithms. We introduce RankEvolve, a program evolution setup based on AlphaEvolve, in which candidate ranking algorithms are represented as executable code and iteratively mutated, recombined, and selected based on retrieval performance across 12 IR datasets from BEIR and BRIGHT. RankEvolve starts from two seed programs: BM25 and query likelihood with Dirichlet smoothing. The evolved algorithms are novel, effective, and show promising transfer to the full BEIR and BRIGHT benchmarks as well as TREC DL 19 and 20. Our results suggest that evaluator-guided LLM program evolution is a practical path towards automatic discovery of novel ranking algorithms.
Figures & tables
| BRIGHT | BEIR | TREC DL | ||||
| Method | nDCG@10 | R@100 | nDCG@10 | R@100 | nDCG@10 | R@100 |
| BM25 ( Robertson and Zaragoza, 2009 ) | 10.55 | 32.11 | 48.16 | 70.95 | 62.16 | 46.02 |
| BM25+ ( Lv and Zhai, 2011b ) | 9.72 | 31.54 | 45.71 | 69.93 | 61.07 | 46.69 |
| BM25-adpt ( Lv and Zhai, 2011a ) | 11.05 | 34.67 | 44.62 | 69.55 | 60.90 | 48.23 |
| BM25 ⋆ | 11.79 † | 37.51 † | 47.90 | 72.43 † | 64.57 † | 47.10 |
| QL-Dir ( Zhai and Lafferty, 2004 ) | 9.52 | 32.48 | 44.15 | 68.72 | 57.03 | 46.69 |
| BRIGHT | BEIR | TREC DL | Optimization Target | |||||
| Code Structure | nDCG@10 | R@100 | nDCG@10 | R@100 | nDCG@10 | R@100 | Seen (12 datasets) | Unseen (16 datasets) |
| Original (step 0) | 10.55 | 32.11 | 48.16 | 70.95 | 62.16 | 46.02 | 40.30 | 49.77 |
| Constrained (step 115/200) | 11.36 | 34.68 | 48.27 | 70.75 | 61.86 | 45.44 | 42.87 | 50.47 |
| Composable (step 185/200) | 11.97 | 37.27 | 46.95 | 70.30 | 63.07 | 48.62 | 43.31 | 51.33 |
| Freeform (step 177/200) | 11.39 | 36.92 | 46.87 | 71.27 | 61.17 | 45.40 | 44.35 | 51.20 |
| Freeform (step 293/300) | 11.79 | 37.51 | 47.90 | 72.43 | 64.57 | 47.10 | 44.58 | 52.22 |
| Method | Indexing (ms/doc) | Query (ms/query) |
| BM25 | 1.79 | 56.72 |
| BM25 ⋆ Constrained | 1.85 | 58.50 |
| BM25 ⋆ Composable | 1.77 | 111.49 |
| BM25 ⋆ Freeform (step 177) | 2.37 | 171.52 |
| BM25 ⋆ Freeform (step 293) | 2.81 | 648.89 |
| QL-Dir | 2.02 | 178.26 |
Information Retrieval
Information Retrieval studies how to find, rank, and organize relevant information in large collections of data.
See all 454 papers