← Latest papers
💬 NLP

optimize_anything: A Universal API for Optimizing any Text Parameter

The paper introduces "optimize_anything," a universal LLM-based optimization framework that achieves state-of-the-art results across six diverse domains—including agent architecture design, cloud cost reduction, and CUDA kernel generation—by unifying text-based search with multi-task transfer and actionable side information to outperform specialized algorithms.

Original authors: Lakshya A Agrawal, Donghyun Lee, Shangyin Tan, Wenjie Ma, Karim Elmaaroufi, Rohit Sandadi, Sanjit A. Seshia, Koushik Sen, Dan Klein, Ion Stoica, Joseph E. Gonzalez, Omar Khattab, Alexandros G. Dimakis
Published 2026-05-20
📖 6 min read🧠 Deep dive

Original authors: Lakshya A Agrawal, Donghyun Lee, Shangyin Tan, Wenjie Ma, Karim Elmaaroufi, Rohit Sandadi, Sanjit A. Seshia, Koushik Sen, Dan Klein, Ion Stoica, Joseph E. Gonzalez, Omar Khattab, Alexandros G. Dimakis, Matei Zaharia

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you have a master chef (a Large Language Model, or LLM) who is incredibly talented at writing recipes, but they don't know how to cook. Usually, to get a great dish, you have to hire a different specialist for every course: a pastry chef for dessert, a grill master for steak, and a sous-chef for soup.

The paper introduces optimize_anything, a new system that acts like a universal "tasting and coaching" loop. It claims that you don't need a different specialist for every job. Instead, you can use this single system to improve any text-based solution, whether it's a computer program, a set of instructions, a robot's brain, or even a drawing.

Here is how it works, broken down into simple concepts:

1. The Core Idea: The "Text Artifact"

The authors realized that almost any problem can be turned into a piece of text.

  • Code is just text.
  • A robot's instructions are just text.
  • A mathematical formula is just text.
  • A drawing (like an SVG) is just text code.

The Analogy: Think of the "text artifact" as a rough draft of a story. The system's job is to take that draft, read it, see how well it works, and then ask the AI chef to rewrite it to make it better.

2. The Secret Sauce: "Side Information" (The Coach's Notes)

In the past, if you asked an AI to improve something, it would only get a score (e.g., "This code got 60%"). It didn't know why it failed. It was like a student getting a "C" on a test with no feedback on which questions were wrong.

optimize_anything changes the rules. The system doesn't just give a score; it gives Side Information (SI).

  • The Analogy: Imagine a coach watching an athlete run. Instead of just saying "You ran in 10 seconds," the coach says, "You ran in 10 seconds, but you stumbled on the third hurdle because your shoe lace was loose, and you leaned too far left."
  • How it helps: The AI uses these specific notes (like error messages, crash logs, or visual descriptions) to fix the exact problem. The paper shows this makes the AI learn 4 to 6 times faster and achieve much higher scores than if it only had a simple score.

3. The Three Ways to Play

The system has three different modes, like different game modes in a video game:

  • Single-Task Mode (The Solo Player): You give the system one specific problem to solve, like "Pack 26 circles into a square." The AI tries to solve just that one thing.
  • Multi-Task Mode (The Study Group): You give the system a batch of related problems, like "Write 30 different computer programs to speed up math." The AI solves them all together.
    • The Magic: If the AI figures out a trick for Problem #1 (like "use a faster memory trick"), it can instantly apply that same trick to Problem #15. It's like a student who learns a math shortcut in algebra and uses it to ace calculus. The paper found this mode was much better than solving problems one by one.
  • Generalization Mode (The Master Class): You give the AI a training set and a test set. The goal is to create a solution that works on new, unseen problems.
    • Example: The AI learned to write a "skill guide" for a coding robot. It trained on one set of coding tasks and then became so good at the guide that it helped the robot solve brand new coding tasks it had never seen before.

4. What Did They Actually Achieve?

The paper tested this system on six very different types of problems. Here is what happened:

  • Robot Brains (Agent Architecture): They gave the AI a very simple, 10-line robot brain. The system evolved it into a complex 300+ line brain. The result? The robot's accuracy on a difficult logic puzzle (ARC-AGI) jumped from 32.5% to 89.5%.
  • Cloud Costs: They asked the AI to write a schedule for cloud servers. The new schedule saved 40% of the money compared to standard methods.
  • Computer Speed (CUDA Kernels): They asked the AI to write code to make graphics cards faster. 87% of the AI-written code was as fast as or faster than the best human-written code.
  • Math Puzzles: They improved a math exam prompt, boosting the AI's score from 46.6% to 60%.
  • Circle Packing: They asked the AI to pack circles as tightly as possible. The AI found a solution that was better than a famous previous AI (AlphaEvolve) and did it with less computing power.
  • 3D Models: In a "seedless" mode (where the AI had to start from scratch with no code), it successfully generated a 3D model of a unicorn.

5. Why This Matters

Before this, if you wanted to optimize a robot, you needed a robot expert. If you wanted to optimize a cloud server, you needed a cloud expert.

optimize_anything claims to be the first "Universal API." It says: "Give me the text, give me the rules for how to score it, and I will handle the rest." It unifies these different worlds under one simple interface.

The Catch (Limitations):

  • It only works on things that can be written as text.
  • It needs a "scorer" (an evaluator) to tell it how well the text is doing.
  • The quality of the result depends on how smart the AI "chef" is.
  • Sometimes, if you ask it to solve too many totally different problems at once (like packing circles of different sizes), it gets confused. It works best when the problems are related.

Summary

optimize_anything is a tool that lets a single AI system learn to be a master optimizer for almost anything written in text. By giving the AI detailed feedback (not just a score) and letting it learn from multiple problems at once, it can discover solutions that are often better than specialized tools built by human experts for specific jobs.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →