# US 2026/0093741 A1 · Performance optimization with reflection tokens in a self-reflective retrieval-augmented generation framework

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

- Number: US 2026/0093741 A1
- Document ID: US20260093741A1
- Status: Published application
- Kind: A1
- Application number: 18/902,882
- Filed: 2024-09-30
- Published: 2026-04-02
- Earliest claimed: 2024-09-30
- Assignees: Intuit Inc.
- Applicants: Intuit Inc.
- Inventors: Linoy COHEN; Matan VETZLER; Nitzan Gado SAGINHOR; Shai ARDAZI
- Web page: https://patentgrep.com/patent/US20260093741A1

## CPC

- G06F 16/3347: {using vector based model}
- G06F 40/284: Lexical analysis, e.g. tokenisation or collocates
- G06F 40/30: Semantic analysis
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method includes obtaining data source tokens that identify corresponding data sources, and adding the data source tokens to a vocabulary list of a response tokenizer. An internal mapping of the response tokenizer is updated with the data source tokens, mapping each data source token to a corresponding token identifier (ID). Vector representations corresponding to the data source tokens are added to a response embedding model. The response tokenizer and the response embedding model are included in a response foundation model. An annotated dataset including multiple instances of an input utterances, retrieved data, and a data source token is created. The retrieved data is retrieved from a data source corresponding to the data source token. The response foundation model is trained with the annotated dataset to output data source tokens for a new input utterance based on a context of the new input utterance.

## Claims

### Claim 1

A method comprising:
obtaining a plurality of data source tokens, identifying a corresponding plurality of data sources;
adding the plurality of data source tokens to a vocabulary list of a response tokenizer of a response foundation model;
updating an internal mapping of the response tokenizer with the plurality of data source tokens to map each data source token of the plurality of data source tokens to a corresponding token identifier (ID);
adding a plurality of vector representations corresponding to the plurality of data source tokens to a response embedding model of the response foundation model;
creating an annotated dataset comprising a plurality of instances, each instance comprising an input utterance, a retrieved data, and a data source token, wherein the retrieved data is retrieved from a data source corresponding to the data source token; and
training the response foundation model with the annotated dataset to output data source tokens for a new input utterance based on a context of the new input utterance.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
training the response foundation model to output data source tokens by maximizing a conditional language modeling objective; and
adjusting weights and parameters of the response foundation model to minimize a next token prediction loss function value.

### Claim 3 (depends on 1)

The method of claim 1, further comprising:
creating a training dataset for the response foundation model, including at least an input-output pair comprising a training input and a training output, by:
augmenting the training input with at least a training data source token by a training application, wherein the training data source token is selected based on a training context corresponding to the training input and the training output, wherein the training output includes a training retrieved data retrieved from a training data source corresponding to the training data source token.

### Claim 4 (depends on 1)

The method of claim 1, further comprising:
training the response foundation model with a training dataset to output a response segment by:
training the response foundation model to invoke a document retriever to retrieve data from a data source identified by a training data source token in a training input of the training dataset, and
training the response foundation model to generate the response segment based on the training input and the retrieved data.

### Claim 5 (depends on 1)

The method of claim 1, further comprising:
receiving, by a response generator, a prompt from an enterprise application;
determining a prompt context corresponding to the prompt by the response foundation model, wherein the response generator includes the response foundation model;
augmenting the prompt with at least one new data source token, based on the prompt context by the response foundation model; and
retrieving at least one new retrieved data from a new data source identified by the new data source token by a document retriever.

### Claim 6 (depends on 1)

The method of claim 1, further comprising:
receiving, by a response generator, a prompt from an enterprise application, and at least one new retrieved data from a document retriever, the at least one new retrieved data corresponding to a new data source identified by a new data source token, wherein the response generator includes the response foundation model; and
generating, by the response foundation model, a first response segment based on the at least one new retrieved data.

### Claim 7 (depends on 1)

The method of claim 1, further comprising:
evaluating, by a response generator, a relevance of a first response segment based on a prompt and the first response segment; and
evaluating, by the response generator, a validity of the first response segment based on a semantic similarity of the first response segment to an at least one retrieved data of a new data source identified by a new data source token in the prompt.

### Claim 8 (depends on 7)

The method of claim 7, further comprising:
evaluating, by the response foundation model of the response generator, a utility of the first response segment, based on the relevance of the first response segment and the validity of the first response segment.

### Claim 9 (depends on 1)

The method of claim 1, further comprising:
identifying, by a response foundation model of a response generator, a second new data source based on the context of a first response segment; and
augmenting, by the response foundation model of the response generator, the first response segment with a second new data source token identifying the second new data source.

### Claim 10

A method comprising:
augmenting a prompt with at least one new data source token by a response foundation model of a response generator;
retrieving at least one new retrieved data from a new data source identified by the new data source token by a document retriever invoked by the response generator;
generating a first response segment based on the at least one new retrieved data by the response foundation model;
evaluating, by the response generator, a relevance of the first response segment;
evaluating, by the response generator, a validity of the first response segment;
evaluating, by the response generator, a utility of the first response segment, based on the relevance of the first response segment and the validity of the first response segment; and
responsive to a determination of an additional retrieval based on a context of the first response segment, augmenting the first response segment with a second new data source token by the response foundation model.

### Claim 11 (depends on 10)

The method of claim 10, further comprising:
retrieving at least a second new retrieved data from a second new data source identified by the second new data source token by the document retriever; and
generating a second response segment based on at least the second new retrieved data by the response foundation model.

### Claim 12 (depends on 11)

The method of claim 11, further comprising:
generating a final response including at least the first response segment and the second response segment, based on a first utility of the first response segment and a second utility of the second response segment; and
transmitting the final response to an enterprise application by the response generator.

### Claim 13 (depends on 10)

The method of claim 10, further comprising:
responsive to the determination by the response generator precluding the additional retrieval, transmitting a final response obtained by combining previous response segments to an enterprise application by the response generator.

### Claim 14 (depends on 10)

The method of claim 10, wherein augmenting the prompt further comprises:
receiving, by the response generator, the prompt from an enterprise application;
determining the context of the prompt by the response foundation model; and
augmenting the prompt with the at least one new data source token, based on the context of the prompt by the response foundation model.

### Claim 15 (depends on 10)

The method of claim 10, wherein the relevance of the first response segment is evaluated based on the prompt and the first response segment.

### Claim 16 (depends on 10)

The method of claim 10, wherein the validity of the first response segment is evaluated based on a semantic similarity of the first response segment to the at least one new retrieved data of the new data source.

### Claim 17

A system comprising:
memory; and
at least one computer processor configured to execute instructions for causing the system to perform operations comprising:
augmenting a prompt with at least one new data source token by a response foundation model of a response generator,
retrieving at least one new retrieved data from a new data source identified by the new data source token by a document retriever invoked by the response generator,
generating a first response segment based on the at least one new retrieved data by the response foundation model,
evaluating, by the response generator, a relevance of the first response segment,
evaluating, by the response generator, a validity of the first response segment,
evaluating, by the response generator, a utility of the first response segment, based on the relevance of the first response segment and the validity of the first response segment, and
responsive to a determination of an additional retrieval based on a context of the first response segment, augmenting the first response segment with a second new data source token by the response foundation model.

### Claim 18 (depends on 17)

The system of claim 17, wherein the at least one computer processor is further configured to execute the instructions for causing the system to perform the operations comprising:
retrieving at least a second new retrieved data from a second new data source identified by the second new data source token by the document retriever; and
generating a second response segment corresponding to the prompt based on at least the second new retrieved data by the response foundation model.

### Claim 19 (depends on 18)

The system of claim 18, wherein the at least one computer processor is further configured to execute the instructions for causing the system to perform the operations comprising:
generating a final response including at least the first response segment and the second response segment, based on a first utility of the first response segment and a second utility of the second response segment; and
transmitting the final response to an enterprise application by the response generator.

### Claim 20 (depends on 17)

The system of claim 17, wherein the at least one computer processor is further configured to execute the instructions for causing the system to perform the operations comprising:
responsive to a determination precluding the additional retrieval, transmitting a final response obtained by combining previous response segments to an enterprise application by the response generator.
