TL;DR
ReASearch is a unified framework that replaces hard-coded optimization algorithms (like evolutionary search or bandits) with a single, tool-using LLM agent. By internalizing the search strategy through reasoning and persistent memory, the agent autonomously optimizes prompts, code, and ML workflows, outperforming specialized systems by up to 40% and even surpassing human-best results in geometric optimization.
What Problem Does This Paper Address?
Optimizing text-based artifacts—whether they are system prompts, Python programs, or complex machine learning training configurations—is notoriously difficult. These artifacts exist in vast, discrete search spaces where traditional mathematical optimization often fails because it lacks "semantic" understanding.
Current state-of-the-art methods use Large Language Models (LLMs) as "mutators" to suggest edits, but they still rely on an external, hard-coded "controller" to decide which version to try next, how to allocate the compute budget, and when to give up on a failing path. The authors of this paper ask a provocative question: How much of this search logic can be internalized by the agent itself? Instead of following a rigid loop, can an agent reason its way through a search tree?
Methods
The authors introduce ReASearch (Reasoning-driven Agentic Search), a "controller-light" framework. Unlike previous systems that have complex outer-loop logic, ReASearch uses a simple agent loop equipped with:
- Domain-Specific Tools: Tools for evaluation, code editing, and file I/O.
- Computational Reasoning: A
python_exectool that allows the agent to write scripts to analyze its own failure logs, compute statistics, and test hypotheses before committing to expensive evaluations. - Persistent Memory: A
lessons.mdfile where the agent records what worked, what failed, and why. This memory survives "context compaction" (when the conversation gets too long and needs to be summarized). - Agentic Autonomy: The agent itself decides when to double-verify a promising result, when to backtrack to a previous "known-good" version, and how to pivot its strategy based on budget constraints.
Datasets
The framework was evaluated across 14 diverse tasks in three categories:
- Prompt Optimization: AIME 2025 (math), GSM8K (grade-school math), HotpotQA (multi-hop reasoning), and Terminal-Bench 2.0 (software engineering).
- Program Evolution: Circle Packing and Heilbronn Triangles (math optimization), Transaction Scheduling (systems), and ARC-AGI-2 (visual reasoning).
- ML Workflow Optimization: NanoGPT (language modeling), IMG-100 (image classification), Atari Q*bert and MuJoCo HalfCheetah (reinforcement learning), and a Kaggle Crypto Market Prediction challenge.
Key Insights and Ideas
- Emergent Search Behavior: The most striking finding is that complex strategies like backtracking, double-verification of noisy gains, and adaptive exploration emerge naturally from the agent's reasoning process without being explicitly programmed.
- Causal Diagnosis vs. Random Mutation: While traditional evolutionary algorithms might randomly tweak a program, ReASearch uses Python to analyze logs and perform "surgical fixes." For example, in ML tasks, the agent identified that a training plateau was caused by a learning rate schedule mismatch and fixed it with a single targeted change.
- Mathematical Abstraction: In the Heilbronn triangle problem, the agent noticed a pattern of 8-fold symmetry in its best results. It then formulated this as a mathematical constraint, reducing a 24-variable problem to just 2 parameters, which it solved to 50-digit precision.
- Identifying Co-dependencies: The agent proved capable of finding "near-miss" improvements that only work when combined—such as realizing that reducing batch size requires a simultaneous retuning of the learning rate.
Key Results
ReASearch consistently matched or outperformed specialized baselines (like GEPA for prompts or AdaEvolve for code) across all domains:
- Prompting: Achieved a +11% absolute gain over GEPA on the difficult Terminal-Bench 2.0 task.
- Program Evolution: In Circle Packing, ReASearch discovered new solutions that surpassed the best-known human results recorded in the literature.
- ML Workflows: On a Kaggle crypto prediction task, the agent improved a baseline model's ranking from 36th to 6th place in just 15 experiments.
- Efficiency: Compared to general-purpose agents like Claude Code, ReASearch achieved better results using significantly fewer tokens by spending more time reasoning and less time running redundant experiments.
Limitations and Future Work
- Backbone Dependency: The system's performance is tied to the reasoning capabilities of the underlying LLM. While it works with open-source models like GLM-5, the strongest results currently require frontier models like Claude 3.5 Sonnet or GPT-4o.
- Long-Horizon Costs: While more efficient than "brute-force" search, the multi-turn reasoning process still incurs significant API costs for very long optimization runs.
- Future Directions: The authors suggest exploring "meta-agentic" setups where one agent designs the toolset for another, further reducing the need for human-designed scaffolds.
Summary updated