> ## Documentation Index
> Fetch the complete documentation index at: https://docs.botbrains.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Snippets

> Create and curate knowledge with manual snippets

Snippets are manually created pieces of knowledge that you add directly to your AI agent's knowledge base. They give you complete control over specific information your AI uses to answer questions.

## When to Use Snippets

Use snippets to:

* **Fill knowledge gaps** - Add information missing from your documentation
* **Control messaging** - Ensure your AI uses specific, approved language for policies or procedures
* **Capture verified answers** - Save good responses from real conversations
* **Provide quick updates** - Make changes that take effect immediately

<Tip>
  Save verified answers from conversations as snippets using the "Improve Answer" button. This builds your knowledge base from real customer interactions.
</Tip>

## How They Work

You store snippets in human data providers alongside other knowledge sources. When a customer asks a question, your AI searches all sources-including snippets-to find relevant information. Each snippet has a name, rich text content, and is automatically indexed for semantic search.

<img src="https://mintcdn.com/botbrains/iwe7EG2H5FvzvT9J/images/snippets/snippets-data-provider-list.png?fit=max&auto=format&n=iwe7EG2H5FvzvT9J&q=85&s=6ca6e1abba3830cfcfe4f001e1a8ab91" alt="List of snippets in a human data provider showing snippet names and content preview" data-generation-prompt="Navigate to platform.botbrains.io/~/dataproviders. Click on a Collections data provider, then click into the Snippets section. Show the snippet list with snippet names and content previews. Collapse the sidebar. Use 1920x1080 viewport." width="1920" height="1080" data-path="images/snippets/snippets-data-provider-list.png" />

## Creating Snippets

**From a data provider:**

1. Navigate to Data Providers and select a human data provider
2. Click New Snippet
3. Enter a descriptive name and add your content
4. Click Save

**From a conversation:**

1. Click the "Improve Answer" button during a conversation
2. Click Add to Knowledge
3. Edit if needed and select a data provider
4. Click Save

Changes are available immediately.

<img src="https://mintcdn.com/botbrains/iwe7EG2H5FvzvT9J/images/snippets/create-snippet-dialog.png?fit=max&auto=format&n=iwe7EG2H5FvzvT9J&q=85&s=ca32fd3fe57211eb996973b21ab06222" alt="New snippet creation dialog with name and content fields in a data provider" data-generation-prompt="Navigate to platform.botbrains.io/~/dataproviders. Click on a Collections data provider, then click into the Snippets section. Click New Snippet to open the creation dialog. Capture the dialog. Use 1920x1080 viewport, collapse sidebar." width="1920" height="1080" data-path="images/snippets/create-snippet-dialog.png" />

## Best Practices

**Keep snippets focused**

* Cover one topic or question per snippet
* Keep content concise (200-500 words)
* Include enough context for the AI to understand when to use it

**Use clear naming**

* Good: "How to request a refund after canceling a subscription"
* Avoid: "Policy #3" or generic labels

**Write for your AI**

* Start with the most important information
* Use clear, direct language
* Include specific conditions or limitations
* Make snippets self-contained with complete information

**Organize by collection**
Create separate human data providers for different categories like Product Knowledge, Policies, or Support FAQs.

## Formatting Support

The rich text editor supports bold, italic, headings, lists, links, and code blocks. You can also upload Markdown files (.md) which are automatically converted to HTML when edited.

<Note>
  Deleted snippets cannot be recovered. Download important snippets as HTML files before deletion if you need a backup.
</Note>
