← Latest papers
💬 NLP

CodeEvo: Interaction-Driven Synthesis of Code-centric Data through Hybrid and Iterative Feedback

This paper introduces CodeEvo, a dual-agent framework that synthesizes high-quality, logically complex instruction-code pairs through iterative hybrid feedback, resulting in the CodeEvo-100K dataset that significantly enhances the performance of code generation models.

Original authors: Qiushi Sun, Jinyang Gong, Lei Li, Qipeng Guo, Fei Yuan

Published 2026-07-28
📖 5 min read🧠 Deep dive

Original authors: Qiushi Sun, Jinyang Gong, Lei Li, Qipeng Guo, Fei Yuan

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 are trying to teach a robot how to be a brilliant programmer. You can't just sit down and write a million coding problems by hand; that would take forever, and you'd run out of ideas. So, scientists have started using other, smarter robots (called Large Language Models) to write these practice problems for the student robot. But here's the catch: when these AI teachers try to make up new problems, they often get it wrong. They might write a math question that has no answer, or a coding task that crashes the computer the moment you try to run it. It's like a teacher handing out a test where half the questions are nonsense. This paper, titled CodeEvo, tackles this messy problem by inventing a new way for AI to teach itself how to write perfect, solvable coding challenges without needing a human to check every single one.

The core idea relies on two main concepts. First, there's the instruction, which is the problem statement (like "Write a function that sorts a list"). Second, there's the code, which is the solution. The goal is to generate pairs of these that are not only correct but also get progressively harder and more interesting. The authors suggest that the old way of doing this—just asking an AI to "make it harder"—is too vague and leads to broken results. Instead, they propose a system where the AI acts like a team of two: a Coder who tries to solve the problem, and a Reviewer who grades the work and designs the next challenge.

The Two-Agent Dance: Coder and Reviewer

The authors built a framework called CodeEvo, which is essentially a high-tech, automated workshop where two AI agents work together in a loop. Think of it like a video game where one player (the Coder) tries to beat a level, and a second player (the Reviewer) acts as both the level designer and the referee.

In the old methods, the "level designer" would just shout, "Make this level harder!" and hope for the best. Often, the result was a level that was impossible to beat or didn't make sense. CodeEvo changes the game. Before the Reviewer even writes a new problem, it creates a Schema. Imagine this as a blueprint or a recipe card. The Reviewer looks at the current problem and picks specific "ingredients" (like keywords: Matrix, Recursion, Big Integer) to mix in. The Schema is a plan that says, "Okay, we are going to take the current logic and add a matrix multiplication step to make it tricky, but we must keep it solvable." This ensures the new problem is grounded in real logic, not just random word salad.

Once the Reviewer designs the blueprint, the Coder tries to write the code to solve it. But here's where the magic happens: the system doesn't just accept the code. It puts the code through a Hybrid Feedback loop.

The Double-Check System

Usually, when an AI writes code, it might look correct but fail when you actually run it. To fix this, CodeEvo uses a two-step verification process. First, it runs the code through a compiler (a tool that checks if the code follows the strict rules of the programming language). If the code crashes or has a syntax error, the compiler says "No." But sometimes, code runs without crashing but still gives the wrong answer.

So, the Reviewer steps in again. This time, it acts like a human judge, reading the code and the problem description to see if the logic actually matches. It asks, "Did you actually solve the problem, or did you just get lucky?" By combining the strict, unfeeling check of the compiler with the smart, contextual check of the AI Reviewer, the system filters out bad data. If the code fails, the Coder gets a detailed report on what went wrong and tries again. This happens over and over until the code is perfect.

Building a Mountain of Data

Using this method, the authors created a massive dataset called CodeEvo-100K. This isn't just a random pile of 100,000 problems; it's a carefully curated collection with "stepped difficulty." They started with simple seed problems and let the agents evolve them. Some problems stayed easy, some became medium, and a special "Hard" set was created by pushing the agents through three or more rounds of refinement.

The results are impressive. When they took other AI models and trained them on this new dataset, those models got significantly better at solving coding problems than models trained on other synthetic data. In fact, a smaller amount of high-quality CodeEvo data (about 17,000 hard problems) actually worked better than a much larger dataset (75,000 problems) made by older methods. This suggests that the quality of the training data matters more than just having a huge volume of it.

Why This Matters

The paper explicitly argues against the idea that you can just use simple, rigid rules (heuristics) to generate good coding data. They show that without a structured plan (the Schema) and a rigorous checking system (the Hybrid Feedback), the generated data is often full of errors or impossible tasks. They also found that while the process is slower than just asking an AI to spit out code once, the resulting data is far superior.

In short, CodeEvo suggests that if you want to build a smart coding AI, you shouldn't just feed it a million random problems. Instead, you should build a system where AI agents teach each other, plan their lessons carefully, and grade each other's homework with a fine-tooth comb. The result is a dataset that is not only huge but also logically sound, executable, and ready to train the next generation of code-generating robots.

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 →