IP Library Granted Patent US 12,450,217
Granted Patent B1
US 12,450,217 · App. 18/413,532 · Granted Oct 21, 2025

Systems and methods for agent-controlled federated retrieval-augmented generation

Inventors: Shaunak Godbole (San Francisco, CA); Shih Ping Chang (San Francisco, CA); Clemens Mewald (Lafayette, CA); Anant Bhardwaj (San Francisco, CA)
Assignee: Instabase, Inc.
G06F16/2237G06F40/40
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,450,217
App. No.
18/413,532
Filed
Jan 16, 2024
Granted
Oct 21, 2025
Kind
B1
Examiner
VO, CECILE H
Art Unit
2153
USPC
707/803
Abstract

Systems and methods for controlling retrieval-augmented generation (RAG) using a set of vector databases are disclosed. Exemplary implementations may: convert content within sets of electronic files into sets of vector embeddings stored in vector databases; receive user input representing a user query; generate agent queries based on tasks included in the user query; select subsets of the vector embeddings based on the agent queries; provide the subsets to one or more machine learning models as context; provide prompts to the one or more machine learning models; obtain replies in response to the prompts; generate a reply to the user query; effectuate a presentation of the reply, and/or perform other steps.

Claims (65)

1. A system configured to control retrieval-augmented generation (RAG) using a set of multiple vector databases storing vector embeddings for multiple sets of electronic files, the system comprising:

one or more hardware processors configured by machine readable instructions to:

convert content within a first set of electronic files into a first set of vector embeddings stored in a first vector database;

convert content within a second set of electronic files into a second set of vector embeddings stored in a second vector database;

convert content within a third set of electronic files into a third set of vector embeddings stored in a third vector database;

receive user input representing a user query, wherein the user query entails a set of tasks, wherein the set of tasks includes at least a first task associated with the first set of electronic files and a second task associated with the second set of electronic files;

generate a first agent query based on the first task and a second agent query based on the second task, wherein generating the first and second agent query is performed by the one or more machine learning models;

perform a first selection of a first subset of the first set of vector embeddings based on the first agent query, wherein performing the first selection includes generating, using an embedding model, a first retrieval vector embedding based on the first agent query, and comparing semantic distance between the vector embeddings in the first set and the first retrieval vector embedding;

provide the first subset of the first set of vector embeddings to one or more machine learning models as context for a first prompt based on the first agent query;

provide the first prompt to the one or more machine learning models;

obtain a first reply from the one or more machine learning models in response to the first prompt;

perform a second selection of a second subset of the second set of vector embeddings based on the second agent query, wherein the second selection includes generating, using the embedding model, a second retrieval vector embedding based on the second agent query and comparing semantic distance between the vector embeddings in the second set and the second retrieval vector embedding;

provide the second subset of the second set of vector embeddings to the one or more machine learning models as context for a second prompt based on the second agent query;

provide the second prompt to the one or more machine learning models;

obtain a second reply from the one or more machine learning models in response to the second prompt;

generate a reply to the user query, wherein the reply is based on the first reply and the second reply; and

effectuate a presentation of the reply to a user, through a user interface.

2. The system of claim 1 , wherein the one or more machine learning models include a large language model (LLM).

3. The system of claim 1 , wherein the first, second, and third vector databases are stored in different locations.

4. The system of claim 1 , wherein the first set of vector embeddings has been generated by and received from an embedding model, wherein the embedding model is external to the system.

5. The system of claim 4 , wherein the first set of vector embeddings represent semantic information in the first set of electronic files numerically through hyperdimensional vectors.

6. The system of claim 1 , wherein the first agent query represents the first task numerically through a hyperdimensional vector.

7. The system of claim 1 , wherein generating the reply includes:

(i) generating a prompt based on the first reply and the second reply;

(ii) providing the prompt to the one or more machine learning models; and

(iii) obtaining the reply from the one or more machine learning models.

8. The system of claim 1 , wherein the set of tasks includes a third task associated with the third set of files, wherein the one or more hardware processors are further configured to:

generate a third agent query based on the third task, using the embedding model;

select a third subset of the third set of vector embeddings based on the third agent query;

provide a third subset of the third set of vector embeddings to the one or more machine learning models as context for a third prompt based on the third agent query; and

obtain a third reply from the one or more machine learning models in response to the third prompt;

wherein the reply to the user query is further based on the third reply.

9. The system of claim 1 , wherein the set of tasks includes a third task to be completed using a particular tool, wherein the first reply and the second reply are used as inputs for the third task, wherein the one or more hardware processors are further configured to:

perform the third task using the particular tool,

wherein the reply is based on output from the particular tool.

10. The method of claim 1 , wherein the set of tasks includes a third task associated with the third set of files, the method further comprising:

generating a third agent query based on the third task, using the embedding model;

selecting a third subset of the third set of vector embeddings based on the third agent query;

providing a third subset of the third set of vector embeddings to the one or more machine learning models as context for a third prompt based on the third agent query; and

obtaining a third reply from the one or more machine learning models in response to the third prompt;

wherein the reply to the user query is further based on the third reply.

11. A method of controlling retrieval-augmented generation (RAG) using a set of multiple vector databases storing vector embeddings for multiple sets of electronic files, the method comprising:

converting (i) content within a first set of electronic files into a first set of vector embeddings stored in a first vector database, (ii) content within a second set of electronic files into a second set of vector embeddings stored in a second vector database, and (iii) content within a third set of electronic files into a second set of vector embeddings stored in a third vector database;

receiving user input representing a user query, wherein the user query entails a set of tasks, wherein the set of tasks includes at least a first task associated with the first set of electronic files and a second task associated with the second set of electronic files;

generating, by the one or more machine learning models, a first agent query based on the first task and a second agent query based on the second task;

performing a first selection of a first subset of the first set of vector embeddings based on the first agent query, wherein performing the first selection includes generating, using an embedding model, a first retrieval vector embedding based on the first agent query, and comparing semantic distance between the vector embeddings in the first set and the first retrieval vector embedding;

providing the first subset of the first set of vector embeddings to one or more machine learning models as context for a first prompt based on the first agent query, and providing the first prompt to the one or more machine learning models;

obtaining a first reply from the one or more machine learning models in response to the first prompt;

performing a second selection of a second subset of the second set of vector embeddings based on the second agent query, wherein performing the second selection includes generating, using the embedding model, a second retrieval vector embedding based on the second agent query, and comparing semantic distance between the vector embeddings in the second set and the second retrieval vector embedding;

providing the second subset of the second set of vector embeddings to the one or more machine learning models as context for a second prompt based on the second agent query, and providing the second prompt to the one or more machine learning models;

obtaining a second reply from the one or more machine learning models in response to the second prompt;

generating a reply to the user query, wherein the reply is based on the first reply and the second reply; and

effectuating a presentation of the reply to a user, through a user interface.

12. The method of claim 11 , wherein the one or more machine learning models include a large language model (LLM).

13. The method of claim 11 , wherein the first, second, and third vector databases are stored in different locations.

14. The method of claim 11 , wherein the first set of vector embeddings has been generated by and received from an embedding model, wherein the embedding model is external to the system.

15. The method of claim 14 , wherein the first set of vector embeddings represent semantic information in the first set of electronic files numerically through hyperdimensional vectors.

16. The method of claim 11 , wherein the first agent query represents the first task numerically through a hyperdimensional vector.

17. The method of claim 11 , wherein generating the reply includes:

(i) generating a prompt based on the first reply and the second reply;

(ii) providing the prompt to the one or more machine learning models; and

(iii) obtaining the reply from the one or more machine learning models.

18. The method of claim 11 , wherein the set of tasks includes a third task to be completed using a particular tool, wherein the first reply and the second reply are used as inputs for the third task, wherein the one or more hardware processors are further configured to:

perform the third task using the particular tool,

wherein the reply is based on output from the particular tool.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 16, 2024
From: GODBOLE, SHAUNAK; CHANG, SHIH PING; MEWALD, CLEMENS; BHARDWAJ, ANANT
To: INSTABASE, INC.
Reel/Frame 066136/0276 →
References Cited (89)
US 5848184A · Taylor · 1998 [cited by applicant]
US 5898795A · Bessho · 1999 [cited by applicant]
US 7620976B2 · Low · 2009 [cited by applicant]
US 7689431B1 · Carmel · 2010 [cited by applicant]
US 7720318B1 · Phinney · 2010 [cited by applicant]
US 7725423B1 · Pricer · 2010 [cited by applicant]
US 8254681B1 · Poncin · 2012 [cited by applicant]
US 8881307B2 · Nun · 2014 [cited by applicant]
US 9275030B1 · Fang · 2016 [cited by applicant]
US 9607058B1 · Gupta · 2017 [cited by applicant]
US 10242212B2 · Tegegne · 2019 [cited by applicant]
US 10642832B1 · Neumann · 2020 [cited by applicant]
US 10679089B2 · Annis · 2020 [cited by applicant]
US 11315353B1 · Cahn · 2022 [cited by applicant]
US 11947604B2 · Roitman · 2024 [cited by applicant]
US 11995394B1 · Morariu · 2024 [cited by applicant]
US 12182125B1 · Buniatyan · 2024 [cited by examiner]
US 20020064316A1 · Takaoka · 2002 [cited by applicant]
US 20040181749A1 · Chellapilla · 2004 [cited by applicant]
US 20040223648A1 · Hoene · 2004 [cited by applicant]
US 20050289182A1 · Pandian · 2005 [cited by applicant]
US 20080148144A1 · Tatsumi · 2008 [cited by applicant]
US 20080212901A1 · Castiglia · 2008 [cited by applicant]
US 20080291486A1 · Isles · 2008 [cited by applicant]
US 20090076935A1 · Knowles · 2009 [cited by applicant]
US 20090132590A1 · Huang · 2009 [cited by applicant]
US 20120072859A1 · Wang · 2012 [cited by applicant]
US 20120204103A1 · Stevens · 2012 [cited by applicant]
US 20140200880A1 · Neustel · 2014 [cited by applicant]
US 20140214732A1 · Carmeli · 2014 [cited by applicant]
US 20150012422A1 · Ceribelli · 2015 [cited by applicant]
US 20150169951A1 · Khintsitskiy · 2015 [cited by applicant]
US 20150169995A1 · Panferov · 2015 [cited by applicant]
US 20150278197A1 · Bogdanova · 2015 [cited by applicant]
US 20150317486A1 · Muller · 2015 [cited by applicant]
US 20160014299A1 · Saka · 2016 [cited by applicant]
US 20160275526A1 · Becanovic · 2016 [cited by applicant]
US 20180189592A1 · Annis · 2018 [cited by applicant]
US 20180329890A1 · Ito · 2018 [cited by applicant]
US 20190138660A1 · White · 2019 [cited by applicant]
US 20190171634A1 · Nowakiewicz · 2019 [cited by applicant]
US 20190286900A1 · Pepe, Jr. · 2019 [cited by applicant]
US 20190340949A1 · Meisner · 2019 [cited by applicant]
US 20200004749A1 · Slezak · 2020 [cited by applicant]
US 20200089946A1 · Mallick · 2020 [cited by applicant]
US 20200104359A1 · Patel · 2020 [cited by applicant]
US 20200159848A1 · Yeo · 2020 [cited by applicant]
US 20200311349A1 · Balasubramanian · 2020 [cited by applicant]
US 20200320072A1 · Hormati · 2020 [cited by applicant]
US 20200364343A1 · Atighetchi · 2020 [cited by applicant]
US 20200379673A1 · Le Gallo-Bourdeau · 2020 [cited by applicant]
US 20210034621A1 · Patel · 2021 [cited by applicant]
US 20210258448A1 · Yuusuke · 2021 [cited by applicant]
US 20220164346A1 · Mitra · 2022 [cited by applicant]
US 20220398858A1 · Cahn · 2022 [cited by applicant]
US 20220414075A1 · Li · 2022 [cited by applicant]
US 20220414430A1 · Li · 2022 [cited by applicant]
US 20220414492A1 · Jezewski · 2022 [cited by applicant]
US 20230044564A1 · Jezewski · 2023 [cited by applicant]
US 20230315731A1 · Liqi · 2023 [cited by applicant]
US 20230334889A1 · Cahn · 2023 [cited by applicant]
US 20230385261A1 · Siddiqui · 2023 [cited by applicant]
US 20240096125A1 · Yebes Torres · 2024 [cited by examiner]
US 20240202539A1 · Poirier · 2024 [cited by applicant]
US 20240221007A1 · Hormati · 2024 [cited by applicant]
US 20240256965A1 · Chung · 2024 [cited by applicant]
US 20240311407A1 · Barron · 2024 [cited by examiner]
US 20240338361A1 · Hazel · 2024 [cited by examiner]
US 20250045314A1 · Madnani · 2025 [cited by examiner]
US 20250045445A1 · Srinivasan · 2025 [cited by applicant]
US 20250077527A1 · Vaughn · 2025 [cited by examiner]
US 20250086190A1 · Azarmi · 2025 [cited by examiner]
US 20250111167A1 · Mcintyre · 2025 [cited by applicant]
US 20250111237A1 · Krishnamurthy · 2025 [cited by applicant]
US 20250117605A1 · De Wynter · 2025 [cited by applicant]
US 20250165714A1 · Krabach · 2025 [cited by applicant]
CN 117951274A · 2024 [cited by examiner]
CN 118332072A · 2024 [cited by examiner]
CN 118656482A · 2024 [cited by examiner]
CN 118939782A · 2024 [cited by examiner]
Chaudhuri et al., “Extraction of type style-based meta-information from imaged documents”, IJDAR (2001) 3: 138-149. (Year: 2001). [cited by applicant]
Doermann et al., “Image Based Typographic Analysis of Documents”, Proceedings of 2nd International Conference on Document Analysis and Recognition, pp. 769-773, 1993 IEEE. (Year: 1993). [cited by applicant]
Shafait (“Document image analysis with OCRopus,” IEEE 13th International Mulititopic Conference; Date of Conference: Dec. 14-15, 2009) (Year: 2009) 6 pages. [cited by applicant]
Singh et al. (A Proposed Approach for Character Recognition Using Document Analysis with OCR, Second InternationalConference on Intelligent Computing and Control Systems: Date of Conference: Jun. 14-15, 2018) (Year: 201… [cited by applicant]
Slavin et al., “Matching Digital Copies of Documents Based on OCR”, 2019 XXI International Conference Complex Systems: Control and Modeling Problems (CSCMP), pp. 177-181 , published on Sep. 1, 2019. (Year: 2019). [cited by applicant]
Li, M., Zhao, Y., Yu, B., Song, F., Li, H., Yu, H., & Li, Y. (2023). Api-bank: A comprehensive benchmark for tool-augmented llms. arXiv preprint arXiv:2304.08244. (Year: 2023). [cited by applicant]
Schick, T., Dwivedi-Yu, J., Dessì, R., Raileanu, R., Lomeli, M., Hambro, E., & Scialom, T. (2023). Toolformer: Language models can teach themselves to use tools. Advances in Neural Information Processing Systems, 36, 68… [cited by applicant]
Qiao, S., Gui, H., Lv, C., Jia, Q., Chen, H., & Zhang, N. (2023). Making language models better tool learners with execution feedback. arXiv preprint arXiv:2305.13068. (Year: 2023). [cited by applicant]
Paranjape, B., Lundberg, S., Singh, S., Hajishirzi, H., Zettlemoyer, L., & Ribeiro, M. T. (2023). Art: Automatic multi-step reasoning and tool-use for large language models. arXiv preprint arXiv:2303.09014. (Year: 2023). [cited by applicant]
Cited By (1)
US 12,650,993