Back to results
US 12,524,416 B1Granted
Query response system implementing a retrieval-augment generation architecture
AssigneePalo Alto Networks, Inc.
InventorsVenkatesh K Pappakrishnan, Praveen Herur, Alok Tongaonkar
Life of this patent
Estimating the term…
Abstract
A query is received from a client device. A subset of documents relevant to the query is determined in part by determining an optimal configuration for the query. The subset of documents is inputted in a context window for a response generator and the query is inputted as a prompt for a query response. The query response received from the response generator is outputted to the client device.
Claims17
A method, comprising:
- receiving a query from a client device;
- determining that the query includes insufficient details for a response generator to generate a query response, wherein the query includes insufficient details when the response generator determines that a relevant document cannot be retrieved to answer the query;
- augmenting the query to generate an augmented query that includes sufficient details for the response generator to generate the query response, wherein augmenting the query includes sending to the client device one or more follow up questions;
- summarizing the augmented query into a summarized query;
- determining a subset of documents relevant to the query in part by determining an optimal configuration for the query, wherein determining the optimal configuration for the query includes classifying the summarized query that is based on the query into a first query category of a plurality of known query categories, wherein classifying the summarized query includes:
- converting the summarized query into an embedding vector including by utilizing a natural language processor to generate the embedding vector;
- providing the embedding vector to an embedding model;
- determining, using the embedding model, a stored query that is most similar to the summarized query including by determining an embedding vector corresponding to a stored query that is closest to the embedding vector corresponding to the summarized query in an embedding space from a plurality of embedding vectors corresponding to a plurality of stored queries located in a plurality of different positions in the embedding space;
- and
- determining a category associated with the stored query that is most similar to the summarized query to be the first query category including by computing one or more similarity values between the plurality of vectors corresponding to the plurality of stored queries and the embedding vector corresponding to the summarized query;
- inputting the subset of documents in a context window for the response generator and the query as a prompt for the query response;
- and
- outputting to the client device the query response received from the response generator.
10 more elements
A system, comprising:
- a processor configured to:
- receive a query from a client device;
- determine that the query includes insufficient details for a response generator to generate a query response, wherein the query includes insufficient details when the response generator determines that a relevant document cannot be retrieved to answer the query;
- augment the query to generate an augmented query that includes sufficient details for the response generator to generate the query response, wherein augmenting the query includes sending to the client device one or more follow up questions;
- summarize the augmented query into a summarized query;
- determine a subset of documents relevant to the query in part by determining an optimal configuration for the query, wherein determining the optimal configuration for the query includes classifying a summarized query that is based on the query into a first query category of a plurality of known query categories, wherein classifying the summarized query includes:
- converting the summarized query into an embedding vector including by utilizing a natural language processor to generate the embedding vector;
- providing the embedding vector to an embedding model;
- determining, using the embedding model, a stored query that is most similar to the summarized query including by determining an embedding vector corresponding to a stored query that is closest to the embedding vector corresponding to the summarized query in an embedding space from a plurality of embedding vectors corresponding to a plurality of stored queries located in a plurality of different positions in the embedding space;
- and
- determining a category associated with the stored query that is most similar to the summarized query to be the first query category including by computing one or more similarity values between the plurality of vectors corresponding to the plurality of stored queries and the embedding vector corresponding to the summarized query;
- input the subset of documents in a context window for the response generator and the query as a prompt for the query response;
- output to the client device the query response received from the response generator;
- and
- a memory coupled to the processor and configured to provide the processor with instructions.
12 more elements
A computer program product embodied in a non-transitory computer readable medium and comprising computer instructions for:
- receiving a query from a client device;
- determining that the query includes insufficient details for a response generator to generate a query response, wherein the query includes insufficient details when the response generator determines that a relevant document cannot be retrieved to answer the query;
- augmenting the query to generate an augmented query that includes sufficient details for the response generator to generate the query response, wherein augmenting the query includes sending to the client device one or more follow up questions;
- summarizing the augmented query into a summarized query;
- determining a subset of documents relevant to the query in part by determining an optimal configuration for the query, wherein determining the optimal configuration for the query includes classifying a summarized query that is based on the query into a first query category of a plurality of known query categories, wherein classifying the summarized query includes:
- converting the summarized query into an embedding vector including by utilizing a natural language processor to generate the embedding vector;
- providing the embedding vector to an embedding model;
- determining, using the embedding model, a stored query that is most similar to the summarized query including by determining an embedding vector corresponding to a stored query that is closest to the embedding vector corresponding to the summarized query in an embedding space from a plurality of embedding vectors corresponding to a plurality of stored queries located in a plurality of different positions in the embedding space;
- and
- determining a category associated with the stored query that is most similar to the summarized query to be the first query category including by computing one or more similarity values between the plurality of vectors corresponding to the plurality of stored queries and the embedding vector corresponding to the summarized query;
- inputting the subset of documents in a context window for the response generator and the query as a prompt for the query response;
- and
- outputting to the client device the query response received from the response generator.
10 more elements
Dependencies are inferred from the claim text.