If you’re interested in leveraging Generative AI within a Messaging bot, you can get started quickly with this bot template.

The template showcases a common design pattern where an LLM-powered KnowledgeAI™ integration is built into the bot’s Fallback dialog. This takes care of warmly and gracefully handling all consumer messages that the bot can’t handle.

The default Welcome dialog in the bot template

Your task is essentially two-fold:

  1. Hook up that KnowledgeAI integration to a knowledge base that supports LLM-powered enriched answers.
  2. Add the intent-driven, business-oriented dialogs that perform the actions you require.

Included items


  • Welcome: This dialog is triggered by a simple pattern match to one of many “hello” patterns. Then the bot greets the consumer and asks about their query.
  • Fallback: This dialog integrates with KnowledgeAI. If there’s a consumer message that the bot can’t handle, this dialog is triggered as the fallback. It takes the consumer’s message and uses it to perform a search of a knowledge base for an answer.
  • No Answer Found: This dialog is triggered if the knowledge base search didn’t find an answer. The bot sends a message to communicate this to the consumer.

Configuration needed

General dialog customization

  • Review each of the dialogs and interactions, starting with Welcome, and customize the verbiage.
  • Add the intent-driven business dialogs that you require, i.e., the ones that perform actions on behalf of the consumer.

KnowledgeAI interaction customization

To integrate with KnowledgeAI, the bot template uses a KnowledgeAI interaction in the Fallback dialog.

  1. Specify the knowledge base(s) to search for answers.
  2. Optionally, select the enrichment prompt to send to the LLM to enrich answers. You can use the default prompt while you're just getting started. But it can change without notice, so we recommend you select a custom prompt as soon as possible.

Selecting the appropriate knowledge base within the KnowledgeAI interaction

Learn more