IP Library › Granted Patent US 12,561,351
Granted Patent B2
US 12,561,351 · App. 18/473,989 · Granted Feb 24, 2026

Knowledge bot as a service

Inventors: Santosh Addanki (Cupertino, CA); Soujanya Lanka (Singapore, SG); Nandana Murthy (San Jose, CA); Koteswara Rao Pathuri (Georgetown, TX); Bineet Ranjan (Bengaluru, IN); Liang Xi (Elkhorn, NE); Xiaoying Han (Santa Clara, CA); Raghotham Sripadraj (Bengaluru, IN)
Assignee: PAYPAL, INC.
G06F16/3329G06F16/3326G06F16/36
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,561,351
App. No.
18/473,989
Granted
Feb 24, 2026
Kind
B2
Abstract

Methods and systems are presented for providing a knowledge bot configurable to interact with users across multiple domains. The knowledge bot includes at least a text-based search engine and a semantic-based search engine. Each of the search engine is configured to retrieve documents from a corpus of documents based on the user query. The user query is in a natural language format. The retrieved documents may be ranked according to how relevant the documents are to the user query. A subset of the documents is used as the search results based on the ranking. The search results from the search engine are combined with the user query to generate a prompt for an artificial intelligence model. Based on the prompt, a response in the natural language format is generated by the artificial intelligence model.

Claims (66)

1 . A system, comprising:

a non-transitory memory; and

one or more hardware processors coupled with the non-transitory memory and configured to read instructions from the non-transitory memory to cause the system to perform operations comprising:

receiving, from a user device, a user query;

generating first embeddings based on parsing a plurality of words of the user query, wherein the first embeddings represent a contextual meaning of the user query;

determining whether a response to the user query is stored in a cache storage based on comparing the first embeddings against a plurality of cache keys associated with the cache storage;

in response to determining that the response to the user query is not stored in the cache storage, querying a corpus of documents using a text-based search model based on one or more keywords extracted from the user query, wherein a first set of documents from the corpus of documents is obtained based on the querying the corpus of documents using the text-based search model;

querying the corpus of documents using a semantic search model based on the first embeddings, wherein a second set of documents from the corpus of documents is obtained based on the querying the corpus of documents using the semantic search model;

selecting, from the first set of documents and the second set of documents, one or more documents having relevancy scores associated with the user query above a threshold;

generating a prompt for a generative artificial intelligence (AI) model based on combining the user query and the one or more documents;

generating, using the generative AI model and based on the prompt, a response to the user query, wherein the response is generated further based on information from the one or more documents;

providing the response to the user device;

obtaining benchmark embeddings representing a benchmark response associated with the user query;

generating second embeddings representing the response generated using the generative AI model; and

modifying the corpus of documents based on a difference between the second embeddings and the benchmark embeddings.

2 . The system of claim 1 , wherein the user query is in a natural language format.

3 . The system of claim 1 , wherein the text-based search model is configured to identify, from the corpus of documents, the first set of documents based on the one or more keywords extracted from the user query.

4 . The system of claim 1 , wherein the semantic-based search model is configured to identify, from the corpus of documents, the second set of documents based on the contextual meaning of the user query.

5 . The system of claim 1 , wherein the first embeddings are generated further based on parsing the plurality of words forward and backward.

6 . The system of claim 1 , wherein the operations further comprise:

analyzing the first set of documents and the second set of documents; and

ranking the first set of documents and the second set of documents based on the analyzing, wherein the one or more documents are selected based on the ranking.

7 . The system of claim 1 , wherein the modifying the corpus of documents comprises at least one of adding an additional document to the corpus of documents or removing a document from the corpus of documents.

8 . A method, comprising:

receiving, by a computer system and from a user device, a user query;

generating, by the computer system, first embeddings representing the user query;

accessing, from a plurality of corpuses of documents, a corpus of documents based on a particular domain associated with the user query;

querying, by the computer system, the corpus of documents using a text-based search model based on one or more keywords extracted from the user query, wherein a first set of documents is obtained based on the querying the corpus of documents using the text-based search model;

querying, by the computer system, the corpus of documents using a semantic search model based on the first embeddings, wherein a second set of documents is obtained based on the querying the corpus of documents using the semantic search model;

determining, by the computer system and from the first set of documents and the second set of documents, that two or more documents are associated with a response to the user query;

generating, using a machine learning model and based on an input comprising the user query and the two or more documents, the response to the user query, wherein the response comprises content generated based on information extracted from at least two documents in the two or more documents;

generating second embeddings representing the response generated using the machine learning model;

accessing benchmark embeddings representing a benchmark response associated with the user query; and

modifying the corpus of documents based on comparing the second embeddings against the benchmark embeddings.

9 . The method of claim 8 , wherein the user query is a first user query that is part of a dialogue between a user of the user device and a knowledge bot, and wherein the method further comprises:

retrieving a chat history associated with the user of the user device, wherein the chat history comprises one or more user queries previously submitted by the user and one or more responses generated by the machine learning model for the one or more user queries;

deriving a context based on the chat history; and

modifying the first user query based on the context, wherein the two or more documents are determined to be associated with the first user query based on the modified first user query.

10 . The method of claim 9 , wherein the modifying the first user query comprises at least one of adding one or more words to, deleting one or more words from, or revising one or more words from the first user query based on at least one of the one or more user queries or the one or more responses.

11 . The method of claim 9 , wherein the input further comprises the context and the modified first user query.

12 . The method of claim 8 , further comprising:

determining, from a plurality of domains, that the user query is associated with the particular domain based on analyzing the user query.

13 . The method of claim 8 , further comprising:

determining a score for each document in the first set of documents and the second set of documents;

ranking the first set of documents and second set of documents based on the score determined for each document in the first set of documents and the second set of documents; and

selecting, from the first set of documents and the second set of documents, the two or more documents based on the ranking.

14 . The method of claim 8 , wherein the response comprises words in a natural language format.

15 . A non-transitory machine-readable medium having stored thereon machine-readable instructions executable to cause a machine to perform operations comprising:

generating, based on a query, first embeddings that represent a semantic meaning of the query;

querying a corpus of documents using a text-based search model based on one or more keywords extracted from the query, wherein a first set of documents is obtained based on the querying the corpus of documents using the text-based search model;

querying the corpus of documents using a semantic search model based on the first embeddings, wherein a second set of documents is obtained based on the querying the corpus of documents using the semantic search model;

determining, from the first set of documents and the second set of documents, that two or more documents are associated with a response to the query;

generating, using a machine learning model and based on a prompt that includes the query and the two or more documents, the response to the query, wherein the response comprises content generated based on information extracted from at least two documents in the two or more documents;

obtaining benchmark embeddings representing a benchmark response associated with the query;

generating second embeddings representing the response generated using the machine learning model; and

modifying the corpus of documents based on a difference between the second embeddings and the benchmark embeddings.

16 . The non-transitory machine-readable medium of claim 15 , wherein the operations further comprise:

comparing the first embeddings against a plurality of cache keys of a cache storage; and

determining that the query is not related to an entry in the cache storage based on the comparing.

17 . The non-transitory machine-readable medium of claim 15 , wherein the semantic-based search model is configured to (i) derive a contextual meaning of the query and (ii) identify, from the corpus documents, the second set of documents based on the contextual meaning of the query.

18 . The non-transitory machine-readable medium of claim 15 , wherein the first embeddings are generated based on parsing a plurality of words of the query forward and backward.

19 . The non-transitory machine-readable medium of claim 15 , wherein the query is a first query that is part of a dialogue between a user of a user device and a knowledge bot during a session between the user and a service provider, and wherein the operations further comprise:

retrieving a chat history associated with the user of the user device, wherein the chat history comprises one or more queries previously submitted by the user and one or more responses generated by the machine learning model for the one or more queries;

deriving a context based on the chat history; and

modifying the first query based on the context, wherein the two or more documents are determined to be associated with the response to the first query based on the modified first query.

20 . The non-transitory machine-readable medium of claim 19 , wherein the modifying the first query comprises at least one of adding one or more words to, deleting one or more words from, or revising one or more words from the first query based on at least one of the one or more queries or the one or more responses.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 25, 2023
From: ADDANKI, SANTOSH; LANKA, SOUJANYA; MURTHY, NANDANA; PATHURI, KOTESWARA RAO; RANJAN, BINEET; XI, LIANG; HAN, XIAOYING; SRIPDRAJ, RAGHOTHAM
To: PAYPAL, INC.
Reel/Frame 065014/0337 →
Priority Claims (1)
IN 202341052669 · Aug 4, 2023 · national
Continuity (1)
Related Publication 20250103622A1 · Mar 27, 2025
References Cited (43)
US 11431660B1 · Leeds et al. · 2022 [cited by applicant]
US 11544475B2 · Mittal et al. · 2023 [cited by applicant]
US 11714855B2 · Mahindru et al. · 2023 [cited by applicant]
US 11743378B1 · Johnston et al. · 2023 [cited by applicant]
US 11875240B1 · Bosnjakovic · 2024 [cited by applicant]
US 11960514B1 · Taylert · 2024 [cited by examiner]
US 20140278352A1 · Clark · 2014 [cited by applicant]
US 20140279050A1 · Makar · 2014 [cited by applicant]
US 20160070693A1 · Carrier · 2016 [cited by examiner]
US 20160371703A1 · Monegan · 2016 [cited by applicant]
US 20170324867A1 · Tamblyn · 2017 [cited by applicant]
US 20190206406A1 · Sugiyama · 2019 [cited by applicant]
US 20190286712A1 · Terry et al. · 2019 [cited by applicant]
US 20190311036A1 · Shanmugam et al. · 2019 [cited by applicant]
US 20200117709A1 · Galitsky · 2020 [cited by applicant]
US 20200137002A1 · Chavda · 2020 [cited by applicant]
US 20200143115A1 · Brigham et al. · 2020 [cited by applicant]
US 20200143247A1 · Jonnalagadda et al. · 2020 [cited by applicant]
US 20200143265A1 · Jonnalagadda et al. · 2020 [cited by applicant]
US 20200201913A1 · Terry et al. · 2020 [cited by applicant]
US 20200374394A1 · Karp · 2020 [cited by applicant]
US 20210374167A1 · Williams et al. · 2021 [cited by applicant]
US 20220012600A1 · Trim · 2022 [cited by applicant]
US 20220107792A1 · Gottschlich · 2022 [cited by applicant]
US 20230121355A1 · Srinivasan · 2023 [cited by examiner]
US 20230245651A1 · Wang · 2023 [cited by applicant]
US 20230274095A1 · Kelkar et al. · 2023 [cited by applicant]
US 20240038226A1 · Nouri · 2024 [cited by examiner]
US 20240095460A1 · Xu · 2024 [cited by examiner]
US 20240144049A1 · Cheng · 2024 [cited by applicant]
US 20240184991A1 · Mahabaleshwarkar et al. · 2024 [cited by applicant]
US 20240256582A1 · Jain · 2024 [cited by examiner]
US 20240330290A1 · Shrestha · 2024 [cited by examiner]
US 20240419710A1 · Matson · 2024 [cited by examiner]
WO 2011089450A2 · 2011 [cited by applicant]
WO 2015089336A2 · 2015 [cited by applicant]
WO 2021108679A1 · 2021 [cited by applicant]
WO 2022043675A2 · 2022 [cited by applicant]
International Search Report and Written Opinion for Application No. PCT/US2024/040226, mailed on Aug. 30, 2024, 9 pages. [cited by applicant]
Cohen, “Right on Track: NVIDIA Open-Source Software Helps Developers Add Guardrails to AI Chatbots”. [Retrieved from the Internet]. [Retrieved from https://blogs.nvidia.com/blog/2023/04/25/ai-chatbot-guardrails-nemo/ on… [cited by applicant]
International Search Report and Written Opinion for Application No. PCT/US2024/40299, mailed on Oct. 18, 2024, 10 pages. [cited by applicant]
Bunt H., et al., “Semantic and Pragmatic Precision in Conversational AI Systems,” Frontiers in Artificial Intelligence, Mar. 30, 2023, vol. 6, No. 896729, 16 pages. [cited by applicant]
Radziwill N., et al., “Evaluating Quality of Chatbots and Intelligent Conversational Agents,” arXiv preprint arXiv: 1704.04579, 2017, 21 pages. [cited by applicant]