LeanExplore Bench: A Benchmark for Lean 4 Declaration Search
Lean search engines are usually evaluated on benchmarks their own authors designed, so reported numbers are hard to compare. Those benchmarks also label a single correct answer per query, even though several Mathlib declarations often serve equally well.
LeanExplore Bench has 3,200 queries about Mathlib, split evenly across four buckets: names and keywords, natural language, formal statements and proof states, and questions derived from Lean Zulip threads. Language models wrote the queries from Mathlib declarations and Zulip threads, except the 160 name queries, which a program generated. Engines' returned results were graded so that a query can have several correct answers. Four hosted engines, a BM25 baseline, and Lumen (LeanExplore's development version) were scored by MRR@10.
On the test split, Lean Finder scores 83.4, LeanSearch 73.6, Octo Search 67.0, LeanExplore 48.4, and BM25 31.4. Lumen scores 92.5, but it was designed on the benchmark's development split and searches the descriptions the query writer saw. Counting additional correct answers raises the hosted engines' scores by 8 to 12 points.
| Engine | Benchmark score |
|---|---|
| Lean Finder | 83.4 |
| LeanSearch | 73.6 |
| Octo Search | 67.0 |
| LeanExplore | 48.4 |
| Lumen (dev) | 92.5 |
