Build a Conversational Chatbot with Archbee and Chat GPT
In this article, we will explore the process of creating a conversational chatbot using Archbee and Chat GPT. By leveraging the power of Archbee's documentation platform and integrating it with the capabilities of Chat GPT, we can develop a chatbot that interacts with users and retrieves information from a knowledge base or data source. This article will guide you through the steps required to set up and configure the chatbot, highlighting the use of Archbee and Chat GPT in the process.
We have already prepared for you the process flows needed to build this use case. For that, go to your workspace in PROCESIO. Press Import/Export, and continue with importing the ConversationalCahtBot.procesio file we have attached below.
The below processes will be imported into your workspace, together with others (4 credentials and a data model) in order for everything to work.
To begin, we need to ensure that we have Archbee and Chat GPT credentials properly configured.
Go to Credentials Manager and update the following credential configurations with your details:
It is now time to run the SQL scripts to create and update your database:
Chat create all DB objects.sql: https://drive.google.com/file/d/1X9VKL3X1bBpmLGLDh3AO5IyoTvEXT7Ur/view
Useful selects.sql: https://drive.google.com/file/d/1YuX6ISJPNI_ZoZiOkiEiMNmdWHQYuHG7/view
The "Chat create all DB objects.sql" file contains the scripts that need to be executed in the database to create the necessary objects. This file is essential for setting up the database structure correctly.
The "Useful selects.sql" file contains several useful queries that can be executed in the database. These queries provide insights into the received questions, response times, keywords, relevance scores, missing keywords, and more. By analyzing this data, you can:
a. Identify the missing information in the documentation that needs to be completed. b. Understand the information that users frequently inquire about. c. Determine the most sought-after articles or topics.
Next, we establish the connection between Archbee and Chat GPT. Archbee allows us to extract relevant information from the documentation by connecting it to an SQL database. By caching the necessary data, we avoid redundant queries and enhance the chatbot's response time. Ensure that the Archbee credentials are correctly set up to connect with the SQL database (check Step 1).
To make this, go to process Chatbot/1. Call GPTChat and select the Call GPT API action
In its setting, make sure you add your OpenAI Organization in Headers.
See below how you can find the Organization for your OpenAI account:
Next, go to Chatbot/1. ArchBee get articles by SearchTerm process. If you also use Archbee as a source, you need to add the DocsSpaceID value to the body of the Search ArchBee action, like below:
To get a docSpaceId you can go to document info and copy the Doc Space Id value:
Go to process Chatbot/0. Search and press Run.
A modal will pop-up requesting input parameters. Add your question and press Run again to initiate the flows.
When a user interacts with the chatbot, the first step is to deconstruct their question into keywords using Chat GPT. This process helps in identifying the user's intent and extracting the most relevant information from the documentation.
Using the extracted keywords, the chatbot searches the Archbee documentation for relevant articles. The retrieved articles are then cached in the SQL database for faster access. This caching mechanism eliminates the need for repeated searches for previously answered queries.
For each keyword extracted from the user's question, Chat GPT calculates its relevance to the articles found in the documentation. Based on this relevance calculation, a score is assigned to each keyword, determining its importance in answering the user's query accurately.
Using the scored keywords and associated articles, Chat GPT formulates a response to the user's question. By leveraging the power of language generation, Chat GPT provides a coherent and informative answer based on the most relevant articles from the Archbee documentation.
To see the output, go to process Chatbot/0. Search and check instances. Click on the Question Answer action to see the variables used for configuration. The variable GptReplyToQuestionsSQL stores the answer that is returned to users in the chatbot:
Once the chatbot setup is complete, it is essential to thoroughly test and debug the system. Through the chat interface, you can interact with the chatbot by asking various questions and verifying the accuracy of its responses. Debugging allows you to examine the input, intermediate steps, and output to ensure the chatbot is functioning as intended.
By combining the capabilities of Archbee's documentation platform with the conversational prowess of Chat GPT, you can build a powerful and intelligent chatbot. The seamless integration of Archbee and Chat GPT enables the retrieval of relevant information from the knowledge base, resulting in accurate and informative responses. As you explore this technology further, you can enhance the chatbot's capabilities, incorporate context awareness, and integrate with other systems in your organization. Start building your conversational chatbot with Archbee and Chat GPT today and revolutionize how you interact with users and provide them with valuable information.