# US 12,602,357 B1 · Automating data preprocessing code generation using large language models

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

- Number: US 12,602,357 B1
- Document ID: US12602357B1
- Status: Granted
- Kind: B1
- Application number: 18/989,068
- Filed: 2024-12-20
- Granted: 2026-04-14
- Earliest claimed: 2024-12-20
- Assignees: Sap SE
- Applicants: Sap SE
- Inventors: Yee Sen Chow; Kenneth Tan; Xingce Bao
- Web page: https://patentgrep.com/patent/US12602357B1

## CPC

- G06F 16/214: {Database migration support}
- G06F 16/211: {Schema design and management}
- G06N 3/045: Combinations of networks
- G06N 3/08: Learning methods
- G06N 3/09: Supervised learning
- G06N 5/01: Dynamic search techniques; Heuristics; Dynamic trees; Branch-and-bound
- G06N 5/022: Knowledge engineering; Knowledge acquisition
- G06N 7/01: Probabilistic graphical models, e.g. probabilistic networks
- G06N 20/00: Machine learning
- G06N 20/20: Ensemble learning
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

Methods, systems, and computer-readable storage media for receiving a first source data schema (SDS) representing a first format for recording data in a computer-readable document, providing a first prompt including at least a portion of the first SDS, generating description data by processing the first prompt using a first LLM, providing a second prompt including of at least a portion of the first SDS, at least a portion of a first target data schema (TDS), and the description data, generating first schema conversion code (SCC) by processing the second prompt using a second LLM, converting a first document from the first SDS to the first TDS using the first SCC, processing the first document in the first TDS using a ML model to provide inference results, and automatically executing one or more tasks responsive to the inference results.

## Claims

### Claim 1

A computer-implemented method for computer-executed entity matching using one or more machine learning (ML) models, the method being executed by one or more processors and comprising:
receiving a first source data schema (SDS) representing a first format for recording data in a computer-readable document;
providing a first prompt comprising at least a portion of the first SDS;
generating description data by processing the first prompt using a first large language model (LLM);
providing a second prompt comprising of at least a portion of the first SDS, at least a portion of a first target data schema (TDS), and the description data;
generating first schema conversion code (SCC) by processing the second prompt using a second LLM;
converting a first document from the first SDS to the first TDS using the first SCC;
processing the first document in the first TDS using a ML model to provide inference results; and
automatically executing one or more tasks responsive to the inference results.

### Claim 2 (depends on 1)

The method of claim 1, wherein converting the first document from the first SDS to the first TDS comprises changing a column name of the first document.

### Claim 3 (depends on 1)

The method of claim 1, wherein the first prompt comprises a request to generate descriptions for each column in a set of columns of the first SDS.

### Claim 4 (depends on 1)

The method of claim 1, wherein the second prompt comprises a request to generated the first SCC based on the at least a portion of the first SDS, the at least a portion of a first TDS, and the description data.

### Claim 5 (depends on 1)

The method of claim 1, wherein the inference results are provided by the ML model further based on a second document in a second TDS.

### Claim 6 (depends on 5)

The method of claim 5, further comprising converting the second document from a second SDS to the second TDS using second SCC.

### Claim 7 (depends on 1)

The method of claim 1, wherein the ML model comprises a generic line-item matching (GLIM) model that predicts matches between line items of the first document to line items of a second document.

### Claim 8

A non-transitory computer-readable storage medium coupled to one or more processors and having instructions stored thereon which, when executed by the one or more processors, cause the one or more processors to perform operations for computer-executed entity matching using one or more machine learning (ML) models, the operations comprising:
receiving a first source data schema (SDS) representing a first format for recording data in a computer-readable document;
providing a first prompt comprising at least a portion of the first SDS;
generating description data by processing the first prompt using a first large language model (LLM);
providing a second prompt comprising of at least a portion of the first SDS, at least a portion of a first target data schema (TDS), and the description data;
generating first schema conversion code (SCC) by processing the second prompt using a second LLM;
converting a first document from the first SDS to the first TDS using the first SCC;
processing the first document in the first TDS using a ML model to provide inference results; and
automatically executing one or more tasks responsive to the inference results.

### Claim 9 (depends on 8)

The non-transitory computer-readable storage medium of claim 8, wherein converting the first document from the first SDS to the first TDS comprises changing a column name of the first document.

### Claim 10 (depends on 8)

The non-transitory computer-readable storage medium of claim 8, wherein the first prompt comprises a request to generate descriptions for each column in a set of columns of the first SDS.

### Claim 11 (depends on 8)

The non-transitory computer-readable storage medium of claim 8, wherein the second prompt comprises a request to generated the first SCC based on the at least a portion of the first SDS, the at least a portion of a first TDS, and the description data.

### Claim 12 (depends on 8)

The non-transitory computer-readable storage medium of claim 8, wherein the inference results are provided by the ML model further based on a second document in a second TDS.

### Claim 13 (depends on 12)

The non-transitory computer-readable storage medium of claim 12, wherein operations further comprise converting the second document from a second SDS to the second TDS using second SCC.

### Claim 14 (depends on 8)

The non-transitory computer-readable storage medium of claim 8, wherein the ML model comprises a generic line-item matching (GLIM) model that predicts matches between line items of the first document to line items of a second document.

### Claim 15

A system, comprising:
a computing device; and
a computer-readable storage device coupled to the computing device and having instructions stored thereon which, when executed by the computing device, cause the computing device to perform operations for computer-executed entity matching using one or more machine learning (ML) models, the operations comprising:
receiving a first source data schema (SDS) representing a first format for recording data in a computer-readable document;
providing a first prompt comprising at least a portion of the first SDS;
generating description data by processing the first prompt using a first large language model (LLM);
providing a second prompt comprising of at least a portion of the first SDS, at least a portion of a first target data schema (TDS), and the description data;
generating first schema conversion code (SCC) by processing the second prompt using a second LLM;
converting a first document from the first SDS to the first TDS using the first SCC;
processing the first document in the first TDS using a ML model to provide inference results; and
automatically executing one or more tasks responsive to the inference results.

### Claim 16 (depends on 15)

The system of claim 15, wherein converting the first document from the first SDS to the first TDS comprises changing a column name of the first document.

### Claim 17 (depends on 15)

The system of claim 15, wherein the first prompt comprises a request to generate descriptions for each column in a set of columns of the first SDS.

### Claim 18 (depends on 15)

The system of claim 15, wherein the second prompt comprises a request to generated the first SCC based on the at least a portion of the first SDS, the at least a portion of a first TDS, and the description data.

### Claim 19 (depends on 15)

The system of claim 15, wherein the inference results are provided by the ML model further based on a second document in a second TDS.

### Claim 20 (depends on 19)

The system of claim 19, wherein operations further comprise converting the second document from a second SDS to the second TDS using second SCC.
