---
title: Ask AI
subtitle: Readers ask questions right on your docs site, and the AI answers from your docs, marking cited passages with numbers. Choose Anthropic, DeepSeek, or OpenRouter.
description: Ask AI in ButterIX — what readers can ask, what answers are based on, choosing a model and adding a key, extra instructions, custom answers, content sources, the ai config in docs.yml, hiding personal data, usage limits, and the question log and resolution rate.
---

## What readers see

Hosted sites have an **Ask AI** button in the header, and an "Ask about this page" action below every page title. In the chat panel:

- Answers stream in word by word and can be stopped at any time;
- `[1]`, `[2]` after a sentence link to the cited doc passages, and sources are listed below the answer;
- Follow-up questions are supported, and the conversation is kept as you move between pages;
- Each answer can be rated with a thumbs up or down, which is saved in the [question log](#question-log).

You can also put the same assistant on your own website or in your product; see [Embed](./ask-ai-embed.mdx).

### Open the panel from a link

Add `?ask-ai` to any page URL to open the page with the chat panel expanded. This works well on your website, inside your product, or in emails:

```text
https://docs.example.com/?ask-ai
https://docs.example.com/guides/quickstart?ask-ai
```

`?ask-ai=question` writes a question in the box (up to 512 characters, URL-encoded) for the reader to check and send:

```text
https://docs.example.com/?ask-ai=How%20do%20I%20verify%20webhooks%3F
```

## How it answers

Ask AI works out what the reader means, searches your docs, and answers from what it finds:

- **Understands everyday wording**: readers don't need to know the docs' own terms, and can ask in another language;
- **Reworks documented content**: translates, summarizes, or ports it to another programming language or tool — a Codex version when the docs only show Cursor, for example. Such answers say they aren't from the docs;
- **Helps readers connect**: it knows the address of the site's [MCP server](./agents.mdx#site-mcp-server) and can give the command to add it;
- **Doesn't make things up**: when the docs don't cover something it says so and links the closest page;
- **Stays on topic**: questions unrelated to your product and docs are politely declined, and other subjects asked for as sample data, file names, or templates get placeholders.

Answers use **default-version**, non-hidden pages, plus the [custom answers](#custom-answers) and [content sources](#content-sources) you add.

<Tip>
  Write a clear `description` in each page's frontmatter and put the other names readers use in `keywords`, so the AI can find the page.
</Tip>

### Showing images in answers

Answers are text by default. To let readers see an image right in the answer (a support group QR code or an architecture diagram, for example), add `askAi` to its `<img>`:

```mdx
<img src="/assets/support-qr.png" alt="User group QR code" width="240" askAi />
```

- When an answer uses the passage the image is in and the reader needs to see it, the image appears in the answer;
- Say what the image shows in its `alt` (or `caption`): the AI decides from that whether to use it. With neither, the build warns and the image isn't used;
- An image with a `width` is shown at that width; clicking it opens the original in a new tab;
- Images without `askAi` are never shown. An answer shows at most 4, and only images are supported for now.

For an image written in Markdown, put `askAi` where its title goes, in single or double quotes. It is only a marker and is never shown as the image's title:

```mdx
![User group QR code](/assets/support-qr.png 'askAi')
```

In the visual editor, click an `<img>` image and check “Ask AI can show it in answers”. The same applies to the [embedded](./ask-ai-embed.mdx) assistant.

## Providers and models

<Tabs>
  <Tab title="Anthropic">
    Default model: `claude-opus-5-5`.

    | Model | id | Context | Price (input / output, per million tokens) |
    |---|---|---|---|
    | Claude Opus 5.5 (recommended) | `claude-opus-5-5` | 1M | $4 / $20 |
    | Claude Sonnet 5.5 | `claude-sonnet-5-5` | 1M | $2 / $10 |
    | Claude Haiku 5.5 | `claude-haiku-5-5` | 1M | $0.1 / $0.5 |
    | Claude Fable 5.2 | `claude-fable-5-2` | 1M | $8 / $40 |
  </Tab>
  <Tab title="DeepSeek">
    Default model: `deepseek-flash`; `deepseek-v4-pro` is also available.
  </Tab>
  <Tab title="OpenRouter">
    Any model on OpenRouter; the default is `~deepseek/deepseek-flash-latest`, which always points to the latest DeepSeek Flash.
  </Tab>
</Tabs>

The dashboard lists the models and prices available to your key; you can also type the id of a model that isn't listed.

## Configure it in the dashboard

Open the **Ask AI** section in the site's Settings:

<Steps>
  <Step title="Enable it and choose a provider and model">
    Once enabled, the ways to ask appear on the pages; when switched off they hide. Neither needs a redeploy.
  </Step>
  <Step title="Add a key">
    Enter the provider's API key, or use one set up by the platform administrator. Keys are verified, stored encrypted, and used only for this site's Ask AI and AI translation.
  </Step>
  <Step title="Adjust reasoning effort and instructions">
    Higher effort gives more thorough answers but is slower and costs more; Low is recommended for docs. Extra instructions can set the tone, stress product names, or narrow or widen the scope, for example "general HTTP questions are fine too".
  </Step>
  <Step title="Ask a test question">
    Ask the live docs a question and check the answer, sources, and response time.
  </Step>
</Steps>

You can do the same through the [Ask AI settings API](/api-reference/ai/update-ai-settings).

## Contact when AI has no answer

Turn on **Contact when AI has no answer** in the site's Settings, and enter a support page, a support email, or both. It's off by default and can't be turned on without contact details. Changes take effect right away, without a new deployment; you can also use the [Ask AI settings API](/api-reference/ai/update-ai-settings) (admin role).

Readers then see your contact details below an answer when:

- the docs have no answer, or only part of it;
- the answer failed, or the day's questions are used up;
- they rate the answer down.

| Button | What it does |
|---|---|
| Contact support | Opens the support page: an `https://` address, or a path that starts with `/` |
| Send an email | Opens the reader's own mail app with the question and the page filled in; they check it and send it |
| Copy conversation | Copies the whole conversation and the page address, to paste into a ticket or chat |

Unrelated questions that were declined don't show it. The platform sends nothing on the reader's behalf. With [personal data hidden](#hide-personal-data-and-secrets), the same applies to the email and the copied text.

## Custom answers

Some questions need a fixed answer, such as pricing, support channels, or a limitation the docs don't cover yet. Add them under "Ask AI → Custom answers" of the site, or create one straight from a reader's question under "Conversations":

- **Questions**: 1–20 example questions, up to 500 characters each. The answer is used when a reader's question is close to any of them;
- **Answer**: Markdown, up to 8000 characters.

When one fits, the AI answers from what you wrote first, even where the docs differ, and without a citation. A site can have up to 200, each of which can be switched off; changes apply shortly after saving, without a redeploy. Requires the editor role.

You can also manage them through the [API](/api-reference/ai/create-guidance):

```bash
curl -X POST https://api.butterix.com/v1/sites/acme-payments/guidance \
  -H "Authorization: Bearer $BITI_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"context":["How do I contact support?","Is there customer service?"],"document":"Email support@acme.com; we reply within 4 hours on business days."}'
```

## Content sources

Under "Ask AI → Content sources" of the site, add content outside your docs for Ask AI to draw on. Citations link to the source's address. Sources are used by Ask AI only and don't appear in site search or MCP.

<Tabs>
  <Tab title="Markdown document">
    Paste a Markdown document or load it from a file (up to 500,000 characters), with a title and a link to cite.
  </Tab>
  <Tab title="Website">
    Enter the start URL of a public website, and the platform follows the links on its pages:

    - Only pages on the same host, in the start URL's directory; you can set paths instead (such as `/help/`) and exclude others;
    - It respects the website's `robots.txt` (as `ButterIXBot`) and the `noindex` and `nofollow` of its pages;
    - The page limit is 1–500, 100 by default;
    - It's fetched again on a schedule: never, daily, weekly (default), or monthly, or by hand at any time. If fetching fails, the last content stays in use.

    Only public addresses that need no sign-in can be fetched.
  </Tab>
</Tabs>

A site can have up to 20 sources, with up to 5 million characters of text per website. Requires the editor role; also available through the [API](/api-reference/ai/create-source).

## Configure content in docs.yml

The greeting, suggested questions and the like go in `docs.yml`, versioned along with the docs:

```yaml title="docs.yml"
ai:
  enabled: true
  greeting: Hi! I can answer questions about the Acme API.
  suggestions:
    - How do I create my first payment?
    - How do I verify webhook signatures?
  system-prompt: Prefer TypeScript examples in answers; when amounts come up, remind readers the unit is cents.
  disclaimer: Answers are generated by AI. For contract terms, the signed documents apply.
  mask-pii: true
```

`ai.system-prompt` and the "extra instructions" in the dashboard both apply. `ai.enabled: false` turns Ask AI off.

`ai.disclaimer` replaces the notice at the top of the panel. The greeting, suggested questions, and notice can be translated in [`labels.yml`](./i18n.mdx#labelsyml-translate-navigation-and-site-texts).

### Hide personal data and secrets

With `ai.mask-pii: true`, personal data and secrets in a question are replaced with placeholders such as `[EMAIL]` before it's sent, and the reader is asked to check it and send it again. To hide only some kinds, list them:

```yaml title="docs.yml"
ai:
  mask-pii: [email, phone, secret]
```

| Kind | What it covers |
|---|---|
| `email` | Email addresses |
| `phone` | Phone numbers |
| `id-number` | Chinese resident ID numbers |
| `bank-card` | Bank card numbers |
| `secret` | API keys, tokens, private keys, and values labeled as a password or secret |

What goes to the model and into the question log is treated the same way.

## Usage limits

| Item | Limit |
|---|---|
| Per visitor | 12 per minute, 200 per day |
| Per question | Up to 512 characters. Ask AI answers questions about the docs; for a long error or code, ask about the key part |
| Per site | 200 in 24 hours, adjustable or removable in the Ask AI settings. Once reached, readers still get links to the relevant pages |
| Organization | When the "AI questions / month" quota runs out, Ask AI pauses until next month |

Abuse protection is built in, and only questions from your site's own pages are accepted. A reader who keeps asking unrelated things gets answers without the earlier conversation, and then has to wait.

The organization's [scheduled tasks](./automations.mdx) use the same quota; each run counts as 10.

## Question log

Each question's text, answer, sources, page, and country are under "Ask AI → Conversations" of the site (hover a page for its full address, open an entry for every detail), where you can filter by outcome, rating, and whether there are sources, and export as CSV. Each entry has:

- **An outcome**: Resolved, Partly, Not in docs, Off-topic, Off-scope answer, or Incomplete. An off-scope answer covers subjects the site is not about, and isn't carried into follow-ups;
- **The reader's rating**: up, down, or none.

**Resolution rate** = Resolved ÷ (Resolved + Partly + Not in docs). Off-topic questions, off-scope answers, and incomplete ones are left out.

Look first at "Not in docs", "Partly", answers rated down, and answers without any source: they show what to write, or what suits a [custom answer](#custom-answers). [Documentation gaps](./console-agent.mdx#documentation-gaps) group them by topic.

The same data is available through the API; see [Ask AI questions](/api-reference/analytics/list-questions), [Export CSV](/api-reference/analytics/export-questions), and [Resolution rate](/api-reference/analytics/question-summary).
