Overview
Berkeley and MIT researchers have released optimize_anything, a system that applies a single API to optimize any artifact that can be serialized as text and scored by a function. Rather than designing domain-specific optimizers, users supply a text candidate and an evaluator; the framework handles the search loop. The work is published at CAIS 2026 (arXiv:2605.19633).
Key Points
A Single API Across Seven Domains
| Domain | Optimization Target | Result | |--------|--------------------|--------| | Agent architecture | ARC-AGI reasoning | Gemini Flash: 32.5% → 89.5% | | Cloud scheduling | Egress cost reduction | 40.2% savings, top of ADRS leaderboard | | CUDA kernels | Match PyTorch performance | 87% match or exceed baseline | | Math optimization | 56 black-box problems | Matches Optuna | | Circle packing | n=26 optimal arrangement | Surpasses AlphaEvolve | | Prompt engineering | AIME 2025 math reasoning | GPT-4.1-mini: 46.67% → 60.00% | | Coding agents | Claude Code completion | Near-perfect completion, 47% faster |
Core Philosophy: Everything Is Text, Text Is Optimizable
If an artifact can be serialized to a string and its quality measured, an LLM can optimize it. The same pattern text_artifact → evaluator(score + diagnostics) → LLM_proposer → improved_artifact covers Python functions, system prompts, agent architectures, scheduling pseudo-code, CUDA source, and SVG XML.
Three Optimization Modes in One API
- Single-Task Search: Iteratively improve one candidate. Prior systems like AlphaEvolve, OpenEvolve, and ShinkaEvolve stop here.
- Multi-Task Search: Optimize a batch of related problems with shared experience. Optimization knowledge from one task transfers to others; gains scale with task count.
- Generalization: Train/validation/test split applied to text artifacts (prompts, architectures, policy code)—the standard ML paradigm ported to text optimization.
- ARC-AGI (89.5%): The framework discovers meta-strategies (symmetry detection, color mapping) that let a mid-size model solve program-synthesis puzzles.
- CUDA kernels (87%): Specialized generated kernels beat hand-tuned, general-purpose PyTorch kernels.
- Circle packing: A general API surpasses DeepMind's dedicated AlphaEvolve on n=26.
- Evaluator cost: Each iteration runs the full evaluation—compilation, benchmarks, full agent traces. Hundreds of LLM API calls and compute hours may be needed.
- Evaluator ceiling: System quality is bounded by evaluator fidelity; noisy or biased scoring leads to incorrect convergence. LLM-as-judge bias remains a known issue for prompt optimization.
- Scope of "single artifact": Multi-file, multi-service systems resist single-string serialization.
- Maintainability and generality: Optimized artifacts can be highly specialized and brittle to changes in workload or hardware.
- Agrawal et al., "optimize_anything: A Universal API for Optimizing any Text Parameter", arXiv:2605.19633, CAIS 2026
- GEPA project: https://gepa-ai.github.io/
- AlphaEvolve (DeepMind), 2025
- FunSearch (DeepMind), 2023
- DSPy (Khattab et al.)
- ARC-AGI: https://arcprize.org/
Actionable Side Information (ASI): A Gradient for Text
Traditional optimizers see only a scalar score. ASI lets the evaluator return diagnostics—error stacks, compiler output, profiler data, rendered images, multi-dimensional scores. Ablations show ASI speeds convergence 4–6× versus score-only feedback. ASI is multimodal, including images via gepa.Image for VLM-based visual feedback on SVG outputs.
Pareto-Efficient Search with Minibatch Reflection
The system maintains a Pareto frontier across tasks and metrics rather than collapsing candidates to a single average score. Each iteration the proposer sees 2–3 examples/metrics and produces targeted improvements, preserving complementary strengths across candidates.
Zero-Seed Mode
Users may omit the initial candidate and provide only a natural-language objective. The LLM generates the first artifact, lowering the barrier for non-experts.
Notable Headline Results
Limitations
Broader Implications
The work frames a question: if all evaluable artifacts are treated as text, is the LLM becoming a general-purpose optimization compiler—analogous to how high-level languages replaced per-architecture assemblers? If so, AutoML shifts from weight tuning to text tuning, systems optimization shifts from hand-written heuristics to evolved policy code, and prompt engineering shifts from manual trial to algorithmic search. The paper's declarative API echoes the Berkeley lineage of DSPy ("programming, not prompting") and Spark ("describe the computation, not the implementation").
Author Lineup
Matei Zaharia, Ion Stoica, Joseph Gonzalez, Omar Khattab, Dan Klein, Alexandros Dimakis, and collaborators—drawn from Berkeley's systems, ML systems, and NLP communities.