# US 2026/0064759 A1 · Structured retrieval-augmented generation

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

- Number: US 2026/0064759 A1
- Document ID: US20260064759A1
- Status: Published application
- Kind: A1
- Application number: 18/818,470
- Filed: 2024-08-28
- Published: 2026-03-05
- Earliest claimed: 2024-08-28
- Assignees: Microsoft Technology Licensing, LLC
- Applicants: Microsoft Technology Licensing, LLC
- Inventors: Umesh MADAN; Steven Edward LUCCO
- Web page: https://patentgrep.com/patent/US20260064759A1

## CPC

- G06F 16/367: {Ontology}
- G06F 40/30: Semantic analysis
- G06F 16/33295: {in dialogue systems}
- G06F 16/3344: {using natural language analysis}
- G06N 3/044: Recurrent networks, e.g. Hopfield networks
- G06N 3/045: Combinations of networks
- G06N 3/08: Learning methods
- G06N 3/084: Backpropagation, e.g. using gradient descent
- G06N 5/01: Dynamic search techniques; Heuristics; Dynamic trees; Branch-and-bound
- G06N 5/02: Knowledge representation; Symbolic representation
- G06N 5/022: Knowledge engineering; Knowledge acquisition
- G06N 20/00: Machine learning
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

A computing system including one or more processing devices configured to extract ontology elements from conversational turns. The ontology elements are extracted at least in part by executing a generative language model. The one or more processing devices assign a respective ontology element type to each ontology element and store the ontology elements in an ontology index. The one or more processing devices receive a user input, and, at the generative language model, compute a structured retrieval-augmented generation (RAG) query. The one or more processing devices execute the structured RAG query over the ontology index to obtain one or more retrieved ontology elements. At the generative language model, the one or more processing devices compute and output a generative language model output based at least in part on the user input and the one or more retrieved ontology elements.

## Claims

### Claim 1

A computing system comprising:
one or more processing devices configured to:
extract a plurality of ontology elements from a plurality of conversational turns, wherein the ontology elements are extracted from the conversational turns at least in part by executing a generative language model included in a machine learning system;
assign a respective ontology element type to each of the ontology elements;
store the ontology elements in an ontology index at one or more memory devices, wherein, within the ontology index, the ontology elements are organized according to their ontology element types;
receive a user input to the machine learning system;
at the generative language model, compute a structured retrieval-augmented generation (RAG) query based at least in part on the user input;
execute the structured RAG query over the ontology index to obtain one or more retrieved ontology elements from the ontology index;
at the generative language model, compute a generative language model output based at least in part on the user input and the one or more retrieved ontology elements; and
output the generative language model output.

### Claim 2 (depends on 1)

The computing system of claim 1, wherein the one or more processing devices are further configured to:
generate the structured RAG query to include one or more target ontology element types of the one or more retrieved ontology elements; and
during execution of the structured RAG query:
select a domain-specific agent from among a plurality of domain-specific agents based at least in part on the one or more target ontology element types; and
select the one or more retrieved ontology elements at least in part by executing the selected domain-specific agent.

### Claim 3 (depends on 2)

The computing system of claim 2, wherein:
the ontology index includes respective domain ontology indices associated with the domain-specific agents; and
during execution of the structured RAG query, the one or more processing devices are configured to obtain at least one of the one or more retrieved ontology elements from the domain ontology index of the selected domain-specific agent.

### Claim 4 (depends on 3)

The computing system of claim 3, wherein, during extraction of the plurality of ontology elements from the plurality of conversational turns, the one or more processing devices are further configured to:
at the generative language model, classify at least a portion of the plurality of ontology elements into respective domains;
store the classified ontology elements in the respective domain ontology indices of those domains.

### Claim 5 (depends on 1)

The computing system of claim 1, wherein the structured RAG query is an exact-match search query for one or more of the ontology elements that have a target ontology element type.

### Claim 6 (depends on 5)

The computing system of claim 5, wherein the one or more processing devices are further configured to:
determine that the structured RAG query returns no exact matches to the target ontology element type; and
in response to determining that the structured RAG query returns no exact matches:
compute a plurality of cosine similarity values between respective embeddings of:
the target ontology element type; and
respective ontology elements stored in the ontology index; and
select, as the one or more retrieved ontology elements, one or more of the ontology elements that have cosine similarity values above a predefined cosine similarity threshold.

### Claim 7 (depends on 1)

The computing system of claim 1, wherein the one or more processing devices are further configured to:
store, at the one or more memory devices, a conversation history including the plurality of conversational turns;
store respective timestamps of the ontology elements in the ontology index; and
compute the generative language model output at least in part by, for each of the one or more retrieved ontology elements, inputting a respective portion of the conversation history located within a predefined time interval of the timestamp of that retrieved ontology element into a context of the generative language model.

### Claim 8 (depends on 1)

The computing system of claim 1, wherein the one or more processing devices are further configured to extract the ontology elements from the conversational turns at least in part by:
inserting an extraction prompt fragment into a context of the generative language model; and
during the plurality of conversational turns, based at least in part on the context that includes the extraction prompt fragment, extracting the ontology elements in parallel with generation of respective responses.

### Claim 9 (depends on 1)

The computing system of claim 1, wherein the ontology index has a hierarchical structure in which the ontology elements at a first level are indicated as facets of respective ontology elements at a second level.

### Claim 10 (depends on 9)

The computing system of claim 9, wherein:
the hierarchical structure of the ontology index includes a plurality of supertypes assigned to the ontology elements; and
the plurality of supertypes include an entity supertype, an action supertype, and a topic supertype.

### Claim 11 (depends on 1)

The computing system of claim 1, wherein the one or more processing devices are further configured to:
compute an aggregated ontology element at the generative language model based at least in part on a subset of the plurality of ontology elements extracted from the conversational turns;
store the aggregated ontology element in the ontology index; and
during execution of the structured RAG query, retrieve the aggregated ontology element from the ontology index.

### Claim 12

A method for use with a computing system, the method comprising:
extracting a plurality of ontology elements from a plurality of conversational turns, wherein the ontology elements are extracted from the conversational turns at least in part by executing a generative language model included in a machine learning system;
assigning a respective ontology element type to each of the ontology elements;
storing the ontology elements in an ontology index at one or more memory devices, wherein, within the ontology index, the ontology elements are organized according to their ontology element types;
receiving a user input to the machine learning system;
at the generative language model, computing a structured retrieval-augmented generation (RAG) query based at least in part on the user input;
executing the structured RAG query over the ontology index to obtain one or more retrieved ontology elements from the ontology index;
at the generative language model, computing a generative language model output based at least in part on the user input and the one or more retrieved ontology elements; and
outputting the generative language model output.

### Claim 13 (depends on 12)

The method of claim 12, further comprising:
generating the structured RAG query to include one or more target ontology element types of the one or more retrieved ontology elements; and
during execution of the structured RAG query:
selecting a domain-specific agent from among a plurality of domain-specific agents based at least in part on the one or more target ontology element types; and
selecting the one or more retrieved ontology elements at least in part by executing the selected domain-specific agent.

### Claim 14 (depends on 13)

The method of claim 13, wherein:
the ontology index includes respective domain ontology indices associated with the domain-specific agents; and
during execution of the structured RAG query, at least one of the one or more retrieved ontology elements is obtained from the domain ontology index of the selected domain-specific agent.

### Claim 15 (depends on 14)

The method of claim 14, wherein, during extraction of the plurality of ontology elements from the plurality of conversational turns, the method further comprises:
at the generative language model, classifying at least a portion of the plurality of ontology elements into respective domains;
storing the classified ontology elements in the respective domain ontology indices of those domains.

### Claim 16 (depends on 11)

The method of claim 11, wherein the structured RAG query is an exact-match search query for one or more of the ontology elements that have a target ontology element type.

### Claim 17 (depends on 16)

The method of claim 16, further comprising:
determining that the structured RAG query returns no exact matches to the target ontology element type; and
in response to determining that the structured RAG query returns no exact matches:
computing a plurality of cosine similarity values between respective embeddings of:
the target ontology element type; and
respective ontology elements stored in the ontology index; and
selecting, as the one or more retrieved ontology elements, one or more of the ontology elements that have cosine similarity values above a predefined cosine similarity threshold.

### Claim 18 (depends on 11)

The method of claim 11, wherein extracting the ontology elements from the conversational turns includes:
inserting an extraction prompt fragment into a context of the generative language model; and
during the plurality of conversational turns, based at least in part on the context that includes the extraction prompt fragment, extracting the ontology elements in parallel with generation of respective responses.

### Claim 19 (depends on 11)

The method of claim 11, wherein the ontology index has a hierarchical structure in which the ontology elements at a first level are indicated as facets of respective ontology elements at a second level.

### Claim 20

A computing system comprising:
one or more memory devices storing an ontology index, wherein:
within the ontology index, a plurality of ontology elements are organized according to respective ontology element types;
the ontology index includes respective domain ontology indices associated with a plurality of domain-specific agents; and
one or more processing devices configured to:
receive a user input to a machine learning system;
at a generative language model, compute a structured retrieval-augmented generation (RAG) query based at least in part on the user input, wherein the structured RAG query includes one or more target ontology element types;
execute the structured RAG query over the ontology index to obtain, from the ontology index, one or more retrieved ontology elements that respectively have the one or more target ontology element types, wherein executing the structured RAG query includes:
selecting a domain-specific agent from among a plurality of domain-specific agents based at least in part on the one or more target ontology element types; and
selecting the one or more retrieved ontology elements at least in part by executing the selected domain-specific agent;
at the generative language model, compute a generative language model output based at least in part on the user input and the one or more retrieved ontology elements; and
output the generative language model output.
