# US 2025/0095807 A1 · Automatic prompt engineering using a large language model

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

- Number: US 2025/0095807 A1
- Document ID: US20250095807A1
- Status: Published application
- Kind: A1
- Application number: 18/883,782
- Filed: 2024-09-12
- Published: 2025-03-20
- Earliest claimed: 2023-09-15
- Assignees: Oracle International Corporation
- Applicants: Oracle International Corporation
- Inventors: Syed Najam Abbas Zaidi; Poorya Zaremoodi; Shiquan Yang; Nitika Mathur; Shubham Pawankumar Shah; Arash Shamaei; Sagar Kalyan Gollamudi
- Web page: https://patentgrep.com/patent/US20250095807A1

## CPC

- G06F 40/30: Semantic analysis
- G16H 10/60: for patient-specific data, e.g. for electronic patient records
- G06F 40/205: Parsing
- G06F 40/295: Named entity recognition
- G06F 40/56: Natural language generation
- G06N 3/045: Combinations of networks
- G06N 3/0475: Generative networks
- G06N 20/00: Machine learning
- G06N 20/20: Ensemble learning
- G10L 15/26: Speech to text systems (G10L15/08 takes precedence)
- G16H 10/00: ICT specially adapted for the handling or processing of patient-related medical or healthcare data (for medical reports G16H15/00; for therapies or health-improving plans G16H20/00; for the handling or processing of medical images G16H30/00)
- G16H 15/00: ICT specially adapted for medical reports, e.g. generation or transmission thereof
- G16H 50/20: for computer-aided diagnosis, e.g. based on medical expert systems
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G16H: HEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G10L: SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING

## Abstract

Techniques are disclosed for automatically generating prompts. A method comprises accessing first prompts, wherein each of the first prompts is a prompt for generating a portion of a SOAP note using a machine-learning model. For each respective first prompt of the first prompts: (i) using the respective first prompt to obtain a first result from a first machine-learning model, (ii) using the respective first prompt and the first result to obtain a second result from a second machine-learning model, the second result including an assessment of the first result, (iii) using the second result to obtain a third result from a third machine-learning model, the third result including a second prompt, (iv) setting the second prompt as the respective first prompt, (v) repeating steps (i)-(iv) a number of times to obtain a production prompt, (vi) adding the production prompt to a collection of prompts; and storing the collection of prompts.

## Claims

### Claim 1

A computer-implemented method comprising:
accessing a plurality of first prompts, wherein each first prompt of the plurality of first prompts is a prompt for generating a portion of a Subjective, Objective, Assessment and Plan (SOAP) note using a machine-learning model;
for each first prompt of the plurality of first prompts:
(i) using a respective first prompt to obtain a first result from a first machine-learning model,
(ii) using the respective first prompt and the first result to obtain a second result from a second machine-learning model, the second result including an assessment of the first result,
(iii) using the second result to obtain a third result from a third machine-learning model, the third result including a second prompt,
(iv) setting the second prompt as the respective first prompt,
(v) repeating steps (i)-(iv) a predetermined number of times to obtain a production prompt,
(vi) adding the production prompt to a collection of prompts; and
storing the collection of prompts in a storage medium.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, wherein the first machine-learning model is different from the second machine-learning model, and wherein the second machine-learning model is the same as the third machine-learning model.

### Claim 3 (depends on 1)

The computer-implemented method of claim 1, wherein each prompt of the plurality of first prompts is a prompt for a particular machine-learning model from among a set of machine-learning models, wherein providing the prompt to the particular machine-learning model causes the particular machine-learning model to obtain a result associated with a portion of the SOAP note.

### Claim 4 (depends on 1)

The computer-implemented method of claim 1, wherein each first prompt of the plurality of first prompts causes a machine-learning model to perform a task associated with generating the SOAP note when provided to the machine-learning model.

### Claim 5 (depends on 1)

The computer-implemented method of claim 1, further comprising:
accessing the collection of prompts;
generating a SOAP note using the collection of prompts, the SOAP note documenting an encounter between a first entity and a second entity; and
storing the SOAP note in a database associated with at least one of the first entity and the second entity.

### Claim 6 (depends on 5)

The computer-implemented method of claim 5, wherein generating the SOAP note using the collection of prompts comprises:
accessing a text transcript, the text transcript derived from an audio recording of an interaction between the first entity and the second entity; and
providing the collection of prompts and the text transcript to one or more machine-learning models to:
retrieve a set of entities,
extract facts from the text transcript based at least-in part on the set of entities, and
generate the SOAP note based at least-in part on the facts.

### Claim 7 (depends on 6)

The computer-implemented method of claim 6, wherein the first entity is a healthcare provider, wherein the second entity is a patient associated with the healthcare provider, and wherein storing the SOAP note in the database comprises storing the SOAP note in an electronic health record associated with the patient.

### Claim 8

A system comprising:
one or more processing systems; and
one or more computer-readable media storing instructions which, when executed by the one or more processing systems, cause the system to perform operations comprising:
accessing a plurality of first prompts, wherein each first prompt of the plurality of first prompts is a prompt for generating a portion of a Subjective, Objective, Assessment and Plan (SOAP) note using a machine-learning model;
for each first prompt of the plurality of first prompts:
(i) using a respective first prompt to obtain a first result from a first machine-learning model,
(ii) using the respective first prompt and the first result to obtain a second result from a second machine-learning model, the second result including an assessment of the first result,
(iii) using the second result to obtain a third result from a third machine-learning model, the third result including a second prompt,
(iv) setting the second prompt as the respective first prompt,
(v) repeating steps (i)-(iv) a predetermined number of times to obtain a production prompt,
(vi) adding the production prompt to a collection of prompts; and
storing the collection of prompts in a storage medium.

### Claim 9 (depends on 8)

The system of claim 8, wherein the first machine-learning model is different from the second machine-learning model, and wherein the second machine-learning model is the same as the third machine-learning model.

### Claim 10 (depends on 8)

The system of claim 8, wherein each prompt of the plurality of first prompts is a prompt for a particular machine-learning model from among a set of machine-learning models, wherein providing the prompt to the particular machine-learning model causes the particular machine-learning model to obtain a result associated with a portion of the SOAP note.

### Claim 11 (depends on 8)

The system of claim 8, wherein each first prompt of the plurality of first prompts causes a machine-learning model to perform a task associated with generating the SOAP note when provided to the machine-learning model.

### Claim 12 (depends on 8)

The system of claim 8, the operations further comprising:
accessing the collection of prompts;
generating a SOAP note using the collection of prompts, the SOAP note documenting an encounter between a first entity and a second entity; and
storing the SOAP note in a database associated with at least one of the first entity and the second entity.

### Claim 13 (depends on 12)

The system of claim 12, wherein generating the SOAP note using the collection of prompts comprises:
accessing a text transcript, the text transcript derived from an audio recording of an interaction between the first entity and the second entity; and
providing the collection of prompts and the text transcript to one or more machine-learning models to:
retrieve a set of entities,
extract facts from the text transcript based at least-in part on the set of entities, and
generate the SOAP note based at least-in part on the facts.

### Claim 14 (depends on 13)

The system of claim 13, wherein the first entity is a healthcare provider, wherein the second entity is a patient associated with the healthcare provider, and wherein storing the SOAP note in the database comprises storing the SOAP note in an electronic health record associated with the patient.

### Claim 15

One or more non-transitory computer-readable media storing instructions which, when executed by one or more processors, cause a system to perform operations comprising:
accessing a plurality of first prompts, wherein each first prompt of the plurality of first prompts is a prompt for generating a portion of a Subjective, Objective, Assessment and Plan (SOAP) note using a machine-learning model;
for each first prompt of the plurality of first prompts:
(i) using a respective first prompt to obtain a first result from a first machine-learning model,
(ii) using the respective first prompt and the first result to obtain a second result from a second machine-learning model, the second result including an assessment of the first result,
(iii) using the second result to obtain a third result from a third machine-learning model, the third result including a second prompt,
(iv) setting the second prompt as the respective first prompt,
(v) repeating steps (i)-(iv) a predetermined number of times to obtain a production prompt,
(vi) adding the production prompt to a collection of prompts; and
storing the collection of prompts in a storage medium.

### Claim 16 (depends on 15)

The one or more non-transitory computer-readable media of claim 15, wherein the first machine-learning model is different from the second machine-learning model, and wherein the second machine-learning model is the same as the third machine-learning model.

### Claim 17 (depends on 15)

The one or more non-transitory computer-readable media of claim 15, wherein each prompt of the plurality of first prompts is a prompt for a particular machine-learning model from among a set of machine-learning models, wherein providing the prompt to the particular machine-learning model causes the particular machine-learning model to obtain a result associated with a portion of the SOAP note.

### Claim 18 (depends on 15)

The one or more non-transitory computer-readable media of claim 15, wherein each first prompt of the plurality of first prompts causes a machine-learning model to perform a task associated with generating the SOAP note when provided to the machine-learning model.

### Claim 19 (depends on 15)

The one or more non-transitory computer-readable media of claim 15, the operations further comprising:
accessing the collection of prompts;
generating a SOAP note using the collection of prompts, the SOAP note documenting an encounter between a first entity and a second entity; and
storing the SOAP note in a database associated with at least one of the first entity and the second entity.

### Claim 20 (depends on 19)

The one or more non-transitory computer-readable media of claim 19, wherein generating the SOAP note using the collection of prompts comprises:
accessing a text transcript, the text transcript derived from an audio recording of an interaction between the first entity and the second entity; and
providing the collection of prompts and the text transcript to one or more machine-learning models to:
retrieve a set of entities,
extract facts from the text transcript based at least-in part on the set of entities, and
generate the SOAP note based at least-in part on the facts.
