If you're using a huge AI prompt to format your lead qualification bot, it's probably pretty sucky at staying on task. CloseBot now allows document uploads as a way to drastically cut down on your prompt size, but still have a highly capable bot that knows all about your business! Watch the video to see under the covers or read below to find out more about the technical side of how we accomplish this feat ๐ช
Hypothetical Response
When a message from a contact comes in, we allow a weaker model like GPT-3.5 Turbo to come up with a hypothetical response. The response it comes up with probably won't be correct, but it will allow us to have a better idea of what kind of information needs retrieved from your uploads. For example:
User: I'm not even sure I want to buy your course
Bot: Oh I get it, spending money on a course isn't something most people like doing especially if they don't know the company very well. Let me ask you this, what made you reach out to us in the first place?
User: Someone told me you guys were good at teaching about debt consolidation
Bot Made Up Response: We are the best in the business about teaching about debt consolidation! Would you like to learn more about our available resources?
Embedding
Next we take this made up response and create something called an embedding (using text-embedding-ada-002). This embedding is the numerical representation of the text and it's how we search the library for applicable information chunks (vectors). For example the embedding value of this bot made up response would be:
-0.016358008608222008, -0.006420779041945934, 0.0074561783112585545, -0.024432823061943054, -0.013030404224991798, 0.012047100812196732, -0.01818135380744934, -0.0013780905865132809, -0.014378377236425877, -0.025383565574884415, 0.007338963449001312, 0.023443005979061127, 0.013701135292649269, 0.006954758428037167..... and much more
That information doesn't mean anything at all to humans, but it allows us to search for similar chunks of text in our library. We will pull in the top 3 most relevant results and use them in the next step.
Building a Summary of What's Needed
At this point we have the top 3 most relevant results and we no longer need the bot's made up response that was used to retrieve the relevant texts. Now we need to look at the initial conversation once again and summarize what's needed from the results. Let's look at that first conversation again:
User: I'm not even sure I want to buy your course
Bot: Oh I get it, spending money on a course isn't something most people like doing especially if they don't know the company very well. Let me ask you this, what made you reach out to us in the first place?
User: Someone told me you guys were good at teaching about debt consolidation
Summary: User is curious about how good we are at debt consolidation
Library Summary
The next step is to use the summary and compare that to the results pulled form the library of texts and build a concise summary that we can use in our final response! Let's imagine the embedding pulled in three sections of text as relevant search results from our library as follows:
Look at the resources and summarize anything that helps answer User is curious about how good we are at debt consolidation:
Debt 101: This coaching program focuses on debt consolidation, specifically how to consolidate debt if you have little to no credit
Review from David - "I started out pretty nervous about joining the course since it's paid and I had little money, but it immediately helped"
Debt consolidation efforts often lead to overwhelming feelings of relief once all debt is consolidated to one source
This step looks at the results and looks at the summary from the Build a Summary of What's Needed stage and summarizes the results so we can append this to our final prompt to the AI to generate a response. In this example, the AI would summarize the results above as:
We have beginner courses for debt consolidation. Even previous student David was initially nervous about joining the paid debt consolidation course due to limited funds, but found it immediately helpful.
Summary
At this stage, the bot would continue as usual, but with this added knowledge generated in the Library Summary stage. Using the knowledge library and assigning items to bots is a way to drastically expand your bot capabilities, without clogging up your main prompt with FAQ information unless it's important to answering immediate questions. You should keep vital FAQ information in your main prompt if you feel it's essential to the bot understanding about your business, but keep all other secondary information in your library. Minimizing your main prompt size, optimizing your bot objectives and setting up your library will make your lead qualification system an AI dream team!