Chatbot (legacy v2)
Create AI-powered chat interfaces on any website
Legacy version: This guide applies only to chatbots created before January 27, 2026. New chatbots use the v3 experience. See the current documentation here: Chatbot.
The Chatbot feature in docAnalyzer enables users to create AI-powered chat interfaces that interact with documents or labels. These chatbots can be deployed as hosted instances on the ai2.help domain or embedded into external websites, offering customizable settings for appearance, behavior, and usage limits.
Overview
Chatbots in docAnalyzer are designed to:
- Interact with Documents: Answer questions or provide insights based on uploaded documents or labels.
- Customizable Experience: Tailor personality, introduction messages, and visual appearance to suit specific use cases or branding.
- Flexible Deployment: Choose between hosted or embedded options to fit your integration needs.
- Controlled Usage: Set credit limits to manage costs and prevent overuse.
This guide provides detailed instructions for setting up, configuring, and managing chatbots effectively.
Getting Started
To create your first chatbot:
- Access the Chat Interface: From a document or label chat in docAnalyzer, locate the "Spawn a Chatbot" option.
- Configure Settings:
- Title: Assign a name (e.g., "Project Assistant").
- Deployment Type: Select "Hosted on ai2.help domain" or "Embed on any website".
- Choose a Template: Pick a pre-configured template (e.g., "Business Consultant") or customize manually.
- Set Personality and Introduction: Define how the chatbot behaves and its initial message to users.
- Customize Appearance: Add a logo URL and select primary/secondary colors.
- Define Usage Limits: Set an overall credit ceiling and per-user limit.
- Create the Chatbot: Save your settings to generate the chatbot.
After creation, manage it from the chatbot management page (accessible from the chat overview page)
Configuration Options
Customize your chatbot with these settings:
Basic Settings
- Title: Displayed in the chatbot header (e.g., "Customer Support Bot").
- Deployment Type:
- Hosted: Accessible via a unique
ai2.helpURL. - Embedded: Integrated into external sites via a script tag.
- Hosted: Accessible via a unique
- Template: Predefined configurations for common use cases (e.g., "Helpdesk Chatbot").
Content Configuration
- Personality: Defines response tone and style (e.g., "You are a friendly customer support AI").
- Introduction Message: Initial user greeting, supports Markdown (e.g., "# Welcome!\nAsk me anything about your documents.").
Appearance Configuration
- Logo URL: PNG or SVG link for branding.
- Primary Accent Color: Hex code for buttons/actions (e.g.,
#54dd4a). - Secondary Accent Color: Hex code for headers (e.g.,
#26112c).
Usage Limits Configuration
- Overall Credit Ceiling: Total credits the chatbot can consume (e.g., 100).
- Per Guest User Credit Limit: Credits per user, enforced via browser storage (e.g., 20).
Advanced Settings
- AI Model: Inherited from the original chat; fixed after creation.
- Model Parameters: Context budget, thinking effort, etc., also fixed post-creation.
Iframe Integration
To embed the chatbot within a specific area of your website using an iframe instead of the standard widget script:
- Retrieve the URL: Ensure the chatbot is active and copy its hosted URL (e.g.,
https://ai2.help/...). - Insert Code: Add the following HTML to your page:
<iframe
src="https://ai2.help/YOUR_CHATBOT_ID"
width="100%"
height="600"
frameborder="0"
allow="clipboard-write"
></iframe>
Notes:
allow="clipboard-write": This attribute is essential to enable the "Copy" button for code blocks or messages within the chat.- Styling: You can apply CSS styles (e.g.,
border-radius,box-shadow) to the iframe to match your site's design.
Managing Chatbots
- View Stats: Track unique visitors and credit usage.
- Edit Settings: Update title, personality, etc., via the "Edit Configuration" modal.
- Suspend/Resume: Toggle availability with the "Suspend" or "Unsuspend" button.
Best Practices
- Define Clear Roles: Use personality and introduction to set user expectations.
- Brand Consistently: Match colors and logos to your identity.
- Test Thoroughly: Validate with real users before wide deployment.
- Optimize Costs: Adjust model settings or limits to balance performance and expense.
Troubleshooting
- Chatbot Unresponsive: Check suspension status or credit ceiling.
- Incorrect Responses: Refine personality/introduction or review document context.
- Embedding Fails: Verify script tag placement and API key validity.