daVinci-Agency: Unlocking Long-Horizon Agency Data-Efficiently
The paper introduces daVinci-Agency, a data-efficient framework that leverages authentic Pull Request sequences to synthesize high-quality, long-horizon training data for Large Language Models, enabling significant performance gains in complex agentic workflows without prohibitive annotation costs.
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
The Big Problem: The "Short Attention Span" of AI
Imagine you have a brilliant student who is amazing at answering single questions, like "What is 2+2?" or "Write a poem about a cat." This student is a Large Language Model (LLM).
However, if you ask this student to build a house, they struggle. They might lay the foundation, then forget they need a roof, or they might build a wall in the wrong place and not realize it until the very end. In the world of AI, this is called a long-horizon task. It's a job that requires many steps, where mistakes made early on can ruin the whole project later.
The paper argues that current AI models fail at these long jobs because they haven't been trained on data that shows them how to plan ahead, stay consistent, and fix their own mistakes over a long period.
The Solution: Learning from "Software Evolution"
The authors (from SII, SJTU, and GAIR) realized that the best way to teach an AI how to handle long, complex projects is to look at how real humans build software.
The Analogy: The "Pull Request" Chain
In software development, when a programmer wants to add a feature or fix a bug, they don't just dump the finished code. They submit a "Pull Request" (PR).
- Step 1: They submit a small change (PR #15).
- Step 2: Reviewers say, "This looks good, but you missed a safety net."
- Step 3: The programmer fixes it and submits a new change (PR #21) that builds on the first one.
- Step 4: This continues for several rounds until the feature is perfect.
The authors call this a "Chain of Pull Requests." It's like a story where each chapter depends on the previous one, and the characters (the code) evolve and improve over time.
The Innovation: daVinci-Agency
The team created a new system called daVinci-Agency. Instead of making up fake scenarios or paying humans to write long stories for the AI to learn from (which is expensive and slow), they went to GitHub (a giant library of real software projects) and harvested these natural "Chains of Pull Requests."
They turned these real-world development stories into training data.
- The Training: They took a model (GLM-4.6) and showed it these chains.
- The Lesson: The AI learned that to succeed, it must:
- Decompose: Break a huge goal into small, manageable steps.
- Stay Consistent: Remember the original goal even after 50 steps.
- Refine: Look at its own mistakes (bugs) and fix them without starting over.
The "Magic" Result: Small Data, Big Gains
Usually, to make an AI smarter, you need to feed it millions of examples.
- The Old Way: Train on 66,000 examples (like other datasets in the paper).
- The daVinci Way: Train on just 239 examples.
The Result:
Despite using 200 times less data, the model trained on daVinci-Agency performed significantly better than models trained on massive datasets.
- On a test called Toolathlon (where the AI has to use tools to solve problems), the model improved by 47%.
- On SWE-bench (a test for fixing real software bugs), it also scored much higher.
Why? Because the 239 examples were high-quality. They weren't random; they were real stories of how complex problems are solved over time. The AI didn't just memorize facts; it learned the habit of persistence and correction.
What the AI Actually Learned (The "Meta-Skills")
The paper shows that the AI didn't just get better at coding; it got better at thinking.
- Before: If the AI made a mistake, it would get confused, wander off into irrelevant topics, or give up (called "escapism").
- After: When the AI made a mistake, it paused, realized, "Wait, I'm doing this wrong," and fixed it. It learned to plan and stay on track.
Efficiency: Doing More with Less
The paper also found that the new AI is more efficient.
- Analogy: Imagine two people trying to solve a maze.
- Person A (Old AI): Runs into every dead end, screams, and tries 100 different wrong paths.
- Person B (daVinci AI): Looks at the map, sees the dead ends, and takes the direct path.
- The daVinci-trained AI used fewer words (tokens) and fewer tool clicks to solve the same problems. It didn't waste energy on confusion.
The "Scaling" Discovery
Finally, the authors tested what happens if they make the training stories even longer.
- They found that if they trained the AI on chains with more steps (longer Pull Request chains), the AI got even better.
- This suggests that the more "long-distance" thinking the AI practices, the better it becomes at solving very long, complex problems.
Summary
daVinci-Agency is a new way to train AI agents. Instead of forcing them to memorize millions of short, fake tasks, it teaches them by showing them real, long stories of how humans build software. By learning from these natural "chains of events," the AI learns to plan, stay consistent, and fix its own mistakes, becoming much smarter and more efficient with far less data than before.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.