Creating a Help Bot for Slack
In this tutorial you will create a help bot that answers questions from a custom knowledge base and integrates directly with Slack. The bot uses a ChatBotKit dataset to store your documentation, FAQs, or support articles and retrieves the most relevant information when users ask questions in your Slack workspace.
What Is a Dataset?
A dataset is a structured collection of records - text paragraphs, code snippets, FAQ entries, or any other content - that the bot searches when composing answers. Connecting a dataset to your bot gives it a private knowledge base that it can draw on during conversations.
Step 1: Create a Dataset
- From your dashboard, navigate to Datasets.
- Click Create Dataset and give it a descriptive name, such as "Help Bot Knowledge Base".
- Once the dataset is created, open it and click Create Record to start adding content.
- Each record can be a paragraph of documentation, a frequently asked question with its answer, a code snippet, or any other text your users might ask about.
- To bulk-import existing documentation, click Import inside the dataset. ChatBotKit supports common document formats such as PDF, DOCX, and plain text.
Tip: Well-structured records produce better answers. Use clear headings and concise paragraphs so the bot can retrieve and present the information cleanly.
Step 2: Create a Bot
- Navigate to Bots and click Create Bot.
- Give the bot a name such as "Slack Help Bot" and an optional description.
- Choose a language model. For a help bot that needs accurate, context-aware answers,
claude-4.5-sonnetorgpt-4.1are strong choices. If you want a more cost-effective option,gpt-4o-miniworks well for straightforward question-and-answer scenarios.
Step 3: Write a Backstory
The backstory is the system prompt that defines your bot's behavior. Paste something like the following into the Backstory field, then customize it for your use case:
A well-written backstory removes ambiguity and improves the quality of responses, especially when paired with a lower-cost model.
Step 4: Connect the Dataset to the Bot
- In the bot's configuration settings, find the Datasets section.
- Select the dataset you created in Step 1.
- Save the bot configuration.
Once connected, the bot automatically searches the dataset for relevant records before composing each reply.
Step 5: Test in the Conversation Playground
Before deploying to Slack, test the bot using the built-in Conversation Playground:
- Open your bot and click the Playground button.
- Ask questions that are covered by your dataset records and verify the answers are accurate.
- Ask a question that is not in the dataset to confirm the bot handles missing information gracefully.
- Adjust the backstory or add more dataset records as needed until you are satisfied with the responses.
Step 6: Create a Slack Integration
- Navigate to Integrations and click Create Slack Integration.
- Connect your Slack workspace by following the OAuth prompts.
- In the integration settings, select the bot you created in Step 2.
- Configure which Slack channels or direct messages the bot should respond in.
- Save the integration.
Your Slack help bot is now live. Users can mention the bot or send it a direct message to get instant answers from your knowledge base.
Optional: Enhance the Bot with Abilities
You can extend the bot's capabilities by attaching a skillset with additional abilities:
- Memory (
memory/*) - Lets the bot remember context across conversations, useful for personalised support. - Fetch - Allows the bot to retrieve live information from URLs, so your knowledge base can reference external documentation.
- Dataset search - Gives the bot programmatic search over multiple datasets when you have more than one knowledge source.
To add abilities, navigate to Skillsets, create a new skillset with the desired abilities, then attach the skillset to your bot in the bot's configuration settings.
Troubleshooting
| Issue | Solution |
|---|---|
| Bot gives vague or incorrect answers | Review your dataset records for accuracy and completeness. Add more specific records covering the topics where the bot struggles. |
| Bot says it cannot find information that exists in the dataset | Check that the dataset is connected to the bot. Open the bot settings and confirm the dataset appears in the Datasets section. |
| Slack integration does not respond | Verify the integration is active and the connected bot is saved. Check that the bot has permission to post in the target channels. |
| Responses are too long or unformatted | Tighten the backstory with explicit instructions on response length and format. |
Summary of Steps
- Create a dataset and populate it with knowledge base records.
- Create a bot, choose a model, and write a backstory.
- Connect the dataset to the bot in the bot's configuration settings.
- Test the bot using the Conversation Playground.
- Create a Slack integration, connect your workspace, and link the bot.
- Optionally add a skillset with abilities to extend bot functionality.