Building a GPT chatbot

GPT chatbots are smart bots that answer questions from a data source.

GPT chatbots are all the rage these days, thanks to ChatGPT.

ChatGPT has opened a new way of asking questions and getting answers – that are accurate, brief, and quick.

Here are the steps to build your own GPT chatbot:

As an example, we are going to build a GPT chatbot for a website www.wotnot.io and answer users questions. If the bot does not know the answer, we will share the customer support details.

Step 1: Creating a knowledge base

The fundamental of a GPT chatbot is creating a knowledge base that is trained with the information you want it to answer from.

As we want to answer questions from the website www.wotnot.io , let’s build the knowledge base.

  • Go to AI Studio > Add Knowledge base > Add data source

  • Choose URL as the data source

  • Enter the domain www.wotnot.io

  • Hit 'Train' and wait until all URL(s) are being fetched

Step 2: Build a bot

Next, we need to build a bot that will speak with the visitor and use this knowledge base to fetch the answers to questions asked.

Go to Bot Builder > Build a bot > Inbound > Web

Step 3: Adding the Answer AI action block

After the trigger action block, we will add the 'Answer AI' action block.

  • Add a welcome question like “Hey there! What can I help you with today?”

  • Choose the “Knowledge base” we created

Also, we will configure the 'Answer AI' block as per our needs. For this example, I will use the following:

Instructions:

Instructions guide the AI on how you want the answer to be generated. Write a clear and concise instruction.

All other advanced settings are kept as it is. You can choose to tweak it if needed.

Step 4: Adding fallback measures

Not always will the AI answer your question. Primarily, because it may not have all the data to answer it, or the question is quite vague to generate an answer.

In any case, it is important to always define fallback measures to help users get assistance.

In this example, after the AI generates the answer, we will try to seek an acknowledgement from the user whether this answer helped or not.

Click on the success path and add “Add another block”.

Here we will add a button block with the message “Did this answer your question?” with the following options:

  • Yes - Ends the flow with a thank you message “Glad we could help!”

  • No - Apologise and share support details like “Sorry we couldn’t answer your question. Feel free to reach out to us at support@wotnot.io or call us at +1 737 258 7485 for more assistance.”

This way, the user always has a secondary way of getting the answer if the GPT fails. You can even extend the failure flow to collect details of their problems and create a ticket in your support systems or notify your team via email.

Last updated