IBM Files Patent to Have a Big AI Grade a Small AI's Coding Homework
IBM's patent application has one AI write code and a bigger AI grade it. The big AI then breaks the good answers and repairs the bad ones to build a study guide. No test suite or human grader is needed.
What IBM's teacher-and-student coding AI does
A junior programmer hands in five different attempts at the same assignment. A senior engineer reads them all and marks which ones work, without running a single test. That is the setup in this IBM patent application, except both workers are AI models.
The smaller AI writes several answers to a coding task, and the bigger AI judges each one. When an answer is wrong, the big AI fixes it until it passes its own review. When an answer is right, the big AI deliberately plants bugs in it. Either way, every task ends up with a matched pair: a good version and a bad version of the same program.
Those pairs become a study guide. The small AI is retrained to prefer the good version over the bad one, so the next time you ask it for code, it is more likely to get it right.
a code generation component that prompts a student model to generate multiple code responses, each comprising a candidate solution to a given coding task …
Translation: The smaller AI is asked to write several different attempts at solving a programming problem.
How the big AI breaks and fixes sample code
The filing describes a student model (a smaller AI that writes code) and a teacher model (a larger, already-trained AI that acts as judge). The student gets a coding task and is asked for several different answers. It is prompted at different temperatures (a setting that controls how adventurous the AI's output is), so the answers vary from one another.
The teacher then judges each answer on criteria such as syntax validity (is it written correctly), logical accuracy, or functional correctness (does it do the job). According to the filing, it can do this without running the code or relying on test cases, using its own reading of the program.
From there, two things happen:
- Answers judged correct go back to the teacher, which inserts bugs on purpose (syntax, logic, or meaning errors) to create a bad twin.
- Answers judged incorrect go into a repair loop: the teacher edits the code, checks it again, and repeats until it approves.
Each task now has a good version and a bad version. Those pairs, optionally stored with notes on what changed, feed direct preference optimization (a training method that nudges a model toward the better of two options). The student is updated from these comparisons, possibly over several rounds.
… a feedback component that introduces errors into correct code responses to generate corresponding incorrect versions, and rectifies incorrect code responses to generate corresponding correct versions …
Translation: The system deliberately breaks good code and fixes bad code to create comparison examples.
Why skipping test cases matters for coding AI
If you have used an AI coding assistant, you have seen it produce code that looks fine and does not work. This patent application describes one way to train smaller, cheaper models to make fewer of those mistakes, without anyone writing test suites for every task. The filing also says the method avoids repeated calls to large models during training, which keeps computing costs down.
There is a catch built into the design. The big AI is the only judge, and the filing says it works without a compiler or test cases, so the student can only be as good as the teacher's eye. Still, a small model that codes well is cheaper to run than a giant one, and that is the payoff the filing is chasing.
This is the 23rd IBM filing we've tracked since May in our AI teams working together watch, joining keeping answers encrypted and picking the best chatbot reply.
Teaching AI to code well is an expensive problem. Teaching an AI to code well usually takes tests that prove the code works, or people who read and label thousands of examples, and both cost a lot of time and money.
This approach goes after that cost directly. A bigger AI does the grading, and the lessons are manufactured by planting bugs in good code and repairing the bad. Planting bugs is a clever move, since every lesson then has a clear right side and a clear wrong side.
The risk is as large as the savings. If the teacher misjudges a program, and the filing says it judges without running anything, the student learns that mistake as truth. A fix this cheap pays off only if the teacher's judgment holds up, and the filing offers no results to settle that.
Get our take in your Top Stories
Liked this breakdown? Add Patentlyze as a preferred source on Google, and our plain-English take shows up more often in your Top Stories the next time IBM patent news breaks.
There are more where this came from
We read every patent application Big Tech publishes and send you the ones worth knowing. Plain English, free, every week.
The drawings
9 drawing sheets from US 2026/0339623 A1 · click any drawing to enlarge
Want this weekly breakdown for a company we don't cover? Patentlyze Pro →
Be the first to weigh in