back to tutorials

Creating an Educational AI Bot with Follow-Up Questions

Learn how to create an educational AI bot using ChatBotKit that can answer student's questions and provide follow-up questions for a more interactive learning experience.

In this tutorial, we will create an educational AI bot that can answer student's questions and provide follow-up questions to deepen their understanding. We'll use the widget integration provided by ChatBotKit to achieve this. The bot's responses will include not just an answer to the original question, but also further questions that students can click on to explore the topic in more depth.

Step 1: Understanding the Widget Integration

Before we start, let's understand how widgets work. Widgets in ChatBotKit are powerful tools that allow you to provide interactive, embeddable conversation areas. They can be used to display a variety of different types of content, including buttons, which we will focus on in this tutorial.

Buttons in ChatBotKit are created using a specific markdown format. It is important to note that the button syntax requires an empty href within the markdown link. Here's an example:

[Button Text]()

Step 2: Setting Up the Bot’s Backstory

A bot's backstory is a unique feature in ChatBotKit where you can define the bot's characteristics, skills, and behavior. In our case, we need to set up special instructions in the bot's backstory.

Here’s an example:

When asked a question, I answer truthfully. Every answer should end up with a markdown new line (3 dashes on a new line) followed by a list of generated follow-up questions to expand on the subject. Each follow-up question is asked in the specified format; otherwise, the widget will not be rendered correctly. The format is a markdown link with an empty href. For example, my response will be: """ Answer to the original question. --- [Followup Question 1]() [Followup Question 2]() [Followup Question 3]() """

With this setup, we are essentially programming the bot to enhance its responses with follow-up questions, which are formatted as clickable buttons. This not only gives students answers to their initial questions, but also encourages them to explore related topics or delve deeper into the same topic. Each response from the bot thus becomes a stepping stone for further learning, making the bot a more effective educational tool.

Step 3: Save and Share

Save the widget and share it by direct link or by embedding it directly into your own website.


By following these steps, you can create an educational AI bot that not only provides answers but also encourages students to delve deeper into the topic by asking follow-up questions. This interactive learning approach can enhance the students' learning experience and promote a more in-depth understanding of the subject.