# US 2025/0147990 A1 · Prompt engineering engine

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

- Number: US 2025/0147990 A1
- Document ID: US20250147990A1
- Status: Published application
- Kind: A1
- Application number: 18/504,451
- Filed: 2023-11-08
- Published: 2025-05-08
- Earliest claimed: 2023-11-08
- Assignees: Sap SE
- Applicants: Sap SE
- Inventors: Christian MATHIS
- Web page: https://patentgrep.com/patent/US20250147990A1

## CPC

- G06F 8/30: Creation or generation of source code
- G06F 16/3322: {using system suggestions (G06F16/3325 takes precedence)}
- G06F 8/36: Software reuse
- G06N 3/0475: Generative networks
- G06N 20/00: Machine learning
- G06F 8/423: {Preprocessors}
- G06F 9/453: {Help systems}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

A system and method including receiving a prompt specifying at least one task type; determining a system prompt based on the received prompt, the system prompt including artificial intelligence (AI) system configuration details corresponding to the at least one task type; pre-processing the system prompt to generate a pre-processed prompt including code referenced in the system prompt; transmitting, as an input prompt, the pre-processed prompt to an AI system; receiving, in response to the AI system executing the pre-processed prompt, a result from the AI system; and storing a record of the result from the AI system in a data repository.

## Claims

### Claim 1

A system comprising:
an inbound prompt engine application programming interface (API) to receive a prompt, the prompt specifying at least one task type;
a prompt selector to determine a system prompt based on the received prompt, the system prompt including artificial intelligence (AI) system configuration details corresponding to the at least one task type and including a combination of a description and at least one label;
a pre-processor to pre-process the system prompt to generate a pre-processed prompt, the pre-processed prompt including code referenced in the system prompt;
an outbound large language model API to transmit, as an input prompt, the pre-processed prompt to an AI system and to receive, in response to the AI system executing the pre-processed prompt, a result from the AI system; and
a data repository to store a record of the result from the AI system.

### Claim 2 (depends on 1)

The system of claim 1, wherein the prompt is received from at least one of a user, an executable application, an application development environment.

### Claim 3 (depends on 1)

The system of claim 1, wherein the determining of the system prompt comprises the prompt selector referencing a prompt library, the prompt library including at least one of a set of rules corresponding to the at least one task type, a set of system prompt templates wherein each system prompt template corresponds to each of the at least one task type, and a set of system prompt templates wherein one or more system prompt templates correspond to each of the at least one task type.

### Claim 4 (depends on 1)

The system of claim 1, further comprising determining, by a prompt engine orchestrator, at least one pre-processor to use to accomplish the pre-processing of the system prompt, the at least one pre-processor being determined based on the at least one task type.

### Claim 5 (depends on 1)

The system of claim 1, further comprising:
post-processing, by a prompt engine orchestrator, the result received from the AI system to generate a post-processed result, the post-processed result being configured as specified by a post-processor determined based on the at least one task type; and
storing a record of the post-processed result in the data repository.

### Claim 6 (depends on 1)

The system of claim 1, wherein the code referenced in the system prompt comprises ABAP (Advanced Business Application Programming) programming language.

### Claim 7 (depends on 1)

The system of claim 1, wherein the task type includes at least one of a task to explain a specified code artifact and a task to create a specified code artifact.

### Claim 8

A computer-implemented method, the method comprising:
receiving a prompt, the prompt specifying at least one task type;
determining a system prompt based on the received prompt, the system prompt including artificial intelligence (AI) system configuration details corresponding to the at least one task type and including a combination of a description and at least one label;
pre-processing the system prompt to generate a pre-processed prompt, the pre-processed prompt including code referenced in the system prompt;
transmitting, as an input prompt, the pre-processed prompt to an AI system;
receiving, in response to the AI system executing the pre-processed prompt, a result from the AI system; and
storing a record of the result from the AI system in a data repository.

### Claim 9 (depends on 8)

The method of claim 8, wherein the prompt is received from at least one of a user, an executable application, an application development environment.

### Claim 10 (depends on 8)

The method of claim 8, wherein the determining of the system prompt comprises referencing a prompt library, the prompt library including at least one of a set of rules corresponding to the at least one task type, a set of system prompt templates wherein each system prompt template corresponds to each of the at least one task type, and a set of system prompt templates wherein one or more system prompt templates correspond to each of the at least one task type.

### Claim 11 (depends on 8)

The method of claim 8, further comprising determining at least one pre-processor to use to accomplish the pre-processing of the system prompt, the at least one pre-processor being determined based on the at least one task type.

### Claim 12 (depends on 8)

The method of claim 8, further comprising:
post-processing the result received from the AI system to generate a post-processed result, the post-processed result being configured as specified by a post-processor determined based on the at least one task type; and
storing a record of the post-processed result in the data repository.

### Claim 13 (depends on 8)

The method of claim 8, wherein the code referenced in the system prompt comprises ABAP (Advanced Business Application Programming) programming language.

### Claim 14 (depends on 8)

The method of claim 8, wherein the task type includes at least one of a task to explain a specified code artifact and a task to create a specified code artifact.

### Claim 15

A non-transitory, computer readable medium storing instructions, which when executed by at least one processor cause a computer to perform a method comprising:
receiving a prompt, the prompt specifying at least one task type;
determining a system prompt based on the received prompt, the system prompt including artificial intelligence (AI) system configuration details corresponding to the at least one task type and including a combination of a description and at least one label;
pre-processing the system prompt to generate a pre-processed prompt, the pre-processed prompt including code referenced in the system prompt;
transmitting, as an input prompt, the pre-processed prompt to an AI system;
receiving, in response to the AI system executing the pre-processed prompt, a result from the AI system; and
storing a record of the result from the AI system in a data repository.

### Claim 16 (depends on 15)

The medium of claim 15, wherein the prompt is received from at least one of a user, an executable application, an application development environment.

### Claim 17 (depends on 15)

The medium of claim 15, wherein the determining of the system prompt comprises referencing a prompt library, the prompt library including at least one of a set of rules corresponding to the at least one task type, a set of system prompt templates wherein each system prompt template corresponds to each of the at least one task type, and a set of system prompt templates wherein one or more system prompt templates correspond to each of the at least one task type.

### Claim 18 (depends on 15)

The medium of claim 15, further comprising determining at least one pre-processor to use to accomplish the pre-processing of the system prompt, the at least one pre-processor being determined based on the at least one task type.

### Claim 19 (depends on 15)

The medium of claim 15, further comprising:
post-processing the result received from the AI system to generate a post-processed result, the post-processed result being configured as specified by a post-processor determined based on the at least one task type; and
storing a record of the post-processed result in the data repository.

### Claim 20 (depends on 15)

The medium of claim 15, wherein the task type includes at least one of a task to explain a specified code artifact and a task to create a specified code artifact.
