IP Library Granted Patent US 12699552
Granted Patent B2
US 12699552 · App. 18/397,798 · Granted Aug 4, 2026

Tagging deterministic code in artificial intelligence-generated code

Inventors: Andrew C. M. Hicks (Highland, NY); Ryan Lo (Poughkeepsie, NY); Michael Gagliardi (Somerset, MA)
Assignee: International Business Machines Corporation
G06F8/40G06N3/08
View Patent ↗
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 12699552
App. No.
18/397,798
Granted
Aug 4, 2026
Kind
B2
Abstract

Tagging deterministic code in artificial intelligence-generated code, including: receiving code generated by a generative artificial intelligence (AI) model; identifying at least one portion of code by identifying at least one of: one or more portions of deterministic code or one or more portions of non-deterministic code; and tagging the identified at least one portion of code.

Claims (47)

1 . A method comprising:

receiving code generated by a generative artificial intelligence (AI) model;

executing the code;

determining whether the code includes deterministic code or non-deterministic code;

identifying, within the code and based on an output of executing the code, at least one portion of code by identifying at least one of: one or more portions of deterministic code or one or more portions of non-deterministic code; and

tagging the at least one portion of code; and

generating, responsive to tagging a portion of deterministic code, a portion of multipathing code corresponding to the portion of deterministic code,

wherein the portion of multipathing code comprises other code in a first programming language and the portion of deterministic code is encoded in a second programming language different than the first programming language.

2 . The method of claim 1 , wherein identifying at least one portion of code comprises identifying, in the code, one or more portions of deterministic code.

3 . The method of claim 1 , identifying at least one portion of code comprises identifying, in the code, one or more portions of non-deterministic code.

4 . The method of claim 1 , wherein the code generated by the generative AI model comprises converted code in the second programming language converted by the generative AI model from base code in the first programming language, and wherein generating the portion of multipathing code comprises selecting the other code from the base code.

5 . The method of claim 1 , further comprising providing, to the generative AI model, data describing the at least one portion of code.

6 . The method of claim 5 , wherein the data is provided as training data for retraining the generative AI model.

7 . The method of claim 1 , wherein tagging the at least one portion of code comprises generating metadata identifying the at least one portion of code.

8 . The method of claim 7 , wherein the metadata identifies a location of the at least one portion of code in the code and identifies whether the at least one portion of code was identified as deterministic or non-deterministic.

9 . An apparatus comprising:

a processing device; and

memory operatively coupled to the processing device, wherein the memory stores computer program instructions that, when executed, cause the processing device to:

receive code generated by a generative artificial intelligence (AI) model;

execute the code;

determine whether the code includes deterministic code or non-deterministic code;

identify, within the code and based on an output of executing the code, at least one portion of code by identifying at least one of: one or more portions of deterministic code or one or more portions of non-deterministic code;

tag the at least one portion of code; and

generate, responsive to tagging a portion of deterministic code, a portion of multipathing code corresponding to the portion of deterministic code,

wherein the portion of multipathing code comprises other code in a first programming language and the portion of deterministic code is encoded in a second programming language different than the first programming language.

10 . The apparatus of claim 9 , wherein the instructions, that cause the processing device to identify at least one portion of code, further cause the processing device to identify, in the code, one or more portions of deterministic code.

11 . The apparatus of claim 9 , wherein the instructions, that cause the processing device to identify at least one portion of code, further cause the processing device to identify, in the code, one or more portions of non-deterministic code.

12 . The apparatus of claim 9 , wherein the code generated by the generative AI model comprises converted code in the second programming language converted by the generative AI model from base code in the first programming language, and wherein the instructions, that cause the processing device to generate the portion of multipathing code, further cause the processing device to select the other code from the base code.

13 . The apparatus of claim 9 , wherein the instructions, when executed, further cause the processing device to provide, to the generative AI model, data describing the at least one portion of code.

14 . The apparatus of claim 13 , wherein the data is provided as training data for retraining the generative AI model.

15 . The apparatus of claim 9 , wherein the instructions, that cause the processing device to tag the at least one portion of code, further cause the processing device to generate metadata identifying the at least one portion of code.

16 . The apparatus of claim 15 , wherein the metadata identifies a location of the at least one portion of code in the code and identifies whether the at least one portion of code was identified as deterministic or non-deterministic.

17 . A computer program product comprising a computer readable storage medium, wherein the computer readable storage medium comprises computer program instructions that, when executed:

receive code generated by a generative artificial intelligence (AI) model;

execute the code;

determine whether the code includes deterministic code or non-deterministic code;

identify, within the code and based on an output of executing the code, at least one portion of code by identifying at least one of: one or more portions of deterministic code or one or more portions of non-deterministic code;

tag the at least one portion of code; and

generate, responsive to tagging a portion of deterministic code, a portion of multipathing code corresponding to the portion of deterministic code,

wherein the portion of multipathing code comprises other code in a first programming language and the portion of deterministic code is encoded in a second programming language different than the first programming language.

18 . The computer program product of claim 17 , wherein the computer program instructions, that identify the at least one portion of code, further identify, in the code, one or more portions of deterministic code.

19 . The computer program product of claim 17 , wherein the computer program instructions, that identify the at least one portion of code, further identify, in the code, one or more portions of non-deterministic code.

20 . The computer program product of claim 17 , wherein the code generated by the generative AI model comprises converted code in the second programming language converted by the generative AI model from base code in the first programming language, and wherein the computer program instructions, that generate the portion of multipathing code, select the other code from the base code.

21 . The computer program product of claim 17 , wherein the computer program instructions, when executed, provide, to the generative AI model, data describing the at least one portion of code.

22 . The computer program product of claim 21 , wherein the data is provided as training data for retraining the generative AI model.

23 . The computer program product of claim 17 , wherein the computer program instructions, that tag the at least one portion of code, further generate metadata identifying the at least one portion of code.

24 . The computer program product of claim 23 , wherein the metadata identifies a location of the at least one portion of code in the code and identifies whether the at least one portion of code was identified as deterministic or non-deterministic.