# US 2025/0156419 A1 · Generative ai-driven multi-source data query system

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

- Number: US 2025/0156419 A1
- Document ID: US20250156419A1
- Status: Published application
- Kind: A1
- Application number: 18/505,873
- Filed: 2023-11-09
- Published: 2025-05-15
- Earliest claimed: 2023-11-09
- Assignees: Microsoft Technology Licensing, LLC
- Applicants: Microsoft Technology Licensing, LLC
- Inventors: Sagar Ketan Shah; Amir Jalali
- Web page: https://patentgrep.com/patent/US20250156419A1

## CPC

- G06F 16/24522: {Translation of natural language queries to structured queries}
- G06F 16/2455: Query execution
- G06F 16/2452: Query translation
- G06F 16/248: Presentation of query results
- G06F 16/254: {Extract, transform and load [ETL] procedures, e.g. ETL data flows in data warehouses}
- G06F 16/2425: {Iterative querying; Query formulation based on the results of a preceding query}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Embodiments of the disclosed technologies include, in response to receiving a query, matching the query to metadata from a plurality of heterogeneous data sources, and selecting one or more data sources from the plurality of heterogeneous data sources for answering the query, by sending the query and embeddings of the matched metadata to a generative artificial intelligence (GAI), and prompting the GAI to select matching data sources. Based on the data from the GAI, generating one or more custom queries targeted to the matching data sources selected by the GAI, the custom queries formatted to be sent to the selected data sources, executing the one or more custom queries across the selected data sources, and summarizing results from the executing and providing a response to the query.

## Claims

### Claim 1

A method comprising:
receiving a query;
matching the query to metadata from a plurality of heterogeneous data sources;
selecting one or more data sources from the plurality of heterogeneous data sources for answering the query, by sending the query and embeddings of the matched metadata to a generative artificial intelligence (GAI) and prompting the GAI to select matching data sources;
generating one or more custom queries targeted to the matching data sources selected by the GAI, the custom queries formatted to be sent to the selected data sources;
executing the one or more custom queries at the selected data sources;
summarizing results from the executing; and
providing a response to the query.

### Claim 2 (depends on 1)

The method of claim 1, wherein the matching the query comprises:
identifying one or more text chunks in the query;
matching each text chunk to the metadata, the metadata representing data types and relationships in the data sources;
customizing the query by embedding the matched metadata associated with the text chunks to the query to generate a dynamic query.

### Claim 3 (depends on 1)

The method of claim 1, further comprising:
separating the query into a plurality of single subject questions, using the GAI.

### Claim 4 (depends on 3)

The method of claim 3, further comprising:
identifying any dependency between the single subject questions returned by the GAI; and
sequencing the single subject questions based on the identified dependency.

### Claim 5 (depends on 3)

The method of claim 3, further comprising:
after receiving a first response to a first custom query from a first data source, utilizing the first response to update a second custom query, prior to sending the second query to a data source.

### Claim 6 (depends on 1)

The method of claim 1, wherein identifying one or more data sources comprises, for each question:
matching the question to question pools associated with each of the plurality of data sources.

### Claim 7 (depends on 6)

The method of claim 6, wherein each of the plurality of data sources are pre-processed, and wherein preprocessing extracts a schema of the data source, metadata from the data source, and sample data from the data source.

### Claim 8 (depends on 7)

The method of claim 7, wherein the extracted data is formatted into a descriptive text and stored in a vector store as the metadata for the data source.

### Claim 9 (depends on 1)

The method of claim 1, wherein generating a custom query comprises:
identifying a language associated with the data source;
identifying a data format for the data source;
translating the query into the language and data format of the data source; and
attaching metadata associated with the data source.

### Claim 10 (depends on 1)

The method of claim 1, wherein the query is a natural language query.

### Claim 11

A system comprising:
at least one processor;
at least one memory coupled to the at least one processor, wherein the at least one memory comprises instructions that, when executed by the at least one processor, cause the at least one processor to perform at least one operation comprising:
receiving a query;
matching the query to metadata from a plurality of heterogeneous data sources;
selecting one or more data sources from the plurality of heterogeneous data sources for answering the query, by sending the query and embeddings of the matched metadata to a generative artificial intelligence (GAI) and prompting the GAI to select matching data sources;
generating one or more custom queries targeted to the matching data sources selected by the GAI, the custom queries formatted to be sent to the selected data sources;
executing the one or more custom queries across the selected data sources; and
summarizing results from the executing and providing a response to the query.

### Claim 12 (depends on 11)

The system of claim 11, wherein the matching the query comprises:
identifying one or more text chunks in the query;
matching each text chunk to the metadata, the metadata representing data types and relationships in the data sources;
customizing the query by embedding the matched metadata associated with the text chunks to the query to generate a dynamic query.

### Claim 13 (depends on 11)

The system of claim 11, further comprising:
separating the query into a plurality of single subject questions, using the GAI.

### Claim 14 (depends on 13)

The system of claim 13, further comprising:
identifying any dependency between the single subject questions returned by the GAI;
sequencing the single subject questions based on the identified dependency; and
after receiving a first response to a first custom query from a first data source, utilizing the first response to update a second custom query, prior to sending the second query to a data source.

### Claim 15 (depends on 11)

The system of claim 11, wherein identifying one or more data sources comprises, for each question:
matching the question to question pools associated with each of the plurality of heterogeneous data sources.

### Claim 16 (depends on 15)

The system of claim 15, wherein each of the plurality of data sources are pre-processed, and wherein preprocessing extracts a schema of the data source, metadata from the data source, and sample data from the data source.

### Claim 17 (depends on 16)

The system of claim 16, wherein the extracted data is formatted into a descriptive text and stored in a vector store as the metadata for the data source.

### Claim 18 (depends on 11)

The system of claim 11, wherein generating a custom query comprises:
identifying a language associated with the data source;
identifying a data format for the data source;
translating the query into the language and data format of the data source; and
attaching metadata associated with the data source.

### Claim 19 (depends on 11)

The system of claim 11, wherein the query is a natural language query.

### Claim 20

A non-transitory computer readable medium containing program instructions for causing a computer to perform a method comprising:
receiving a query;
matching the query to metadata from a plurality of heterogeneous data sources;
selecting one or more data sources from the plurality of heterogeneous data sources for answering the query, by sending the query and embeddings of the matched metadata to a generative artificial intelligence (GAI) and prompting the GAI to select matching data sources;
generating one or more custom queries targeted to the matching data sources selected by the GAI, the custom queries formatted to be sent to the selected data sources;
executing the one or more custom queries at the selected data sources;
summarizing results from the executing; and
providing a response to the query.
