IP Library Granted Patent US 12,505,313
Granted Patent B1
US 12,505,313 · App. 19/286,498 · Granted Dec 23, 2025

Machine learning model dynamic prompt engineering

Inventors: Natalie Bar Eliyahu (Azor, IL); Noa Haas (Kfar Glickson, IL); Balachandra Maddina (Fremont, CA); Shon Mendelson (Tel Aviv, IL)
Assignee: INTUIT INC.
G06F40/40G06F40/20
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,505,313
App. No.
19/286,498
Granted
Dec 23, 2025
Kind
B1
Abstract

Techniques described herein involve dynamic prompt engineering using machine learning models. Embodiments include generating, using a machine learning model, a first output based on a sample data set. Embodiments include generating, using a fine-tuned machine learning model, a second output based on the sample data set, wherein the fine-tuned machine learning model is trained by iteratively adjusting parameters of the model based on comparing training inputs passed through multiple layers of the model to training outputs from the model. Embodiments include comparing the first output to the second output, wherein the comparing comprises identifying discrepancies between the first and the second output. Embodiments include automatically generating natural language instructions for providing to the machine learning model based on the comparing. Embodiments include performing an action using the machine learning model based on the natural language instructions and/or sending the natural language instructions to system components via a network communication protocol.

Claims (49)

1 . A method for dynamic prompt engineering using machine learning models, comprising:

generating, using a machine learning model, a first output based on a sample data set;

generating, using a fine-tuned machine learning model, a second output based on the sample data set;

comparing the first output to the second output, wherein the comparing comprises identifying discrepancies between the first output and the second output and assigning, using a clustering algorithm, embeddings generated from the first and second outputs and an input query to one or more groups;

automatically generating natural language instructions for providing to the machine learning model based on the comparing; and

performing an action using the machine learning model based on the natural language instructions.

2 . The method of claim 1 , further comprising performing cluster analysis on the one or more groups using a language processing machine learning model to determine one or more causes of the discrepancies between the first output and the second output.

3 . The method of claim 1 , wherein the natural language instructions comprise directions for minimizing the discrepancies between the second output and a future output generated by the machine learning model.

4 . The method of claim 1 , wherein the automatically generating the natural language instructions for providing to the machine learning model based on the comparing further comprises compiling the natural language instructions in a prompt and refining linguistic characteristics of the natural language instructions using a language processing machine learning model.

5 . The method of claim 1 , wherein the performing the action using the machine learning model based on the natural language instructions comprises one or more of:

updating the natural language instructions until a measure of similarity between a new output and the second output exceeds a threshold value;

storing the natural language instructions; or

generating, in response to one or more input queries, one or more corresponding outputs using the machine learning model based on the natural language instructions and the one or more input queries.

6 . The method of claim 5 , wherein the updating the natural language instructions until the measure of similarity between the new output and the second output exceeds the threshold value comprises:

generating, using the machine learning model, the new output based on the natural language instructions and the sample data set;

comparing the new output to the second output; and

altering the natural language instructions based on the comparing.

7 . A system for dynamic prompt engineering using machine learning models, comprising:

one or more processors; and

a memory comprising instructions that, when executed by the one or more processors, cause the system to:

generate, using a machine learning model, a first output based on a sample data set;

generate, using a fine-tuned machine learning model, a second output based on the sample data set;

compare the first output to the second output, wherein the comparing comprises identifying discrepancies between the first output and the second output and assigning, using a clustering algorithm, embeddings generated from the first and second outputs and an input query to one or more groups;

automatically generate natural language instructions for providing to the machine learning model based on the comparing; and

perform an action using the machine learning model based on the natural language instructions.

8 . The system of claim 7 , further comprising performing cluster analysis on the one or more groups using a language processing machine learning model to determine one or more causes of the discrepancies between the first output and the second output.

9 . The system of claim 7 , wherein the natural language instructions comprise directions for minimizing the discrepancies between the second output and a future output generated by the machine learning model.

10 . The system of claim 7 , wherein the automatically generating the natural language instructions for providing to the machine learning model based on the comparing further comprises compiling the natural language instructions in a prompt and refining linguistic characteristics of the natural language instructions using a language processing machine learning model.

11 . The system of claim 7 , wherein the performing the action using the machine learning model based on the natural language instructions comprises one or more of:

updating the natural language instructions until a measure of similarity between a new output and the second output exceeds a threshold value;

storing the natural language instructions; or

generating, in response to one or more input queries, one or more corresponding outputs using the machine learning model based on the natural language instructions and the one or more input queries.

12 . The system of claim 11 , wherein the updating the natural language instructions until the measure of similarity between the new output and the second output exceeds the threshold value comprises:

generating, using the machine learning model, the new output based on the natural language instructions and the sample data set;

comparing the new output to the second output; and

altering the natural language instructions based on the comparing.

13 . A non-transitory computer readable medium comprising instructions that, when executed by one or more processors of a computing system, cause the computing system to:

generate, using a machine learning model, a first output based on a sample data set;

generate, using a fine-tuned machine learning model, a second output based on the sample data set;

compare the first output to the second output, wherein the comparing comprises identifying discrepancies between the first output and the second output and assigning, using a clustering algorithm, embeddings generated from the first and second outputs and an input query to one or more groups;

automatically generate natural language instructions for providing to the machine learning model based on the comparing; and

perform an action using the machine learning model based on the natural language instructions.

14 . The non-transitory computer readable medium of claim 13 , further comprising performing cluster analysis on the one or more groups using a language processing machine learning model to determine one or more causes of the discrepancies between the first output and the second output.

15 . The non-transitory computer readable medium of claim 13 , wherein the natural language instructions comprise directions for minimizing the discrepancies between the second output and a future output generated by the machine learning model.

16 . The non-transitory computer readable medium of claim 13 , wherein the automatically generating the natural language instructions for providing to the machine learning model based on the comparing further comprises compiling the natural language instructions in a prompt and refining linguistic characteristics of the natural language instructions using a language processing machine learning model.

17 . The non-transitory computer readable medium of claim 13 , wherein the performing the action using the machine learning model based on the natural language instructions comprises one or more of:

updating the natural language instructions until a measure of similarity between a new output and the second output exceeds a threshold value;

storing the natural language instructions; or

generating, in response to one or more input queries, one or more corresponding outputs using the machine learning model based on the natural language instructions and the one or more input queries.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 1, 2025
From: BAR ELIYAHU, NATALIE; HAAS, NOA; MADDINA, BALACHANDRA; MENDELSON, SHON
To: INTUIT INC.
Reel/Frame 071906/0455 →
References Cited (10)
US 12412051B1 · Srivathsan · 2025 [cited by examiner]
US 20250016387A1 · Beaufays · 2025 [cited by examiner]
US 20250060944A1 · Radhakrishna · 2025 [cited by examiner]
US 20250117587A1 · Joynt · 2025 [cited by examiner]
US 20250139387A1 · Jang · 2025 [cited by examiner]
US 20250165247A1 · Muthu · 2025 [cited by examiner]
US 20250265087A1 · Wang · 2025 [cited by examiner]
US 20250265447A1 · Li · 2025 [cited by examiner]
US 20250272062A1 · Kehres · 2025 [cited by examiner]
WO WO2025136527A1 · 2025 [cited by examiner]