SePO: Self-Evolving Prompt Agent for System Prompt Optimization
The paper proposes SePO, a self-referential framework that optimizes both task agents' and the prompt agent's own system prompts through a two-stage evolutionary search, demonstrating superior generalization and performance across diverse benchmarks compared to existing methods.
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 brilliant but stubborn robot assistant (the Task Agent) that needs to solve difficult puzzles, write code, or do math. To make this robot work better, you give it a set of instructions called a "system prompt."
For a long time, humans have been the ones writing these instructions. If the robot fails, a human rewrites the instructions, tries again, and hopes for the best. Some newer methods use a "Coach" (the Prompt Agent) to automatically rewrite these instructions for the robot. But here's the catch: the Coach's own instructions were still written by a human and never changed. The Coach was stuck with a fixed, hand-written manual, no matter how many times it tried to help the robot.
SePO (Self-Evolving Prompt Optimization) changes the game by letting the Coach coach itself.
The Big Idea: The Coach Coaches the Coach
Think of SePO as a gym for AI instruction manuals.
- The Old Way: You hire a personal trainer (the Coach) to help a client (the Robot) get fit. But the trainer's own workout plan was written by a human and never updated. The trainer gets better at helping the client, but the trainer never gets fitter.
- The SePO Way: The trainer is also a client. The trainer helps the client get fit, but the trainer also uses the same training methods to improve their own workout plan. The trainer gets smarter and stronger over time, not just the client.
How It Works: Two Stages of Training
The paper describes a two-step process, similar to how humans learn a new skill:
Stage 1: The "Boot Camp" (Pre-training)
Before the Coach helps any specific robot, it goes to a "boot camp" with a huge variety of challenges (math, logic puzzles, coding, science).
- In this stage, the Coach tries to solve these problems.
- When it fails, it critiques its own instructions, rewrites them, and tries again.
- It keeps a "scrapbook" (an archive) of its best instructions. If a new instruction works better than an old one, it keeps the new one.
- The Result: The Coach evolves into a master instructor with a general "skill" for fixing instructions, rather than just memorizing one specific trick.
Stage 2: The "Specialist Job" (Fine-tuning)
Now, the Coach is hired to help a specific robot with a specific job (e.g., solving Sudoku).
- The Coach uses its evolved, super-smart instructions to help the robot.
- It tweaks the robot's instructions to fit the specific puzzle.
- Because the Coach learned how to learn in Stage 1, it can adapt quickly to new jobs without needing a human to rewrite its own manual first.
Why This Matters (The Results)
The researchers tested this on five very different types of challenges:
- Math (Hard competition problems)
- Abstract Reasoning (Visual pattern puzzles)
- Science (Graduate-level questions)
- Coding (Writing Python programs)
- Logic (Sudoku puzzles)
They compared SePO against:
- Manual-CoT: A human writing the instructions.
- TextGrad: A method that tweaks instructions but uses a fixed, human-written "critic."
- MetaSPO: A method that learns a global rule but still relies on a fixed human-written optimizer.
The Outcome:
SePO won on every single task. On average, it improved accuracy by 4.49 points compared to the human-written baseline.
- It didn't just memorize answers; it learned a general "skill" of how to write better instructions.
- Even when tested on a puzzle (Sudoku) that it never saw during its boot camp, it still performed better than the other methods. This proves it learned a transferable skill, not just a specific trick.
The Analogy of the "Evolutionary Garden"
Imagine the instructions are plants in a garden.
- Old methods: You plant seeds (instructions) and water them. If a plant dies, you pick a new seed from a bag and try again. The gardener (the Coach) never changes.
- SePO: The gardener is also a plant. The gardener grows, evolves, and gets better at gardening while tending to the other plants. The garden keeps a record of the best plants (the archive) and uses them as stepping stones to grow even better plants. Eventually, the garden produces a gardener who is so skilled they can grow anything, even plants they've never seen before.
Summary
SePO closes the loop. Instead of a human writing a fixed manual for an AI coach, SePO lets the AI coach write and improve its own manual. This turns the coach from a static tool into a learning partner that gets smarter with experience, leading to better performance across math, science, coding, and logic puzzles.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.