Dynamic-content support system in a network-based application
A computer-implemented method for automatically providing dynamic content support to a user includes receiving a natural language-based input from a user requesting help. A backend server is operable to pre-process the question prior to searching. A search for the most relevant articles is performed by comparing the pre-processed input to a set of articles in a vector database. The articles can be re-ranked based on content in the question and characteristics of the user. A request or prompt is generated based on the retrieved articles, question, user characteristics, and system rules. A text generation model is operable to prepare a summary based on the prompt. The summary is sent and displayed to the user on their computing device. Related systems are described.
1 . A computer-implemented method for automatically providing dynamic content support to a user comprising:
indexing a plurality of articles, wherein the indexing comprises preparing a plurality of pre-existing embeddings corresponding to the plurality of articles or sections thereof using at least one embedding model, and saving the plurality of pre-existing embeddings in a vector database;
receiving a natural language-based input at a user device from the user;
pre-processing the natural language-based input by evaluating the natural language-based input for pre-defined stop words and removing the pre-defined stop words from the natural language-based input if detected;
transform the pre-processed input into at least one current embedding using the at least one embedding model;
compute a similarity score between the at least one current embedding and the pre-existing embeddings corresponding to the articles or sections thereof in the vector database;
ranking the pre-existing embeddings based on similarity scores;
adjusting the ranking of the pre-existing embeddings based on the natural language-based input from the user device;
retrieving a selected plurality of articles or sections thereof based on the adjusted ranking of the articles;
creating a prompt for sending to a text generation model, wherein the creating comprises applying at least one static system-based rule and at least one dynamic user-based rule;
sending to the text generation model the prompt and the selected plurality of articles or sections thereof, and requesting from the text generation model a summary of the selected plurality of articles or sections thereof based on the prompt and the selected plurality of articles or sections thereof; and
sending the summary to the user.
2 . The method of claim 1 , wherein the at least one current embedding comprises a plurality of embeddings, and wherein the method further comprises computing an initial score for each current embedding for each pre-existing embedding.
3 . The method of claim 2 , further comprising, for each pre-existing embedding, averaging the initial scores to obtain the similarity score for the pre-existing embedding.
4 . The method of claim 1 , wherein the indexing comprises chunking the articles or sections thereof into at least one size of chunk.
5 . The method of claim 1 , wherein the pre-processing further comprises evaluating the input for generic words and mapping the generic words into platform words.
6 . The method of claim 5 , wherein the pre-processing comprises determining whether the input is a question based on evaluating the question for symbols and keywords.
7 . The method of claim 6 , wherein the pre-processing further comprises evaluating whether input is an answerable question based on whether the question contains general inquiry information and customer specific information.
8 . The method of claim 1 , further comprising performing one or more of the steps of transforming, computing, selecting, creating, and requesting for different users in parallel using web server replicas.
9 . The method of claim 1 , wherein the at least one static system-based rule is selected from the group comprising: (a) to require the text generation model to limit responses to content contained in the articles; (b) to follow good user experience writing principles to make answers digestible and empathetic to average person; and (c) to require the response to be a valid Markdown such that the response can be presented in a nicely-formatted way.
10 . The method of claim 1 , wherein the dynamic user-based rule comprises evaluating the profile characteristics of the user, and adjusting the prompt based on the user profile characteristics.
11 . The method of claim 1 , wherein the adjusting the ranking of the selected articles or sections thereof is based on literal and contextual information contained in the natural language-based input.
12 . The method of claim 11 , further comprising adjusting the ranking of the selected articles or sections thereof based on detected behavior.
13 . The method of claim 12 , wherein the detected behavior corresponds to a flow-triggered event or electronic input sending success.
14 . The method of claim 1 , wherein the creating the prompt is based on feedback, and wherein the feedback is collected from the user's review of the summary.
15 . The method of claim 1 , further comprising detecting behavior characteristics of the user in real time, and presenting the user candidate suggestions for the pre-processed input based on the behavior characteristics of the user.
16 . The method of claim 15 , further comprising building a user question support database based on recording the user behavior and pre-processed input for each user, and presenting the user the candidate suggestions from the database based on the user behavior and information associated with the recorded user behavior.
17 . The method of claim 4 , wherein each chunk corresponds to one of the pre-existing embeddings, and performing the indexing periodically and not less than daily.
18 . A system for automatically providing dynamic content support to a user comprising:
a trained transformer model for transforming text into embeddings;
a vector database comprising articles, and pre-existing embeddings generated by the transformer model corresponding to the articles or sections thereof, and operable to compute a similarity score between a current embedding and each of the pre-existing embeddings;
at least one network or web server programmed and operable to:
receive natural language user input;
pre-process the user input into a pre-processed input, wherein pre-processing comprises removing predefined stop words;
generate, using the transformer model, at least one current embedding from the pre-processed input;
send the at least one current embedding to the vector database to identify a plurality of selected articles or sections thereof based on similarity scores;
rank the plurality of selected articles or sections thereof based on the similarity scores;
reorder the ranked plurality of selected articles or sections thereof based on the user input;
retrieve the reordered plurality of selected articles or sections thereof;
prepare a prompt command for a text generation model based on applying at least one static system-based rule and at least one dynamic customer-based rule;
prompt the text generation model for a summary by sending to the text generation model the reordered plurality of selected articles or sections thereof and the prompt command; and
send the summary to the user.
19 . The system of claim 18 , further comprising a load balancer module programmed and operable to distribute the pre-processed input amongst the at least one network or web server.
20 . A non-transitory computer-readable medium storing instructions that, when executed by one or more computer processors of a computing platform, cause the computing platform to perform the operations comprising:
index a plurality of articles to form pre-existing embeddings corresponding to the articles or sections thereof;
receive natural language user input;
pre-process the user input into a pre-processed input, wherein the pre-processing comprises removing stop words;
transform the pre-processed input into at least one current embedding;
send the at least one current embedding to the vector database to identify a plurality of selected articles or sections thereof based on similarity scores;
rank the plurality of selected articles or sections thereof based on the similarity scores;
reorder the ranked plurality of selected articles or sections thereof based on the user input;
retrieve the reordered plurality of selected articles or sections thereof;
prepare a prompt command for a text generation model based on applying at least one static system-based rule and at least one dynamic customer-based rule;
prompt the text generation model for a summary of the selected articles or sections thereof by sending to the text generation model the reordered plurality of selected articles or sections thereof and the prompt command; and
send the summary to the user.