← All papers
First page of LeanExplore Bench: A Benchmark for Lean 4 Declaration Search

LeanExplore Bench: A Benchmark for Lean 4 Declaration Search

Justin Asher, Pietro Pellegrino

cs.LG Nov 30, 2026 · v1 cs.AI cs.IR cs.LO
Builds a 3,200-query benchmark for search engines over Lean 4 Mathlib declarations and evaluates hosted Lean search engines on it.
We present LeanExplore Bench, a benchmark for search engines that index Lean 4 declarations. It consists of 3,200 queries about Mathlib, split evenly across four types of query: names and keywords; natural language; formal statements and proof states; and questions derived from Lean Zulip threads. Every query is paired with one or more Mathlib declarations that answer it. We report scores for four hosted engines, a BM25 baseline, and Lumen, the development version of LeanExplore. Among the hosted engines, Lean Finder leads with an MRR@10 of 83.4, ahead of LeanSearch at 73.6, Octo Search at 67.0, and LeanExplore at 48.4. Lumen, which we designed on the benchmark's development split and which searches the descriptions that the query writer saw, scores 92.5. A query often has correct answers beyond the declaration it was written for, and counting them raises the scores of the hosted engines by 8 to 12 points. The dataset and the code are public.

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.

EngineBenchmark score
Lean Finder83.4
LeanSearch73.6
Octo Search67.0
LeanExplore48.4
Lumen (dev)92.5
Benchmark score (MRR@10, test split)