Creating Your First GenAI Bot

Generative AI enables bots to provide flexible, context-aware responses. When paired with a SupSearch search engine, it becomes a powerful tool for answering questions based on your existing knowledge base. In this guide, you'll learn how to set up your first GenAI bot using the GenAI chatbot template in BotStudio.


Step 1: Create the Bot

We'll start by creating a new bot using the GenAI chatbot template. If you already have a bot, feel free to follow along with your own setup.

  1. Open BotStudio and sign in with your credentials.
  2. Click "Bots" in the sidebar.
  3. Click "New Bot".
  4. Select the "GenAI chatbot" template.
  5. Enter a name and choose your bot’s language.
  6. Click "Create".

You will now be taken to the Conversation Flow page.

Congratulations! Your first GenAI bot is now created.


Step 2: Understand the "Generate AI Reply" Activity

Since we used the GenAI chatbot template, your bot already includes a Generate AI Reply activity.

  1. Navigate to the Conversation Flow page if you're not already there.
  2. Expand the nodes:
    GreetCheck inquiry lengthInquiry accepted
  3. Click on the "Generate Reply" node.

You’ll now see the node details.

To explore or edit the AI response, click "Activities" > "Generate AI reply".

To add this activity to any other node:

  • Go to All activitiesGenerative AIGenerate AI reply
  • Click the newly added activity to configure it

Step 3: Set the Context for AI Responses

To improve accuracy and prevent hallucinations, GenAI replies are based on context. You can choose from the following context types:

  1. Search Engine (Recommended):
    Uses a SupSearch search engine to retrieve articles relevant to the query, then generates a response using those articles.
  2. Article:
    Bases responses on a specific SupSearch article.
  3. Manual:
    You manually provide the content the bot should use.

For this tutorial, we’ll use Search Engine.
Make sure you have a trained and staged SupSearch search engine.
If not, refer to the SupSearch setup guide or use a simpler context for now.


Step 4: Test Your GenAI Bot

Now that the Generate AI Reply activity is set up with context, let’s test it.

  1. Open the Demo Panel.
  2. Click the cloud icon at the bottom.
  3. Select "Generative AI API" as the API mode.
  4. Ask a question related to the connected context.

You’ve now successfully built and tested your first GenAI bot.


Tips & Troubleshooting

  • No Response Despite Relevant Context?
    The SupSearch engine might not be confident enough.
    • Improve your search engine's training, or
    • Lower the Answer generation confidence in the activity settings.
  • Bot Answers Sensitive or Unwanted Questions?
    • Increase the Answer generation confidence threshold, or
    • Enable additional safeguard settings in the activity.

 

Other GenAI Activities

You can extend your bot’s capabilities with other Generative AI activities:

Generate Chat Summary

Location: All activitiesGenerative AIGenerate Chat Summary
Stores a summary of the conversation in a variable. You can also specify additional fields to extract.

Generate AI Classification

Location: All activitiesGenerative AIGenerate AI Classification
Classifies text using an LLM.

  • No training needed
  • Define categories and provide classification examples
  • Stores result in a classification variable

Generate AI Extraction

Location: All activitiesGenerative AIGenerate AI Extraction
Extracts values from user messages.

  • Ideal for details like email, phone number, or reason for contact
  • Add examples to improve extraction accuracy
  • Stores results in an extraction variable

Published

Last updated

0
0