# Ask AI

A chat on your published site that answers reader questions from your docs only, with links to the pages it used.

Ask AI puts a chat button on your published site. A reader types a question and gets a short answer written from your docs, with links to the pages it came from. It never answers from general knowledge about your product.

## How an answer is made

1. The reader's question is turned into a vector and compared with the indexed sections of your published pages. A short follow-up such as "and in Vite?" is searched together with the question before it.
2. Up to 8 matching sections are selected. Sections that match poorly are dropped.
3. If nothing matches, the reader is told the docs have nothing on that question. No AI call is made.
4. Otherwise the AI writes an answer using only the matching sections, in Markdown with code blocks, and the answer streams in as it is written.
5. Up to three source pages are linked under the answer, best match first.

The AI is told to say so when the excerpts do not contain the answer, never to guess, and to ignore instructions hidden inside the docs or the question.

## What it knows

Ask AI reads the **published** text of your pages, split into sections at your headings. It does not read your code, your drafts or pages that are not live.

The index is refreshed when you publish, unpublish a page or the site, delete a live page, or when a push updates a live page. In the dashboard, open **Ask AI** to see your pages in three groups:

- **Answering from it**: live and up to date.
- **Waiting for publish**: live, with newer draft text. Answers still use the live text.
- **Not published**: Ask AI does not know these pages yet.

> **Note:** Instructions in [AI guidance](/settings/guidance) steer how pages are written. They do not change how Ask AI answers.

## Turn it on or off

Open **Ask AI** in the dashboard, and switch **Ask AI** on or off. The change is saved automatically and applies to your live site straight away. When it is off, the chat button is removed. Ask AI also turns off when the site is unpublished, and it needs a public site.

## Limits and abuse protection

Ask AI is open to anyone who reads your docs, so it is protected in layers:

| Protection | Limit |
| --- | --- |
| Bot check | Readers pass a Cloudflare Turnstile check before asking. |
| Per visitor, per minute | 20 requests |
| Per visitor, per site, per day | 15 questions |
| Per site, per day | 500 questions |
| All Docup sites, per day | 5,000 questions |
| Question length | 1,000 characters |

Visitors are counted by network address. Daily limits reset at midnight UTC. A reader who is close to the limit sees how many questions are left.

## Privacy

The conversation lives in the reader's browser tab and disappears when the tab closes. Docup does not keep chat history. A question is sent to Docup's servers to be answered and is not stored. Analytics do not record questions. See [Analytics](/guides/analytics).
