# US 12,762,134 B2 · Self-healing generative AI/ML pipeline for generating complex data queries leveraging semantic data model

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

- Number: US 12,762,134 B2
- Document ID: US12762134B2
- Status: Granted
- Kind: B2
- Application number: 19/067,566
- Filed: 2025-02-28
- Published: 2026-01-01
- Granted: 2026-10-13
- Earliest claimed: 2024-06-28
- Assignees: Goldman, Sachs & Co.
- Applicants: Goldman Sachs & Co. LLC
- Inventors: Jaimita Bansal; Pierre De Belen
- Web page: https://patentgrep.com/patent/US12762134B2

## CPC

- G06F 16/2471: {Distributed queries}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method includes providing a user query to an AI/ML pipeline. The user query requests a response based on data stored in a data topology, and the data topology is modeled using a semantic data model. The method also includes generating an initial data access query for retrieving the data from the data topology using the AI/ML pipeline and the semantic data model. The method further includes determining that the initial data access query includes a hallucination or error and performing an automatic loop one or more times. The automatic loop includes generating an updated data access query for retrieving the data; determining whether the updated data access query includes a hallucination or error; and, if so, repeating the automatic loop. In addition, the method includes using a final data access query with no hallucination or error to retrieve the data from the data topology in order to generate the response.

## Claims

### Claim 1

A method comprising:
providing a user query to a self-healing multi-agent artificial intelligence/machine learning (AI/ML) pipeline, the user query requesting a response based on data stored in a data topology, the data topology modeled using a semantic data model;
generating an initial data access query for retrieving the data from the data topology using the AI/ML pipeline and the semantic data model;
determining that the initial data access query includes a hallucination or error;
performing an automatic loop one or more times, wherein the automatic loop includes:
generating an updated data access query for retrieving the data from the data topology using the AI/ML pipeline and the semantic data model;
determining whether the updated data access query includes a hallucination or error; and
if the updated data access query includes a hallucination or error, repeating the automatic loop; and
using a final data access query with no hallucination or error, as generated by the automatic loop, to retrieve the data from the data topology in order to generate the response;
wherein:
the self-healing multi-agent AI/ML pipeline comprises a dataspace agent, a class agent, a property agent, a query agent, and a self-healing agent;
the dataspace agent selects one of multiple dataspaces associated with the user query;
the class agent selects at least one of multiple classes associated with the selected dataspace, the at least one selected class mapped to the data topology;
the property agent selects at least one of multiple properties within the at least one selected class; and
the query agent generates each data access query based on at least one of: the at least one selected class and the at least one selected property.

### Claim 2 (depends on 1)

The method of claim 1, wherein:
the semantic data model provides context to the dataspace, class, property, and query agents of the AI/ML pipeline; and
the dataspace, class, property, and query agents comprise one or more AI/ML models that generate responses when prompted by the dataspace, class, property, and query agents.

### Claim 3 (depends on 1)

The method of claim 1, wherein:
the data topology includes tabular data; and
the semantic data model allows the AI/ML pipeline to understand columns of data in the tabular data.

### Claim 4 (depends on 1)

The method of claim 1, wherein the semantic data model models the data topology using the multiple classes and the multiple properties that are semantically aligned with natural language on which the AI/ML pipeline is trained.

### Claim 5 (depends on 4)

The method of claim 4, wherein at least some of the multiple classes are associated with multiple associations in the semantic data model.

### Claim 6 (depends on 1)

The method of claim 1, wherein the self-healing agent determines, for each data access query, whether:
a syntax of the data access query has one or more errors;
at least one property in the data access query exists;
one or more values in the data access query are proper; and
a data type of a value in the data access query matches an expected data type.

### Claim 7 (depends on 1)

The method of claim 1, wherein at least one of the data access queries is based on one or more of:
filtering of at least one of classes and properties defined in the semantic data model based on the user query; and
joining of at least one of classes and properties defined at multiple levels in the semantic data model based on the user query.

### Claim 8 (depends on 1)

The method of claim 1, wherein performing the automatic loop further comprises:
selecting, from among a plurality of prescription plans, a prescription plan associated with the hallucination or error; and
generating the updated data access query using the AI/ML pipeline based on the selected prescription plan.

### Claim 9 (depends on 1)

The method of claim 1, wherein:
the hallucination or error comprises an incorrect dataspace selected by the dataspace agent or an incorrect class selected by the class agent; and
performing the automatic loop comprises rerunning, using additional information provided to the AI/ML pipeline, at least one of:
the dataspace agent to select a different dataspace; or
the class agent to select one or more different classes.

### Claim 10 (depends on 1)

The method of claim 1, wherein, when the hallucination or error comprises an incorrect enumerated value, generating the updated data access query comprises selecting a value that most closely matches a prior output of the AI/ML pipeline.

### Claim 11 (depends on 1)

The method of claim 1, wherein the class agent comprises a prompt collection function configured to:
receive the user query, information from a metadata server, and another curated prompt; and
produce a generated prompt that, when provided to an AI/ML model, causes the AI/ML model to respond by identifying at least one of the multiple classes that appears most relevant to the user query.

### Claim 12 (depends on 1)

The method of claim 1, wherein the property agent comprises a prompt collection function configured to:
receive the user query, information from a metadata server, and another curated prompt; and
produce a generated prompt that, when provided to an AI/ML model, causes the AI/ML model to respond by identifying at least one of the multiple properties that is associated with the user query.

### Claim 13 (depends on 1)

The method of claim 1, wherein the query agent comprises a prompt collection function configured to:
receive the user query, information from a metadata server, and another curated prompt; and
produce a generated prompt that, when provided to an AI/ML model, causes the AI/ML model to generate a response that includes the data access query.

### Claim 14

An apparatus comprising:
at least one processing device configured to:
provide a user query to a self-healing multi-agent artificial intelligence/machine learning (AI/ML) pipeline, the user query requesting a response based on data stored in a data topology, the data topology modeled using a semantic data model;
generate an initial data access query for retrieving the data from the data topology using the AI/ML pipeline and the semantic data model;
determine that the initial data access query includes a hallucination or error;
perform an automatic loop one or more times, wherein, to perform the automatic loop, the at least one processing device is configured to:
generate an updated data access query for retrieving the data from the data topology using the AI/ML pipeline and the semantic data model;
determine whether the updated data access query includes a hallucination or error; and
if the updated data access query includes a hallucination or error, repeat the automatic loop; and
use a final data access query with no hallucination or error, as generated by the automatic loop, to retrieve the data from the data topology in order to generate the response;
wherein:
the self-healing multi-agent AI/ML pipeline comprises a dataspace agent, a class agent, a property agent, a query agent, and a self-healing agent;
the dataspace agent is configured to select one of multiple dataspaces associated with the user query;
the class agent is configured to select at least one of multiple classes associated with the selected dataspace, the at least one selected class mapped to the data topology;
the property agent is configured to select at least one of multiple properties within the at least one selected class; and
the query agent is configured to generate each data access query based on at least one of: the at least one selected class and the at least one selected property.

### Claim 15 (depends on 14)

The apparatus of claim 14, wherein:
the semantic data model provides context to the dataspace, class, property, and query agents of the AI/ML pipeline; and
the dataspace, class, property, and query agents comprise one or more AI/ML models configured to generate responses when prompted by the dataspace, class, property, and query agents.

### Claim 16 (depends on 14)

The apparatus of claim 14, wherein the semantic data model models the data topology using the multiple classes and the multiple properties that are semantically aligned with natural language on which the AI/ML pipeline is trained.

### Claim 17 (depends on 16)

The apparatus of claim 16, wherein at least some of the multiple classes are associated with multiple associations in the semantic data model.

### Claim 18 (depends on 14)

The apparatus of claim 14, wherein the self-healing agent is configured to determine, for each data access query, whether:
a syntax of the data access query has one or more errors;
at least one property in the data access query exists;
one or more values in the data access query are proper; and
a data type of a value in the data access query matches an expected data type.

### Claim 19

A non-transitory computer readable medium containing instructions that when executed cause at least one processor to:
provide a user query to a self-healing multi-agent artificial intelligence/machine learning (AI/ML) pipeline, the user query requesting a response based on data stored in a data topology, the data topology modeled using a semantic data model;
generate an initial data access query for retrieving the data from the data topology using the AI/ML pipeline and the semantic data model;
determine that the initial data access query includes a hallucination or error;
perform an automatic loop one or more times, wherein the instructions when executed cause the at least one processor, during the automatic loop, to:
generate an updated data access query for retrieving the data from the data topology using the AI/ML pipeline and the semantic data model;
determine whether the updated data access query includes a hallucination or error; and
if the updated data access query includes a hallucination or error, repeat the automatic loop; and
use a final data access query with no hallucination or error, as generated by the automatic loop, to retrieve the data from the data topology in order to generate the response;
wherein:
the self-healing multi-agent AI/ML pipeline comprises a dataspace agent, a class agent, a property agent, a query agent, and a self-healing agent;
the dataspace agent is configured to select one of multiple dataspaces associated with the user query;
the class agent is configured to select at least one of multiple classes associated with the selected dataspace, the at least one selected class mapped to the data topology;
the property agent is configured to select at least one of multiple properties within the at least one selected class; and
the query agent is configured to generate each data access query based on at least one of: the at least one selected class and the at least one selected property.

### Claim 20 (depends on 19)

The non-transitory computer readable medium of claim 19, wherein:
the semantic data model provides context to the dataspace, class, property, and query agents of the AI/ML pipeline; and
the dataspace, class, property, and query agents comprise one or more AI/ML models configured to generate responses when prompted by the dataspace, class, property, and query agents.
