IP Library Patent Application 18665961
Patent Application
App. No. 18/665,961

AUTOMATED REPAIR OF CODE GENERATION PROMPT

Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US None
App. No.
18/665,961
Abstract

Systems and methods include input of a code generation prompt to a text generation model, reception of code from the text generation model in response to the input code generation prompt, execution of the received code, determination of execution information associated with the execution of the received code, input of a repair prompt, the code generation prompt and the execution information to the text generation model, and reception of an updated code generation prompt from the text generation model in response to the input repair prompt, code generation prompt and execution information.

Claims (95)

1 . A system comprising:

a memory storing program code; and

one or more processing units to execute the program code to cause the system to:

receive a code generation prompt;

a) input the code generation prompt to a text generation model;

b) receive code from the text generation model in response to the input code generation prompt;

c) execute the received code;

d) determine execution information associated with the execution of the received code;

e) determine an embedding based on the execution information;

repeat a) through e) a plurality of times to determine a plurality of embeddings;

determine a plurality of clusters of embeddings based on similarities between the plurality of embeddings, each of the plurality of embeddings associated with only one of the clusters;

determine one of the plurality of clusters;

determine one of the embeddings associated with the determined cluster;

input a repair prompt, the code generation prompt and execution information based on which the determined one embedding was determined to the text generation model; and

receive an updated code generation prompt from the text generation model in response to the input repair prompt, code generation prompt and execution information.

2 . The system of claim 1 , wherein the execution information input to the text generation model includes a name of an exception and an exception message.

3 . The system of claim 2 , wherein the execution information associated with execution of received code includes one or more lines of the received code which caused the exception.

4 . The system according to claim 1 , wherein the determined one of the plurality of clusters is the one of the plurality of clusters associated with a greatest number of embeddings.

5 . The system of claim 1 , the one or more processing units to execute the program code to cause the system to:

f) input the updated code generation prompt to the text generation model;

g) receive updated code from the text generation model in response to the input updated code generation prompt;

h) execute the received updated code;

i) determine updated execution information associated with the execution of the updated received code;

j) determine an updated embedding based on the updated execution information;

repeat f) through j) a plurality of times to determine a plurality of updated embeddings;

determine a second plurality of clusters of updated embeddings based on similarities between the plurality of updated embeddings, each of the plurality of updated embeddings associated with only one of the second plurality of clusters;

determine one of the second plurality of clusters;

determine one of the updated embeddings associated with the determined one of the second plurality of clusters;

input the repair prompt, the updated code generation prompt and updated execution information based on which the determined one of the updated embeddings was determined to the text generation model; and

receive a second updated code generation prompt from the text generation model in response to the input repair prompt, updated code generation prompt and updated execution information.

6 . The system of claim 5 , wherein the execution information input to the text generation model includes a name of an exception and an exception message, and

wherein the updated execution information input to the text generation model includes a second name of a second exception and a second exception message.

7 . The system of claim 6 , wherein the execution information associated with execution of received code includes one or more lines of the received code which caused the exception, and

wherein the updated execution information associated with execution of received updated code includes one or more lines of the received updated code which caused the second exception.

8 . A method comprising:

inputting a code generation prompt to a text generation model;

receiving code from the text generation model in response to the input code generation prompt;

executing the received code;

determining execution information associated with the execution of the received code;

inputting a repair prompt, the code generation prompt and the execution information to the text generation model; and

receiving an updated code generation prompt from the text generation model in response to the input repair prompt, code generation prompt and execution information.

9 . The method of claim 8 , wherein the execution information input to the text generation model includes a name of an exception and an exception message.

10 . The method of claim 9 , wherein the execution information associated with execution of received code includes one or more lines of the received code which caused the exception.

11 . The method of claim 8 , further comprising:

inputting the code generation prompt to the text generation model a plurality of times;

receiving code from the text generation model in response to each input of the code generation prompt to the text generation model;

executing each of the plurality of received code;

for each execution of the plurality of received code, determining associated execution information;

determining an embedding based on each associated execution information;

determining a plurality of clusters of embeddings based on similarities between each embedding, each embedding associated with only one of the plurality of clusters;

determining one of the plurality of clusters associated with a greatest number of embeddings;

determining a candidate embedding associated with the determined one of the plurality of clusters; and

determining to input to the text generation model the execution information based on which the candidate embedding was determined.

12 . The method of claim 8 , further comprising:

inputting the updated code generation prompt to the text generation model;

receiving updated code from the text generation model in response to the input updated code generation prompt;

executing the received updated code;

determining updated execution information associated with the execution of the received updated code;

inputting the repair prompt, the updated code generation prompt and the updated execution information to the text generation model; and

receiving a second updated code generation prompt from the text generation model in response to the input repair prompt, updated code generation prompt and updated execution information.

13 . The method of claim 12 , wherein the execution information input to the text generation model includes a name of an exception and an exception message, and

wherein the updated execution information input to the text generation model includes a second name of a second exception and a second exception message.

14 . The method of claim 13 , wherein the execution information associated with execution of received code includes one or more lines of the received code which caused the exception, and

wherein the updated execution information associated with execution of received updated code includes one or more lines of the received updated code which caused the second exception.

15 . A non-transitory medium storing program code executable by one or more processing units of a computing system to cause the computing system to:

a) input a code generation prompt to a text generation model;

b) receive code from the text generation model in response to the input code generation prompt;

c) execute the received code;

d) determine execution information associated with the execution of the received code;

e) determine an embedding based on the execution information;

repeat a) through e) a plurality of times to determine a plurality of embeddings, each of the plurality of embeddings associated with an instance of received code and execution information associated with execution of the instance of received code;

determine a plurality of clusters of embeddings based on similarities between the plurality of embeddings, each of the plurality of embeddings associated with only one of the clusters;

determine one of the plurality of clusters representing an error;

determine one of the embeddings associated with the determined cluster;

input a repair prompt, the code generation prompt and execution information associated with the determined one embedding to the text generation model; and

receive an updated code generation prompt from the text generation model in response to the input repair prompt, code generation prompt and execution information.

16 . The medium of claim 15 , wherein the execution information input to the text generation model includes a name of an exception and an exception message.

17 . The medium of claim 16 , wherein the execution information associated with execution of received code includes one or more lines of the received code which caused the exception.

18 . The medium according to claim 15 , wherein the determined one of the plurality of clusters is the one of the plurality of clusters associated with a greatest number of embeddings.

19 . The medium of claim 15 , the program code executable by one or more processing units of a computing system to cause the computing system to:

f) input the updated code generation prompt to the text generation model;

g) receive updated code from the text generation model in response to the input updated code generation prompt;

h) execute the received updated code;

i) determine updated execution information associated with the execution of the updated received code;

j) determine an updated embedding based on the updated execution information;

repeat f) through j) a plurality of times to determine a plurality of updated embeddings, each of the plurality of updated embeddings associated with an instance of received updated code and updated execution information associated with execution of the instance of received updated code;

determine a second plurality of clusters of updated embeddings based on similarities between the plurality of updated embeddings, each of the plurality of updated embeddings associated with only one of the second plurality of clusters;

determine one of the second plurality of clusters associated with a second error;

determine one of the updated embeddings associated with the determined one of the second plurality of clusters;

input the repair prompt, the updated code generation prompt and updated execution information associated with the determined one of the updated embeddings to the text generation model; and

receive a second updated code generation prompt from the text generation model in response to the input repair prompt, updated code generation prompt and updated execution information.

20 . The medium of claim 19 , wherein the execution information input to the text generation model includes a name of an exception and an exception message,

wherein the updated execution information input to the text generation model includes a second name of a second exception and a second exception message,

wherein the execution information associated with execution of received code includes one or more lines of the received code which caused the exception, and

wherein the updated execution information associated with execution of received updated code includes one or more lines of the received updated code which caused the second exception.

Assignments (2)
CHANGE OF NAME Recorded Jan 26, 2026
From: BUSINESS OBJECTS SOFTWARE LIMITED
To: SAP IRELAND LIMITED
Reel/Frame 074510/0354 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 16, 2024
From: O'HARA, PAUL
To: BUSINESS OBJECTS SOFTWARE LTD
Reel/Frame 067435/0350 →