AI Assistants (also called “Apps” in KnowFlow) are the interface between your knowledge bases and your users. They use the information you’ve stored to provide helpful, accurate responses across various platforms.

Understanding AI Assistants

AI Assistants in KnowFlow are customizable chatbots that leverage your knowledge bases to answer questions and provide assistance. You can deploy these assistants across multiple platforms to meet your users where they are.

Key Concepts

AI Assistant

The intelligent interface that interacts with users, powered by your knowledge

Knowledge Connection

The link between your assistant and one or more knowledge bases

Deployment

How your assistant is made available to users (website widget, API, etc.)

Prompt Engineering

Customizing how your assistant responds using system prompts

Creating an AI Assistant

1

Navigate to Apps

From your organization dashboard, click on Apps in the left sidebar.

2

Create New Assistant

Click the Create App button in the upper right corner.

3

Select Type

Choose the type of assistant you want to create:

  • Web Chat: Embeddable chat widget for your website
  • API Endpoint: Direct API access for custom integrations
  • Discord Bot: Integration with Discord servers
  • Slack Bot: Integration with Slack organizations
  • Microsoft Teams: Integration with Microsoft Teams
4

Basic Configuration

Enter the following information:

  • Name: A descriptive name for your assistant
  • Description: (Optional) A brief description of its purpose
  • Icon/Avatar: Upload a custom icon or choose from available options
5

Connect Knowledge Bases

Select one or more knowledge bases to power your assistant:

  1. Click Add Knowledge Base
  2. Select from your available knowledge bases
  3. Set priority levels if using multiple knowledge bases
6

Configure Settings

Adjust various settings according to your needs:

  • AI Model: Select the underlying AI model (e.g., GPT-4, Claude, etc.)
  • Language: Set the primary language for responses
  • Message History: Configure how many previous messages to maintain as context
  • Maximum Response Length: Set character limits for responses
7

Save

Click Create to finish setting up your AI assistant.

Deployment Options

Web Chat

Embed your AI assistant directly on your website:

1

Configure Widget

Customize the appearance of your widget:

  • Theme: Light, dark, or custom colors
  • Position: Bottom-right, bottom-left, etc.
  • Initial State: Expanded or collapsed
  • Welcome Message: Customize the initial greeting
  • Widget Icon: Upload a custom icon
2

Get Embed Code

Navigate to the Embed tab and copy the provided JavaScript snippet:

<script src="https://embed.knowflow.in/js/widget.js" 
        data-app-id="YOUR_APP_ID" defer>
</script>
3

Add to Website

Paste the JavaScript snippet into your website’s HTML, just before the closing </body> tag.

4

Test Implementation

Visit your website to verify the widget appears and functions correctly.

Discord Integration

Connect your AI assistant to Discord:

1

Configure Bot

In the Discord tab of your app:

  • Set bot username and description
  • Upload a custom avatar
  • Configure command prefixes (defaults to /ask)
2

Connect to Discord

  1. Click Connect to Discord
  2. Log in to Discord (if not already)
  3. Select the server to add the bot to
  4. Approve the permissions requested
3

Set Channel Permissions

Configure which channels the bot can access and respond in.

4

Test Bot

In your Discord server, use the configured command (e.g., /ask How do I reset my password?) to test the bot.

Slack Integration

Add your AI assistant to Slack:

1

Configure Bot

In the Slack tab of your app:

  • Set bot name and description
  • Upload a custom avatar
  • Configure command trigger (defaults to /knowflow)
2

Connect to Slack

  1. Click Connect to Slack
  2. Log in to Slack (if not already)
  3. Select the organization to add the bot to
  4. Approve the permissions requested
3

Configure Channels

Choose which channels the bot should be active in.

4

Test Bot

In your Slack organization, use the configured command (e.g., /knowflow How do I reset my password?) to test the bot.

API Access

Use your AI assistant programmatically via API:

1

Generate API Key

In the API tab of your app, click Generate API Key.

2

Configure Access

Set rate limits, IP restrictions, and other security settings.

3

Get Documentation

Review the API documentation to understand available endpoints and parameters.

4

Implement

Use the provided API key and endpoints in your application.

Example Request:

curl -X POST https://api.knowflow.in/v1/apps/YOUR_APP_ID/chat \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"message": "How do I reset my password?", "conversation_id": "optional-convo-id"}'

Customizing Assistant Behavior

Prompt Engineering

Fine-tune how your assistant responds:

  1. Go to the Prompt tab in your app settings
  2. Customize the system prompt to guide your assistant’s behavior
  3. Use placeholders like {{knowledge}} where retrieved information should be inserted
  4. Save your changes

Example system prompt:

You are a helpful support assistant for {{company_name}}. 
Use the following information to answer the user's question:
{{knowledge}}

If you don't know the answer based on the given information, say so politely 
and offer to connect the user with a human agent.

Response Templates

Create templated responses for common queries:

  1. Go to the Templates tab in your app settings
  2. Click Add Template
  3. Enter a trigger phrase or question pattern
  4. Enter the response template
  5. Save your template

Fallback Configuration

Set up fallback options when your assistant can’t answer:

  1. Go to the Fallbacks tab
  2. Configure:
    • Custom “I don’t know” messages
    • Human handoff options
    • Alternative suggestions
    • Feedback collection

Monitoring and Analytics

Conversation History

View all interactions with your assistant:

  1. Go to the Conversations tab
  2. Browse through conversation threads
  3. Filter by date, user, or content
  4. Export conversations for further analysis

Performance Metrics

Track how well your assistant is performing:

  1. Go to the Analytics tab
  2. View metrics such as:
    • Total conversations
    • Average conversation length
    • Response time
    • User satisfaction ratings
    • Knowledge base coverage

Knowledge Gaps

Identify areas where your assistant needs improvement:

  1. Go to the Knowledge Gaps tab
  2. View questions the assistant couldn’t answer confidently
  3. Use these insights to update your knowledge bases

Best Practices

  • Start focused: Begin with a specific use case and expand as you gain confidence
  • Test thoroughly: Use the chat interface to test various scenarios before deploying
  • Iterative improvement: Regularly review conversations and refine your assistant
  • Clear expectations: Set appropriate welcome messages to guide users on what they can ask
  • Use multiple knowledge bases: Connect specialized knowledge bases for different topics
  • Monitor continuously: Regularly check analytics to identify improvement opportunities

Troubleshooting