Planning to Explore: Curiosity-Driven Planning for LLM Test Generation
Not on the map. Why?
Abstract (arXiv)
The use of LLMs for code generation has naturally extended to code testing and evaluation. As codebases grow in size and complexity, so does the need for automated test generation. Current approaches for LLM-based test generation rely on strategies that maximize immediate coverage gain, a greedy approach that plateaus on code where reaching deep branches requires setup steps that individually yield zero new coverage. Drawing on principles of Bayesian exploration, we treat the program's branch structure as an unknown environment, and an evolving coverage map as a proxy probabilistic posterior representing what the LLM has discovered so far. Our method, CovQValue, feeds the coverage map back to the LLM, generates diverse candidate plans in parallel, and selects the most informative plan by LLM-estimated Q-values, seeking actions that balance immediate branch discovery with future reachability. Our method outperforms greedy selection on TestGenEval Lite, achieving 51-77% higher branch coverage across three popular LLMs and winning on 77-84% of targets. In addition, we build a benchmark for iterative test generation, RepoExploreBench, where they achieve 40-74%. These results show the potential of curiosity-driven planning methods for LLM-based exploration, enabling more effective discovery of program behavior through sequential interaction
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 12 of its 23 references that are in the map. First posted on arXiv 6 Apr 2026.
Builds on
12 of 23 references.
References · 12
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
- 2023An Empirical Evaluation of Using Large Language Models for Automated Unit Test Generationcited by 193
- 2023ChatUniTest: A Framework for LLM-Based Test Generationcited by 94
- 2022Pynguin: Automated Unit Test Generation for Pythoncited by 49
- 2024TestGenEval: A Real World Unit Test Generation and Test Completion Benchmarkcited by 49
- 2024CoverUp: Effective High Coverage Test Generation for Pythoncited by 36
- 2025BED-LLM: Intelligent Information Gathering with LLMs and Bayesian Experimental Designcited by 21
- 2024Advancing Code Coverage: Incorporating Program Analysis with Large Language Modelscited by 8
- 2025TestForge: Feedback-Driven, Agentic Test Suite Generationcited by 8
- 2025The Curious Language Model: Strategic Test-Time Information Acquisitioncited by 5
- 2026Enhancing LLM-Based Test Generation by Eliminating Covered Codecited by 1
Built on by
Citing papers per year: 2026: 1.
1 paper.
- 2026Self-Improvements in Modern Agentic Systems: A Surveycited by 17
- 2026Self-Improvements in Modern Agentic Systems: A Survey14 Jul 2026