# US 2026/0065075 A1 · Recommendation process for retrieval-augmented generation (rag) models

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

- Number: US 2026/0065075 A1
- Document ID: US20260065075A1
- Status: Published application
- Kind: A1
- Application number: 18/817,519
- Filed: 2024-08-28
- Published: 2026-03-05
- Earliest claimed: 2024-08-28
- Assignees: The Toronto-Dominion Bank
- Applicants: The Toronto-Dominion Bank
- Inventors: Ilan Gofman; Alexander Clarence; Anuar Yeraliyev; Raunaq Suri; Satya Krishna Gorti; Guangwei Yu; Maksims Volkovs
- Web page: https://patentgrep.com/patent/US20260065075A1

## CPC

- G06N 3/0985: Hyperparameter optimisation; Meta-learning; Learning-to-learn
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

An example operation may include one or more of executing a retrieval augmented generation (RAG) model comprising a set of hyperparameters on input data to generate a predicted output via a software application, measuring runtime attributes of the RAG model based on at least one of execution of the RAG model on the input data and the predicted output, receiving a document that includes thresholds for the runtime attributes for the RAG model, executing an artificial intelligence (AI) model on the runtime attributes and the thresholds in the document to determine optimal hyperparameters for the RAG model, modifying the set of hyperparameters of the RAG model to include the optimal hyperparameters via the software application to generate a modified RAG model, and storing the modified RAG model within a model repository.

## Claims

### Claim 1

An apparatus, comprising:
a memory configured to store a retrieval-augmented generation (RAG) model comprising a set of hyperparameters; and
a processor coupled to the memory, the processor configured to:
execute the RAG model on input data to generate a predicted output via a software application,
measure runtime attributes of the RAG model based on at least one of execution of the RAG model on the input data and the predicted output,
receive a document that includes thresholds for the runtime attributes for the RAG model,
execute an artificial intelligence (AI) model on the runtime attributes and the thresholds in the document to determine optimal hyperparameters for the RAG model,
modify the set of hyperparameters of the RAG model to include the optimal hyperparameters via the software application to generate a modified RAG model, and
execute the modified RAG model on a query to generate a response.

### Claim 2 (depends on 1)

The apparatus of claim 1, wherein the processor is configured to measure latency attributes for at least one of an embedding module, a retriever module, and an evaluator module of the RAG model, and the document comprises latency thresholds for the at least one of the embedding module, the retriever module, and the evaluator module.

### Claim 3 (depends on 1)

The apparatus of claim 1, wherein the processor is configured to measure at least one of precision, recall, relevance, and factual correctness of the RAG model based on the predicted output, and the document comprises thresholds for at least one of precision, recall, relevance, and factual correctness for the RAG model.

### Claim 4 (depends on 1)

The apparatus of claim 1, wherein the processor is configured to iteratively execute the RAG model with different sets of hyperparameters on the input data to generate a plurality of rounds of runtime attributes, and execute the AI model on the plurality of rounds of runtime attributes to determine the optimal hyperparameters.

### Claim 5 (depends on 1)

The apparatus of claim 1, wherein the processor is further configured to generate and output one or more queries to a graphical user interface (GUI) of the software application, receive one or more responses to the one or more queries via the GUI, generate one or more prompts including the one or more queries combined with the one or more responses, respectively, and execute the AI model on the one or more prompts to determine the optimal hyperparameters.

### Claim 6 (depends on 1)

The apparatus of claim 1, wherein the AI model comprises a neural network capability, and the processor is further configured to train the AI model with the neural network capability to determine the optimal hyperparameters based on at least one of other RAG models, hyperparameters of the other RAG models, threshold requirements of the other RAG models, and model feedback data.

### Claim 7 (depends on 1)

The apparatus of claim 1, wherein the processor is further configured to display the optimal hyperparameters for the RAG model via a graphical user interface (GUI) of the software application, receive an input via the GUI which confirms the optimal hyperparameters, and modify the set of hyperparameters of the RAG model to include the optimal hyperparameters in response to the input via the GUI.

### Claim 8

A method comprising:
executing a retrieval-augmented generation (RAG) model comprising a set of hyperparameters on input data to generate a predicted output via a software application;
measuring runtime attributes of the RAG model based on at least one of execution of the RAG model on the input data and the predicted output;
receiving a document that includes thresholds for the runtime attributes for the RAG model;
executing an artificial intelligence (AI) model on the runtime attributes and the thresholds in the document to determine optimal hyperparameters for the RAG model;
modifying the set of hyperparameters of the RAG model to include the optimal hyperparameters via the software application to generate a modified RAG model; and
executing the modified RAG model on a query to generate a response.

### Claim 9 (depends on 8)

The method of claim 8, wherein the measuring comprises measuring latency attributes for at least one of an embedding module, a retriever module, and an evaluator module of the RAG model, and the document comprises latency thresholds for the at least one of the embedding module, the retriever module, and the evaluator module.

### Claim 10 (depends on 8)

The method of claim 8, wherein the measuring comprises measuring at least one of precision, recall, relevance, and factual correctness of the RAG model based on the predicted output, and the document comprises thresholds for at least one of precision, recall, relevance, and factual correctness for the RAG model.

### Claim 11 (depends on 8)

The method of claim 8, wherein the executing the RAG model comprises iteratively executing the RAG model with different sets of hyperparameters on the input data to generate a plurality of rounds of runtime attributes, and the executing the AI model comprises executing the AI model on the plurality of rounds of runtime attributes to determine the optimal hyperparameters.

### Claim 12 (depends on 8)

The method of claim 8, further comprising generating and outputting one or more queries to a graphical user interface (GUI) of the software application, receiving one or more responses to the one or more queries via the GUI, and generating one or more prompts including the one or more queries combined with the one or more responses, respectively, wherein the executing the AI model comprises executing the AI model on the one or more prompts to determine the optimal hyperparameters.

### Claim 13 (depends on 8)

The method of claim 8, wherein the AI model comprises a neural network capability, and the method further comprises training the AI model with the neural network capability to determine the optimal hyperparameters based on at least one of other RAG models, hyperparameters of the other RAG models, threshold requirements of the other RAG models, and model feedback data.

### Claim 14 (depends on 8)

The method of claim 8, further comprising displaying the optimal hyperparameters for the RAG model via a graphical user interface (GUI) of the software application, receiving an input via the GUI which confirms the optimal hyperparameters, and modifying the set of hyperparameters of the RAG model to include the optimal hyperparameters in response to the input via the GUI.

### Claim 15

A computer-readable storage medium comprising instructions which when executed by a computer cause a processor to perform:
executing a retrieval-augmented generation (RAG) model comprising a set of hyperparameters on input data to generate a predicted output via a software application;
measuring runtime attributes of the RAG model based on at least one of execution of the RAG model on the input data and the predicted output,
receiving a document that includes thresholds for the runtime attributes for the RAG model;
executing an artificial intelligence (AI) model on the runtime attributes and the thresholds in the document to determine optimal hyperparameters for the RAG model;
modifying the set of hyperparameters of the RAG model to include the optimal hyperparameters via the software application to generate a modified RAG model; and
executing the modified RAG model on a query to generate a response.

### Claim 16 (depends on 15)

The computer-readable storage medium of claim 15, wherein the measuring comprises measuring latency attributes for at least one of an embedding module, a retriever module, and an evaluator module of the RAG model, and the document comprises latency thresholds for the at least one of the embedding module, the retriever module, and the evaluator module.

### Claim 17 (depends on 15)

The computer-readable storage medium of claim 15, wherein the measuring comprises measuring at least one of precision, recall, relevance, and factual correctness of the RAG model based on the predicted output, and the document comprises thresholds for at least one of precision, recall, relevance, and factual correctness for the RAG model.

### Claim 18 (depends on 15)

The computer-readable storage medium of claim 15, wherein the executing the RAG model comprises iteratively executing the RAG model with different sets of hyperparameters on the input data to generate a plurality of rounds of runtime attributes, and the executing the AI model comprises executing the AI model on the plurality of rounds of runtime attributes to determine the optimal hyperparameters.

### Claim 19 (depends on 15)

The computer-readable storage medium of claim 15, wherein the processor is further configured to perform generating and outputting one or more queries to a graphical user interface (GUI) of the software application, receiving one or more responses to the one or more queries via the GUI, and generating one or more prompts including the one or more queries combined with the one or more responses, respectively, wherein the executing the AI model comprises executing the AI model on the one or more prompts to determine the optimal hyperparameters.

### Claim 20 (depends on 15)

The computer-readable storage medium of claim 15, wherein the AI model comprises a neural network capability, and the processor is further configured to perform training the AI model with the neural network capability to determine the optimal hyperparameters based on at least one of other RAG models, hyperparameters of the other RAG models, threshold requirements of the other RAG models, and model feedback data.
