Thursday, June 20, 2024

Create an advanced AI FAQ chatbot that recommends sources.

Using Voice Flow’s Knowledge Base API: A Tutorial

Are you looking to take your knowledge base to the next level? Voice Flow’s Knowledge Base API can help you do just that. In this tutorial, we’ll show you how to use the API to include the source of an answer, so you can see exactly where the information came from.

Setting Up Your Knowledge Base

Before we dive into the API, let’s take a quick look at how to set up your knowledge base in Voice Flow. The knowledge base is where you’ll store all of your articles. You can add articles using the functions provided in the tool.

Making an API Call

To use the Knowledge Base API, you’ll need to make an API call. You can find your API key in the integration section of your project. Once you have your API key, you can use it in the call. The call itself expects the API key and a question.

Capturing the User’s Question

To capture the user’s question, we’re using the capture step. This step captures the user’s question and saves it into a variable.

Capturing Information from the API Response

Once we’ve made the API call, we need to capture information from the API response. We’re using capture response functions to capture information from the API response and save it into variables.

Summarizing the Answer

The API response includes a number of different pieces of information. On the front end, this is the answer that the user sees. On the back end, the API looks through the pieces of information to determine what’s most relevant and then sends that to your model.

Saving the API Response

The entire API response is captured in the response variable. We’re saving the content, source name, type, and more into separate variables.

Handling No Answer Found

If no answer is found, we’re using a general AI model to answer the user’s question.

Formatting the Content

If an answer is found, we’re telling an AI model to take the content and reformat it to be more readable to the user.

Providing the User with the Article

If we have a high confidence that the article will answer the user’s question, we’re using a set step to generate an article name and then using a card step to provide the user with a link to the article.

Conclusion

Using Voice Flow’s Knowledge Base API can help you take your knowledge base to the next level. By including the source of an answer, you can provide your users with more detailed and accurate information. If you have any questions, feel free to join our Discord or contact our support team.

Highlights

– Voice Flow’s Knowledge Base API can help you include the source of an answer.

– To use the API, you’ll need to make an API call and capture information from the API response.

– If no answer is found, a general AI model can be used to answer the user’s question.

– If an answer is found, an AI model can be used to reformat the content and provide the user with a link to the article.

FAQ

Q: What is Voice Flow’s Knowledge Base API?

A: Voice Flow’s Knowledge Base API is an API that can be used to include the source of an answer in your knowledge base.

Q: How do I set up my knowledge base in Voice Flow?

A: You can set up your knowledge base in Voice Flow by using the functions provided in the tool.

Q: What happens if no answer is found?

A: If no answer is found, a general AI model can be used to answer the user’s question.

Q: How is the content formatted for the user?

A: An AI model is used to reformat the content to be more readable for the user.

Resources:

– https://www.voc.ai/product/ai-chatbot