System and method for generating a chat response using a large language model
A system and method for generating LLM-based chatbot responses are provided. The method includes generating, using a first specific-trained language model (STLM), which returns a set of filters based on an input question, wherein the input question relates to at least one sales call; filtering a call dataset based on the set of filters, wherein the set of filters is applied to metadata included in the call dataset, wherein the call dataset further includes at least transcripts; embedding the input question into a vector representation; comparing the vector representation of the input question to vector representations of textual information stored in the call dataset to retrieve a target dataset; engineering a prompt to provide a single coherent command including information in the target dataset and the input question; and feeding the engineered prompt to a second STLM to retrieve an answer to the input question.
1 . A method for generating a large language model (LLM)-based chatbot response to an input question, comprising:
generating, using a first specific-trained language model (STLM), a set of filters based on an input question that relates to at least one sales call, wherein the generated set of filters refers to at least one metadata in a call dataset;
filtering the call dataset by applying the set of filters to the metadata included in the call dataset, wherein the call dataset further includes transcripts and their respective metadata;
embedding the input question into a vector representation;
comparing the vector representation of the input question to vector representations of textual information stored in the call dataset to retrieve a vector representation of a target dataset, wherein the target dataset contains an answer to the input question;
engineering a prompt to provide a single coherent command including information in the target dataset and the input question; and
feeding the engineered prompt to a second STLM to output the answer to the input question.
2 . The method of claim 1 , further comprising:
retrieving a contextual information from at least one data source; and
enriching the input question with the retrieved contextual information, and wherein the prompt is further engineered based on retrieved contextual information.
3 . The method of claim 2 , wherein the at least one data source is a CRM system.
4 . The method of claim 1 , wherein embedding the input question into a vector representation further comprises:
applying an embedding model on the input question, wherein the embedding model implements one or more sentence-embedding models.
5 . The method of claim 1 , wherein embedding the input question into a vector representation further comprises:
applying a single vector embedding model on the input question, wherein a single vector embedding model is based on two distinct vector embedding models.
6 . The method of claim 1 , wherein embedding the input question into a vector representation further comprises:
applying a large language model (LLM) to the input question.
7 . The method of claim 1 , further comprising:
rephrasing the input question using a third STLM.
8 . The method of claim 7 , wherein the first STLM, the second STLM, and the third STLM are same LLM trained on same sales data.
9 . The method of claim 1 , wherein an answer space of the input question is the call dataset and wherein the sales call further includes sales meetings and sales transactions.
10 . A non-transitory computer-readable medium having stored thereon instructions for causing a processing circuitry to execute a process, the process comprising:
generating, using a first specific-trained language model (STLM), a set of filters based on an input question that relates to at least one sales call, wherein the generated set of filters refers to at least one metadata in a call dataset;
filtering the call dataset by applying the set of filters to the metadata included in the call dataset, wherein the call dataset further includes transcripts and their respective metadata;
embedding the input question into a vector representation;
comparing the vector representation of the input question to vector representations of textual information stored in the call dataset to retrieve a vector representation of a target dataset, wherein the target dataset contains an answer to the input question;
engineering a prompt to provide a single coherent command including information in the target dataset and the input question; and
feeding the engineered prompt to a second STLM to output the answer to the input question.
11 . A system for generating a large language model (LLM)-based chatbot response to an input question, comprising:
a processing circuitry; and
a memory, the memory containing instructions that when executed by the processing circuitry, configure the system to:
generate, using a first specific-trained language model (STLM) a set of filters based on an input question that relates to at least one sales call, wherein the generated set of filters refers to at least one metadata in a call dataset;
filter the call dataset by applying the set of filters to the metadata included in the call dataset, wherein the call dataset further includes transcripts and their respective metadata;
embed the input question into a vector representation;
compare the vector representation of the input question to vector representations of textual information stored in the call dataset to retrieve a vector representation of a target dataset, wherein the target dataset contains an answer to the input question;
engineer a prompt to provide a single coherent command including information in the target dataset and the input question; and
feed the engineered prompt to a second STLM to output the answer to the input question.
12 . The system of claim 11 , wherein the system is further configured to:
retrieve a contextual information from at least one data source; and
enrich the input question with the retrieved contextual information, and wherein the prompt is further engineered based on retrieved contextual information.
13 . The system of claim 12 , wherein the at least one data source is a CRM system.
14 . The system of claim 11 , wherein the system is further configured to:
apply an embedding model on the input question, wherein the embedding model implements one or more sentence-embedding models.
15 . The system of claim 11 , wherein the system is further configured to:
apply a single vector embedding model on the input question, wherein a single vector embedding model is based on two distinct vector embedding models.
16 . The system of claim 11 , wherein the system is further configured to:
apply a large language model (LLM) to the input question.
17 . The system of claim 11 , wherein the system is further configured to:
rephrase the input question using a third STLM.
18 . The system of claim 17 , wherein the first STLM, the second STLM, and the third STLM are same LLM trained on same sales data.
19 . The system of claim 11 , wherein an answer space of the input question is the call dataset and wherein the sales call further includes sales meetings and sales transactions.