Quickstart
Upload Data Source
You can go to your Knowledge Base tab by clicking on the brain icon in the left nav.
Once there, you can click on the 'Add Data Source' button in the header.
There are currently three types of data we support:
- URL(s) - Any URL that is from a publicly-available website. The will work best on any static text data contained on the destination URL.
Any dynamically-loaded text, table data, or image content will not be used within your response. Any content behind an authentication wall will not be accessible. - Text - Any text data included in a .txt file.
- PDF - Any text data that can be clearly identified on a PDF. This will not include any images or structural reference for the data contained within.
- Docx - Any text included in a .docx file.
Once you add a data source, it will show you the loading status, and then confirm once the data source has been loaded and is ready to use.
Preview Knowledge Base Response
You can preview your Knowledge Base responses using the 'Preview' button in the header (between 'Configuration' and 'Add Data Source').
Structure Assistant to Search Knowledge Base
Assistants in Voiceflow answer a user question in the following priority when it is in a 'listen' state:
- Matching Intent: If there is an Intent you have added to the canvas that match the user's question, the Assistant will jump to that Intent.
- Knowledge Base: If there is no Intent that matches the user's question, it will query the Knowledge Base.
- Global No Match: If there is no answer within the Knowledge Base to the user's question, it will trigger a Global No Match response (this can be either static (default) or generative).
In the design below there are two points where the Assistant is in a 'listening' state. The first is the Buttons step. A user can select one of the two Buttons or ask a question. If they click a Button they will move forward in the conversation. If they ask a question, it will trigger the Knowledge Base since there is no Intent in the project that matches their question. The second 'listening' state is the Capture step itself, which is always listening, like the rest of the Listen steps (Buttons and Choice steps).
Overview
How does the Knowledge Base work?
The Knowledge Base allows you to leverage your own documents and website data to power answers on your Voiceflow Assistant. Currently, the Knowledge Base responses can be used as a general-purpose fallback to provide contextual answers where you haven't designed Intents and responses.
This will allow you to easily support the long-tail of your customers' questions without needing to design a specific Intent and response for each. Instead, when a user asks a question that does not match with any existing Intents you've designed, your uploaded data will be queried to find the most relevant content chunks. Those chunks will be passed to an LLM to turn it into a customer-friendly response that is relayed to your customer.
This functionality is currently only available for use with your No Match fallbacks, and cannot be used on a specific response within your Assistant.
Today, the Knowledge Base is available on all Chat & SMS AI Assistant projects, and is not available on any NLU Design project types.
The Knowledge Base is an experimental feature leveraging Large Language Models (LLMs), so be aware that there is potential to generate misleading or false information.
How should you build your Assistant?
Voiceflow has 3 levels of priority when answering a users question.
- Intents: Intents are designed by you to trigger based on specific questions. For example, if you were building an Assistant for an Airbnb, you may have Intents around 'check-in' or 'check-out'. These Intents will lead to clearly defined flows that guide a user through a pre-built flow.
- Knowledge Base: The Knowledge Base is a collection of documents to power the Q&A of your Assistant. In the Airbnb example - you may want specific pre-built flows for check-in and check-out. But for any other questions (ie. Can I bring my dog? When do I have to leave? Can I have guests?), the Knowledge Base can answer based on the documents you upload.
- Global No Match: This is a last resort message if the Assistant cannot find an answer in your Knowledge Base. These can be generative (ie. have the question answered by a general AI) or static (you define what this message is - ie. I'm sorry, I don't have an answer for that).
If you want to stop your Assistant from sources responses outside of your Assistant data and Knowledge Base, use static as your Global No Match configuration.
Below is a quick video on how to structure your Assistant in Voiceflow:
NEW Global No Match Behaviour
You now have the option with Global No Match in your Assistant to choose generative or static responses. A generative Global No Match means that if the question hits the fallback (meaning no relevant Intents or Knowledge Base content was found), the question will be answered by a general AI. A static Global No Match means your Assistant will respond with a message you define (ie. I'm sorry, I don't have an answer for that. Is there something else I can answer for you?).
If you want to stop your Assistant from sources responses outside of your Assistant data and Knowledge Base, use static in your Global No Match settings (this is the new default).
FAQ
File Size Limits
Each individual data source file is limited to 10MB. If you have a larger data source, you can reduce the size by removing photos (these are not captured by the Knowledge Base today anyway) and/or compressing.
Data Source Structure Consideration
Any dynamically-loaded text, table data, or image content will not be used within your response. Furthermore, how your data is structured itself is relevant to the accuracy of your responses. The more cohesive your data source (more it reads like essay or blog), the more accurate your Knowledge Base responses will be.
Configuring your Knowledge Base
You can modify the performance of your Knowledge Base by using the KB Settings modal, access from the 'Configuration' icon in the header to the left of 'Preview' and 'Add Data Source' buttons.
To modify how answers are generated from the data found in the sources you provided, you can use the following configurations:
- Model - This is the model that will be used to created your prompt completion. Currently, we are offering a selection of OpenAI model, but will expand this selection in the future. Each different model has it's own strengths and weaknesses, so select the one that is best for your task:
- GPT-3 DaVinci - provides the most stable performance, but is better suited for simpler functions
- GPT-3.5-Turbo - provides the fastest results on your prompt, with average performance on reasoning and conciseness
- GPT-4 - provides the most advances reasoning and conciseness, but will have slower results than the other options
- Temperature - This will allow you to control how much variation your completion will have from the prompt. Higher temperature will result in more variability in your responses. Lower temperature will result in responses that directly address the prompt, providing exact answers.
If you want more exact responses, turn down your temperature. - Max Tokens - This sets the total number of tokens you want to use when completing your prompt. The max number of tokens available per response is 2048, (we include your prompt and settings on top of that).
- System - This is the instruction you can give to the LLM model to frame how it should behave. Giving the model a 'job' will help it provide a more contextual answer. Here you can also define max. response length, personality, tone, and/or response language (more on this below).
Non-English Knowledge Base Use Cases
Knowledge Base understands content in most languages. To configure your Knowledge Base response to be in a specific language, you must adjust the 'System' setting in your Configuration with strong language indicating such. We recommend something like this:
Assistant Types compatible with Knowledge Base
Today, the Knowledge Base is available on all Chat & SMS AI Assistant projects, and is not available on any NLU Design project types.
Comments
0 comments
Please sign in to leave a comment.