# US 2026/0093459 A1 · Iterative code generation and debugging pipeline using language models

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2026/0093459 A1
- Document ID: US20260093459A1
- Status: Published application
- Kind: A1
- Application number: 18/900,605
- Filed: 2024-09-27
- Published: 2026-04-02
- Earliest claimed: 2024-05-31
- Assignees: NVIDIA Corporation
- Applicants: NVIDIA Corporation
- Inventors: Jialin Song; Jonathan Raiman; Bryan Catanzaro
- Web page: https://patentgrep.com/patent/US20260093459A1

## CPC

- G06F 8/30: Creation or generation of source code
- G06F 11/3409: {for performance assessment}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Disclosed are apparatuses, systems, and techniques for automated iterative generation and debugging of a computer code (CC) using a language model (LM). The techniques include causing the LM to perform, responsive to a task prompt, iterative generation of the CC, an individual iteration causing the LM to (i) produce multiple evaluations of a previous faulty version of the CC, (ii) generate, responsive to the multiple evaluations, multiple modified versions of the CC, and (iii) automatically select, as an output of the individual iteration, a best performing, in view of one or more tests, version of the CC from the multiple modified versions of the CC.

## Claims

### Claim 1

A method comprising:
obtaining a task prompt for a computer code (CC);
processing, using a language model (LM), the task prompt to generate an initial CC;
performing one or more iterations to improve an input CC, wherein the input CC comprises at least one of the initial CC or an output CC of a previous iteration of the one or more iterations, and wherein an individual iteration of the one or more iterations comprises:
processing, using the LM, one or more iteration prompts to generate respective one or more modified CCs, wherein an individual iteration prompt of the one or more iteration prompts comprises:
the input CC, and
a respective assessment of one or more assessments generated, using the LM, of a performance of the input CC; and
selecting, from the one or more modified CCs, an output CC of the individual iteration; and
identifying, as the CC, the output CC of a final iteration of the one or more iterations.

### Claim 2 (depends on 1)

The method of claim 1, wherein the task prompt comprises a natural language prompt with a description of a coding task to be solved with the CC.

### Claim 3 (depends on 2)

The method of claim 2, wherein the task prompt further comprises one or more of:
an identification of a programming language for the CC, or
a description of a computing system for execution of the CC.

### Claim 4 (depends on 1)

The method of claim 1, wherein the individual iteration prompt further comprises the task prompt.

### Claim 5 (depends on 1)

The method of claim 1, wherein the one or more modified CCs are generated using greedy sampling of LM predictions.

### Claim 6 (depends on 1)

The method of claim 1, wherein the individual iteration of the one or more iterations further comprises:
identifying one or more test tasks failed by the input CC;
generating an assessment prompt comprising:
the input CC, and
a description of one or more test tasks failed by the input CC; and
processing, using the LM, the assessment prompt to generate the one or more assessments of a performance of the input CC.

### Claim 7 (depends on 6)

The method of claim 6, wherein the one or more assessments of the performance of the input CC are generated using temperature sampling of LM predictions.

### Claim 8 (depends on 6)

The method of claim 6, wherein the assessment prompt comprises the task prompt.

### Claim 9 (depends on 1)

The method of claim 1, wherein the selecting the output CC of the individual iteration comprises:
selecting a modified CC, of the one or more modified CCs, having a highest evaluation score associated with performance of one or more test tasks.

### Claim 10 (depends on 1)

The method of claim 1, wherein the final iteration of the one or more iterations is determined by at least one of:
an iteration count of the final iteration reaching a maximum number of iterations; or
at least one modified CC of the one or more modified CCs of the final iteration receiving at least a threshold evaluation score associated with performance of one or more test tasks.

### Claim 11 (depends on 1)

The method of claim 1, further comprising:
collecting training data comprising:
an imperfect CC, wherein the imperfect CC comprises at least one of:
the initial CC, or
the output CC of at least one iteration of the one or more iterations; and
an assessment, generated using the LM, of the imperfect CC; and
using the training data to train a second LM to perform at least one of:
emulating the assessment of the imperfect CC, or
improving the imperfect CC.

### Claim 12 (depends on 11)

The method of claim 11, wherein the using the training data to train the second LM comprises:
processing, using the second LM, at least the imperfect CC to generate a training assessment for the imperfect CC; and
modifying one or more parameters of the second LM based at least on a comparison of the assessment and the training assessment.

### Claim 13 (depends on 11)

The method of claim 11, wherein the training data further comprises an improved CC for the imperfect CC, and wherein the using the training data to train the second LM comprises:
processing, using the second LM, at least the imperfect CC and the assessment to generate a training CC; and
modifying one or more parameters of the second LM based at least on a comparison of the training CC and the improved CC.

### Claim 14 (depends on 1)

The method of claim 1, further comprising:
redacting a portion of the input CC to obtain a redacted CC;
determining a relevance score for the portion of the input CC, the relevance score associated with a likelihood of the LM generating, for the redacted CC, the respective assessment; and
performing at least one of:
displaying the relevance score on a user interface, or
including, in the individual iteration prompt, a reference to the portion of the input CC.

### Claim 15 (depends on 1)

The method of claim 1, further comprising:
obtaining a modified iteration prompt that comprises the individual iteration prompt lacking the respective assessment;
determining an accuracy score for the respective assessment, the accuracy score associated with a likelihood of the LM generating, for the modified iteration prompt, a corresponding modified CC of the one or more modified CCs; and
performing at least one of:
displaying the accuracy score on a user interface, or
removing the corresponding modified CC from the selecting the output CC of the individual iteration.

### Claim 16

A system comprising:
one or more processing units to:
process, using a language model (LM), a task prompt to generate an initial computer code (CC);
perform one or more iterations to improve an input CC, wherein the input CC comprises at least one of the initial CC or an output CC of a previous iteration of the one or more iterations, and wherein to perform an individual iteration of the one or more iterations, the one or more processing units are to:
process, using the LM, one or more iteration prompts to generate respective one or more modified CCs, wherein an individual iteration prompt of the one or more iteration prompts comprises:
the input CC, and
a respective assessment of one or more assessments generated,
using the LM, of a performance of the input CC; and
select, from the one or more modified CCs, an output CC of the individual iteration; and
identify, as the CC, the output CC of a final iteration of the one or more iterations.

### Claim 17 (depends on 16)

The system of claim 16, wherein to perform the individual iteration of the one or more iterations, the one or more processing units are further to:
identify one or more test tasks failed by the input CC;
generate an assessment prompt comprising:
the input CC, and
a description of one or more test tasks failed by the input CC; and
process, using the LM, the assessment prompt to generate the one or more assessments of a performance of the input CC.

### Claim 18 (depends on 17)

The system of claim 17, wherein the one or more assessments of the performance of the input CC are generated using temperature sampling of LM predictions.

### Claim 19 (depends on 16)

The system of claim 16, wherein to select the output CC of the individual iteration, the one or more processing units are to:
select a modified CC, of the one or more modified CCs, having a highest evaluation score associated with performance of one or more test tasks.

### Claim 20 (depends on 16)

The system of claim 16, wherein the final iteration of the one or more iterations is determined by at least one of:
an iteration count of the final iteration reaching a maximum number of iterations; or
at least one modified CC of the one or more modified CCs of the final iteration receiving at least a threshold evaluation score associated with performance of one or more test tasks.

### Claim 21 (depends on 16)

The system of claim 16, wherein the system is comprised in at least one of:
an in-vehicle infotainment system for an autonomous or semi-autonomous machine;
a system for performing one or more simulation operations;
a system for performing one or more digital twin operations;
a system for performing light transport simulation;
a system for performing medical operations;
a system for performing factory operations;
a system for performing collaborative content creation for 3D assets;
a system for performing one or more deep learning operations;
a system implemented using an edge device;
a system for generating or presenting at least one of virtual reality content, mixed reality content, or augmented reality content;
a system implemented using a robot;
a system for performing one or more conversational AI operations;
a system implementing one or more large language models (LLMs);
a system implementing one or more language models;
a system implementing one or more vision language models (VLMs);
a system implementing one or more multi-modal language models;
a system for performing one or more generative AI operations;
a system for generating synthetic data;
a system incorporating one or more virtual machines (VMs);
a system implemented at least partially in a data center; or
a system implemented at least partially using cloud computing resources.

### Claim 22

A processing device comprising processing circuitry to:
cause a language model (LM) to perform, responsive to a task prompt, iterative generation of a computer code (CC), an individual iteration causing the LM to (i) produce multiple evaluations of a previous faulty version of the CC, (ii) generate, responsive to the multiple evaluations, multiple modified versions of the CC, and (ii) automatically select, as an output of the individual iteration, a best performing, in view of one or more tests, version of the CC from the multiple modified versions of the CC.
