IP Library › Granted Patent US 12,657,008
Granted Patent B2
US 12,657,008 · App. 18/449,498 · Granted Jun 16, 2026

Automated data extraction pipeline for large language model training

Inventors: Shruthan Radhakrishna (San Francisco, CA); Hadi Minooei (San Francisco, CA); Yazdan Jamshidi (San Francisco, CA)
Assignee: Salesforce, Inc.
G06F8/33G06F40/55
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 12,657,008
App. No.
18/449,498
Granted
Jun 16, 2026
Kind
B2
Abstract

An automated data extraction pipeline for large language model (LLM) training may include extracting a set of code segments from a set of natural language question-answer (Q&A) combinations that each include a provided input, a provided output, and a provided code segment formatted to transform the provided input into the provided output. The data extraction pipeline may then generate a predicted output from a question portion of a first natural language Q&A combination using a first LLM. A first extracted code segment from the extracted set of code segments may then be executed to generate a first actual output of the first extracted code segment. One or more data samples may then be generated for training a second LLM based on a comparison of the first actual output to the predicted output. The second LLM may then be trained using the one or more data samples.

Claims (55)

1 . A method for data processing, comprising:

extracting a plurality of code segments from a plurality of natural language question-answer combinations, wherein each question-answer combination comprises a provided input, a provided output, and a provided code segment formatted to transform the provided input into the provided output;

generating, using a first large language model, a predicted output from a question portion of a first natural language question-answer combination of the plurality of natural language question-answer combinations;

generating, using the first large language model, a first predicted code segment from the question portion of the first natural language question-answer combination, wherein the first predicted code segment is formatted by the first large language model to transform the provided input, of the first natural language question-answer combination, into the provided output of the first natural language question-answer combination;

executing the first predicted code segment to generate a first actual output of the first predicted code segment;

executing a first extracted code segment from the extracted plurality of code segments to generate a first actual output of the first extracted code segment, the first extracted code segment being from a response portion of the first natural language question-answer combination;

generating one or more data samples for a second large language model based at least in part on a comparison of the first actual output of the first extracted code segment to the predicted output from the first large language model and on a comparison of the first actual output of the first predicted code segment to the predicted output from the first large language model; and

training the second large language model using the one or more data samples.

2 . The method of claim 1 , further comprising:

generating, using the first large language model, a predicted input from the question portion of the first natural language question-answer combination, wherein executing the first extracted code segment comprises inputting the predicted input into the first extracted code segment.

3 . The method of claim 1 , wherein executing the first predicted code segment comprises inputting the predicted input into the first predicted code segment.

4 . The method of claim 1 , further comprising:

categorizing the one or more data samples into a first training set comprising a first plurality of data samples or into a second training set comprising a second plurality of data samples based at least in part on the comparison of the first actual output of the first extracted code segment to the predicted output from the first large language model, or a comparison of the first actual output of the first predicted code segment to the predicted output from the first large language model, or both; and

training the second large language model using the first training set, the second training set, or both.

5 . The method of claim 1 , further comprising:

discarding the first extracted code segment from a list of candidate training samples if executing the first extracted code segment fails to generate a valid actual output; and

discarding the first predicted code segment from the list of candidate training samples if executing the first predicted code segment fails to generate the valid actual output.

6 . The method of claim 1 , wherein the first large language model comprises a publicly-hosted generative pre-training transformer model.

7 . An apparatus for data processing, comprising:

one or more memories storing processor-executable code; and

one or more processors coupled with the one or more memories and individually or collectively operable to execute the code to cause the apparatus to:

extract a plurality of code segments from a plurality of natural language question-answer combinations, wherein each question-answer combination comprises a provided input, a provided output, and a provided code segment formatted to transform the provided input into the provided output;

generate, using a first large language model, a predicted output from a question portion of a first natural language question-answer combination of the plurality of natural language question-answer combinations;

generate, using the first large language model, a first predicted code segment from the question portion of the first natural language question-answer combination, wherein the first predicted code segment is formatted by the first large language model to transform the provided input, of the first natural language question-answer combination, into the provided output of the first natural language question-answer combination;

execute the first predicted code segment to generate a first actual output of the first predicted code segment;

execute a first extracted code segment from the extracted plurality of code segments to generate a first actual output of the first extracted code segment, the first extracted code segment being from a response portion of the first natural language question-answer combination;

generate one or more data samples for a second large language model based at least in part on a comparison of the first actual output of the first extracted code segment to the predicted output from the first large language model and on a comparison of the first actual output of the first predicted code segment to the predicted output from the first large language model; and

train the second large language model using the one or more data samples.

8 . The apparatus of claim 7 , wherein the one or more processors are individually or collectively further operable to execute the code to cause the apparatus to:

generate, using the first large language model, a predicted input from the question portion of the first natural language question-answer combination, wherein executing the first extracted code segment comprises inputting the predicted input into the first extracted code segment.

9 . The apparatus of claim 7 , wherein executing the first predicted code segment comprises inputting the predicted input into the first predicted code segment.

10 . The apparatus of claim 7 , wherein the one or more processors are individually or collectively further operable to execute the code to cause the apparatus to:

categorize the one or more data samples into a first training set comprising a first plurality of data samples or into a second training set comprising a second plurality of data samples based at least in part on the comparison of the first actual output of the first extracted code segment to the predicted output from the first large language model, or a comparison of the first actual output of the first predicted code segment to the predicted output from the first large language model, or both; and

train the second large language model using the first training set, the second training set, or both.

11 . The apparatus of claim 7 , wherein the one or more processors are individually or collectively further operable to execute the code to cause the apparatus to:

discard the first extracted code segment from a list of candidate training samples if executing the first extracted code segment fails to generate a valid actual output; and

discard the first predicted code segment from the list of candidate training samples if executing the first predicted code segment fails to generate the valid actual output.

12 . The apparatus of claim 7 , wherein the first large language model comprises a publicly-hosted generative pre-training transformer model.

13 . A non-transitory computer-readable medium storing code for data processing, the code comprising instructions executable by one or more processors to:

extract a plurality of code segments from a plurality of natural language question-answer combinations, wherein each question-answer combination comprises a provided input, a provided output, and a provided code segment formatted to transform the provided input into the provided output;

generate, using a first large language model, a predicted output from a question portion of a first natural language question-answer combination of the plurality of natural language question-answer combinations;

generate, using the first large language model, a first predicted code segment from the question portion of the first natural language question-answer combination, wherein the first predicted code segment is formatted by the first large language model to transform the provided input, of the first natural language question-answer combination, into the provided output of the first natural language question-answer combination;

execute the first predicted code segment to generate a first actual output of the first predicted code segment;

execute a first extracted code segment from the extracted plurality of code segments to generate a first actual output of the first extracted code segment, the first extracted code segment being from a response portion of the first natural language question-answer combination;

generate one or more data samples for a second large language model based at least in part on a comparison of the first actual output of the first extracted code segment to the predicted output from the first large language model and on a comparison of the first actual output of the first predicted code segment to the predicted output from the first large language model; and

train the second large language model using the one or more data samples.

14 . The non-transitory computer-readable medium of claim 13 , wherein the instructions are further executable by the one or more processors to:

generate, using the first large language model, a predicted input from the question portion of the first natural language question-answer combination, wherein executing the first extracted code segment comprises inputting the predicted input into the first extracted code segment.

15 . The non-transitory computer-readable medium of claim 13 , wherein executing the first predicted code segment comprises inputting the predicted input into the first predicted code segment.

16 . The non-transitory computer-readable medium of claim 13 , wherein the instructions are further executable by the one or more processors to:

categorize the one or more data samples into a first training set comprising a first plurality of data samples or into a second training set comprising a second plurality of data samples based at least in part on the comparison of the first actual output of the first extracted code segment to the predicted output from the first large language model, or a comparison of the first actual output of the first predicted code segment to the predicted output from the first large language model, or both; and

train the second large language model using the first training set, the second training set, or both.

17 . The non-transitory computer-readable medium of claim 13 , wherein the instructions are further executable by the one or more processors to:

discard the first extracted code segment from a list of candidate training samples if executing the first extracted code segment fails to generate a valid actual output; and

discard the first predicted code segment from the list of candidate training samples if executing the first predicted code segment fails to generate the valid actual output.

Assignments (3)
CHANGE OF NAME Recorded Aug 4, 2026
From: SALESFORCE.COM, INC.
To: SALESFORCE, INC.
Reel/Frame 076118/0548 →
CORRECTIVE ASSIGNMENT TO CORRECT THE NAME OF THE RECEIVING PARTY PREVIOUSLY RECORDED ON REEL 64593 FRAME 303. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT. Recorded Mar 19, 2026
From: RADHAKRISHNA, SHRUTHAN; MINOOEI, HADI; JAMSHIDI, YAZDAN
To: SALESFORCE, INC.
Reel/Frame 075143/0701 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 15, 2023
From: RADHAKRISHNA, SHRUTHAN; MINOOEI, HADI; JAMSHIDI, YAZDAN
To: SALESFORCE.COM, INC.
Reel/Frame 064593/0303 →
Continuity (1)
Related Publication 20250060944A1 · Feb 20, 2025
References Cited (37)
US 11954602B1 · Mulcahy · 2024 [cited by examiner]
US 12039295B2 · Allamanis · 2024 [cited by examiner]
US 12141553B2 · Athiwaratkun · 2024 [cited by examiner]
US 12147765B2 · Bhardwaj · 2024 [cited by examiner]
US 12277409B1 · Leeman-Munk · 2025 [cited by examiner]
US 12360791B1 · Vadaparty · 2025 [cited by examiner]
US 20190018839A1 · Ge · 2019 [cited by examiner]
US 20200249918A1 · Svyatkovskiy · 2020 [cited by examiner]
US 20200364408A1 · Lao · 2020 [cited by examiner]
US 20210271455A1 · Svyatkovskiy · 2021 [cited by examiner]
US 20220139380A1 · Meng · 2022 [cited by examiner]
US 20220398071A1 · Allamanis · 2022 [cited by examiner]
US 20230418567A1 · Athiwaratkun · 2023 [cited by examiner]
US 20240020097A1 · Czapiewski · 2024 [cited by examiner]
US 20240020491A1 · Chen · 2024 [cited by examiner]
US 20240143296A1 · Hasabnis · 2024 [cited by examiner]
US 20240248686A1 · Garg · 2024 [cited by examiner]
US 20240273294A1 · Shakeri · 2024 [cited by examiner]
US 20240281218A1 · Masad · 2024 [cited by examiner]
US 20240361996A1 · Fu · 2024 [cited by examiner]
US 20240362209A1 · Almaer · 2024 [cited by examiner]
US 20250094145A1 · Weber · 2025 [cited by examiner]
US 20250094814A1 · Wang · 2025 [cited by examiner]
US 20250103300A1 · Le · 2025 [cited by examiner]
US 20250111220A1 · Jones · 2025 [cited by examiner]
US 20250117195A1 · Rieken · 2025 [cited by examiner]
US 20250123812A1 · Zhao · 2025 [cited by examiner]
CN 115795009A · 2023 [cited by examiner]
CN 116719520A · 2023 [cited by examiner]
CN 116820429A · 2023 [cited by examiner]
Ross, Steven I., et al. “The programmer's assistant: Conversational interaction with a large language model for software development.” Proceedings of the 28th International Conference on Intelligent User Interfaces. 202… [cited by examiner]
CN-116719520-A—English Translation. [cited by examiner]
English Translation CN-115795009 A. [cited by examiner]
Da Silva, Mauricio Monteiro. “No Code Interface for Building Web Apps with Language Models.” (2025). [cited by examiner]
Jain, Naman, et al. “Jigsaw: Large language models meet program synthesis.” Proceedings of the 44th International Conference on Software Engineering. 2022. [cited by examiner]
MacNeil, Stephen, et al. “Experiences from using code explanations generated by large language models in a web software development e-book.” Proceedings of the 54th ACM Technical Symposium on Computer Science Education … [cited by examiner]
Liu, Jiawei, et al. “Is your code generated by chatgpt really correct? rigorous evaluation of large language models for code generation.” Advances in Neural Information Processing Systems 36 (2023). [cited by examiner]