IBM · Filed Apr 25, 2025 · Published Oct 29, 2026

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.

A student AI writes programming solutions for a task, which a larger teacher AI reviews and marks as correct or incorrect. Drawing from patent filing US 2026/0339623 A1.
A student AI writes programming solutions for a task, which a larger teacher AI reviews and marks as correct or incorrect.
See all 9 drawings from this filing ↓
Publication number US 2026/0339623 A1 US20260339623A1
Applicant International Business Machines Corporation
Filing date Apr 25, 2025
Publication date Oct 29, 2026
Inventors Oishik Chatterjee, Pooja Aggarwal, Sidharth Sinha
US classification 717/104
Status when we published Waiting for an examiner (May 7, 2025)
Document 20 claims

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.

From the filing · CLAIM 1
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.

From the filing · THE ABSTRACT
… 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.

Editorial take

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

Main computer parts that check and refine programming code, drawing sheet 1 from US 2026/0339623 A1
Sheet 1 Main computer parts that check and refine programming code
Steps for using one AI to grade and guide another, drawing sheet 2 from US 2026/0339623 A1
Sheet 2 Steps for using one AI to grade and guide another
Detailed steps for scoring code and retraining the smaller AI, drawing sheet 3 from US 2026/0339623 A1
Sheet 3 Detailed steps for scoring code and retraining the smaller AI
How answers are sorted and corrected before retraining the AI, drawing sheet 4 from US 2026/0339623 A1
Sheet 4 How answers are sorted and corrected before retraining the AI
The teacher AI tests code written by the student AI, drawing sheet 5 from US 2026/0339623 A1
Sheet 5 The teacher AI tests code written by the student AI
A teacher model creates deliberate bugs in good code, drawing sheet 6 from US 2026/0339623 A1
Sheet 6 A teacher model creates deliberate bugs in good code
Fixing bad code until the teacher model approves it, drawing sheet 7 from US 2026/0339623 A1
Sheet 7 Fixing bad code until the teacher model approves it
Building paired lists of right and wrong code for training, drawing sheet 8 from US 2026/0339623 A1
Sheet 8 Building paired lists of right and wrong code for training
Show the other 1 sheets
Hardware and servers that run the AI training system, drawing sheet 9 from US 2026/0339623 A1
Sheet 9 Hardware and servers that run the AI training system
Browse all the drawings 9 drawing sheets
Patent filing page

Source. Full patent text and figures from the official USPTO publication PDF.
Reader comments

Be the first to weigh in

Start the discussion

Real name or a handle, either is fine. Comments are read by a person before they appear, so allow a little time. Keep it about the filing.