Knowing When to Stop: Bayesian Optimal Stopping for LLM Evaluations
Organizations: UK AI Security Institute, London, UK
Abstract
LLM evaluations often use fixed sampling budgets, testing every item the same number of times even after estimates are precise. We introduce optstop, a precision-based adaptive stopping framework that treats evaluation as a sequential measurement problem: keep sampling where uncertainty remains high, and stop where estimates are precise or stable enough. The framework builds on hierarchical Bayesian inference, supports binary, ordinal, and continuous outcomes, and keeps every benchmark item eligible for sampling, without requiring a calibrated item bank. It runs live or retrospectively, and includes a safeguard that samples more cautiously as measured performance approaches zero, where rare successes matter most. In an illustrative 200-item, 10-epoch evaluation, it removes 57%-97% of planned trials across nine validation settings, with overall conclusions equivalent to the full run. These results show that LLM evaluation compute can be allocated by uncertainty rather than by fixed repetition counts, with the magnitude of savings depending on evaluation design.
Figures & tables
| Binary | Ordinal | Continuous bounded | |
|---|---|---|---|
| Scores | 0/1 (correct/incorrect) | Ordered categories (e.g., 0–10 rubric, ) | Bounded continuous, normalised to |
| Routing | Default pathway | ordinal_tasks name matching ( inspect_ai and standalone) | score_agg aggregation ( inspect_ai ) or continuous_tasks name matching (standalone) |
| Item-level model | Adaptive Beta (data-dependent prior) | Bayesian bootstrap over the modal category | Beta via method-of-moments |
| Grouping-level model | Logit-normal hierarchical | Hierarchical ordered logistic (cumulative link); Dirichlet-Multinomial fallback | Logit-normal hierarchical on item-level means |
| Group-level priors | ; | ; | ; ; |
| Estimand | Population mean success probability | Modal category of the item-averaged distribution | Population mean of item-level means |
Appendix figures & tables11 assets
Supplementary material from the paper’s appendix.
Appendix
| Grouping | Model | Task | Assumed Pattern |
|---|---|---|---|
| G1 | Model A | Task 1 (Binary) | High accuracy, consistent |
| G2 | Model A | Task 2 (Ordinal) | Scores clustered in upper range |
| G3 | Model B | Task 1 (Binary) | Low accuracy, conservatism active |
| G4 | Model B | Task 2 (Ordinal) | Low, diffuse score distribution |
| Pathway | Benchmarks | Scale | Modes Tested |
|---|---|---|---|
| Binary | TruthfulQA, RACE-H | {0, 1} | Live, shadow, multi-model |
| Ordinal | WritingBench, SciKnowEval | 11-cat, 6-cat | Live, shadow |
| Continuous | WritingBench | [0, 10] | Live, shadow, multi-model |
| Task (Pathway) | Trials | Efficiency | Final CI | Trials | Efficiency | Final CI |
|---|---|---|---|---|---|---|
| TruthfulQA (Binary) | 63 | 87.4% | 0.163 | 238 | 52.4% | 0.047 |
| RACE-H (Binary) | 24 | 95.2% | 0.192 | 270 | 46.0% | 0.049 |
| WritingBench (Continuous) | 30 | 94.0% | 100 | 80.0% | ||
| Overall | 117 | 92.2% | 608 | 59.5% | ||
| Continuous pathway CI widths reported on a normalised [0,1] scale; not directly comparable to binary posterior widths. | ||||||
| Abs. Bias | CI Width | Coverage | Diverg. | ||||
|---|---|---|---|---|---|---|---|
| Region | L-N | B-B | L-N | B-B | L-N | B-B | Ratio |
| Mid-range (0.1–0.9) | 0.022 | 0.022 | 0.070 | 0.070 | 0.80 | 0.81 | 120 |
| Near-boundary (0.05, 0.95) | 0.012 | 0.012 | 0.039 | 0.038 | 0.78 | 0.78 | 192 |
| Boundary (0.0, 1.0) | 0.007 | 0.005 | 0.011 | 0.011 | 0.00 | 0.00 | 9,206 |
| Cell | Benchmark | Model | Pathway | max_tokens |
|---|---|---|---|---|
| low_binary | MATH Level 5 | GPT-3.5 Turbo | Binary | – |
| mid_binary | GPQA Diamond | GPT-4o | Binary | – |
| high_binary | MMLU (0-shot) | GPT-4o | Binary | – |
| low_ordinal | WritingBench | Claude Sonnet 4.5 | Ordinal | 50 |
| mid_ordinal | WritingBench | Claude Sonnet 4.5 | Ordinal | 500 |
| high_ordinal | WritingBench | Claude Sonnet 4.5 | Ordinal | 5,000 |
| Cell | 94% HDI | ROPE | |||
|---|---|---|---|---|---|
| low_binary | 200 | 0.006 | 0.007 | [ 0.010, 0.025] | undecided |
| mid_binary | 198 | 0.011 | 0.011 | [ 0.029, 0.007] | undecided |
| high_binary | 200 | 0.005 | 0.005 | [ 0.003, 0.012] | accept |
| low_ordinal | 200 | 0.000 | 0.000 | [ 0.016, 0.017] | accept |
| mid_ordinal | 200 | 0.005 | 0.006 | [ 0.018, 0.029] | accept |
| high_ordinal | 152 | 0.060 | 0.059 | [ 0.114, 0.001] | undecided |