Documentation Site Chatbot: Let Developers Ask Your Docs Questions
A documentation site chatbot answers developers from your docs and links the source page. What to check first: rendering, code examples, versions and handoff.
By Umar Mirza, founder of ChatBento
Published Updated 7 min read
A documentation site chatbot lets developers ask your docs a question in their own words ("how do I paginate the list endpoint?") and get a short answer with a link to the page it came from. It works well when your docs are readable as plain HTML, cover one version clearly, and the bot is told to point to the docs for full code rather than write its own. It works badly when the docs only render in the browser, mix versions, or leave gaps the bot is tempted to fill.
I build ChatBento, which answers from a site's own pages, and docs sites are one of the more demanding places to put it. Developers ask precise questions, notice wrong answers immediately, and copy what they read into production. Here's what to check before you add one.
What do developers ask a docs chatbot?
Docs questions are narrower than customer questions, and they often use words that aren't in your headings:
- "How do I authenticate requests from a server?"
- "Is there a rate limit on the search endpoint?"
- "What's the max page size for list calls?"
- "Does the webhook retry if my endpoint is down?"
- "Which SDK versions support Node 22?"
- "How do I rotate an API key without downtime?"
- "Can I filter by date range?"
- "Why am I getting a 409 on create?"
- "Is there a sandbox environment?"
Search across a docs site usually matches keywords against titles. A visitor who types "409" won't find a page titled "Idempotency keys" unless you added the synonym. A bot that matches by meaning has a better chance, which is the core of the help center search use case.
Check first: can the bot read your docs?
This is where docs sites differ most from marketing sites. Some docs generators produce static HTML pages; others build a single-page app where the text only appears after JavaScript runs.
ChatBento's crawler downloads each page's HTML as your server sends it and doesn't run JavaScript. If a page has almost no text in that HTML, it fails with an error saying it may need JavaScript to render. The quickest test is in your own browser: open a docs page, choose "View page source", and search for a sentence from the article. If it's there, the bot can read it. If the source is an empty shell with a script tag, it can't.
A few more things that matter for docs:
- Subdomains. The crawler stays on the site you give it, treating www and non-www as one. If your docs live on
docs.example.com, add that address as its own website source. - Sidebars and headers are dropped. Navigation, header and footer elements are stripped as noise, which is what you want: the bot reads the article, not the menu on every page.
- Raw files are skipped. The crawler reads HTML pages, not
.md,.txt,.jsonor PDF files. If your API reference only exists as a downloadable spec, paste the relevant parts in as text. - Very long pages are capped. Each page is split into passages of about 1,100 characters, and only the first 120 passages of any one source are kept. A giant single-page API reference may be cut off partway; splitting it into one page per resource helps both people and the bot.
Why your chatbot can't answer from some pages has the full list of what the crawler skips.
How does it handle code?
Honestly: it describes code, it doesn't reproduce it. Two details in how ChatBento works shape this:
- Indentation is lost in training. The crawler keeps the text inside code blocks but collapses runs of spaces, so an indented example comes through as flattened text. The bot can still learn that
limitis a query parameter with a maximum of 100; it can't hand back your Python example intact. - Answers are plain text. The answering model is told not to use code blocks, and the chat window shows bold text, short lists and links, not formatted code.
That sounds like a limitation, and it is one, but it pushes the bot toward the right behaviour for docs: answer the question in a sentence or two, name the parameter or endpoint, and link to the page with the tested example. Under each reply, the widget can show links to up to two of the pages the answer drew on, when they're a strong enough match. A developer then copies the code from your docs, which you maintain, rather than from a chat reply.
If you want the bot to lean on this, say so in the instructions (below).
What about versions?
Docs with several live versions are the most common source of wrong answers. If /v1/ and /v2/ both describe the same endpoint differently, the bot may draw on either.
Some ways to keep it straight:
- Train on the current version only. The crawler reads your sitemap as well as links, so old versions can come along. The lasting fix is to mark old versions
noindex, which the crawler skips. That also asks search engines to drop them, so decide deliberately; for outdated docs it's often what you want anyway. You can also remove old pages from the bot's Sources list, but re-training the whole bot fills free page slots from your site again, so they may come back. - Put the version in page titles. Titles are stored with each passage, so "Pagination (v2)" helps the bot tell pages apart.
- Say in the instructions which version it answers for, and that older versions are covered elsewhere.
- Re-train after releases. ChatBento doesn't re-read your site on a schedule. Re-train changed pages, or everything at once, after each docs release.
Instructions for a docs bot
Instructions are for behaviour. Facts belong in the docs. A block like this works well (ChatBento allows up to 4,000 characters):
You answer questions about the current version (v2) of our API and SDKs, using only
our documentation. If someone asks about v1, say the v1 docs are archived and the
answer may differ.
Answer in one to three sentences. Name the exact endpoint, parameter or setting, then
point to the docs page for the full example. Don't write code from scratch.
Never guess limits, defaults, error meanings or version support. If the docs don't
say, say so and offer the contact form.
If someone reports a bug, an outage or a billing problem, don't troubleshoot it.
Ask for the request ID if they have one and offer the contact form.
The built-in rules already tell the bot to answer only from your content and never invent features, links or details. These lines add docs-specific behaviour on top. More examples in how to write chatbot instructions.
What must it never improvise?
On a docs site, a confident wrong answer costs a developer an afternoon. The bot should never make up:
- rate limits, quotas, timeouts or maximum sizes;
- parameter names, default values or field types;
- what an error code means;
- which SDK or language version is supported;
- roadmap answers ("is GraphQL coming?").
If the docs don't state it, the right reply is "the docs don't cover that" plus a handoff. AI chatbot hallucinations explains why grounding in your own content matters and where it still fails.
When to hand off to a person
ChatBento answers and hands off. It can't see a developer's account, logs or requests, so these go to a human:
- bugs and suspected outages;
- account, billing and API key problems;
- questions the docs genuinely don't answer;
- anyone who says the docs are wrong.
The contact form collects an email and a message and sends them to you with the page the developer was on and the recent conversation, so you know exactly which docs page prompted it.
How do you measure it?
- Unanswered questions. ChatBento lists questions about your product it couldn't answer in the dashboard's Unanswered tab. On a docs site, that's your writing backlog.
- Which pages get cited. The Inbox shows the pages each answer drew on. Pages that come up often deserve the most care.
- Repeat questions in different words. If people keep asking about "409" and the answer lives on "Idempotency keys", add the error code to that page's heading or first paragraph.
- Support tickets that ask docs questions. If those fall after launch, it's helping.
If your docs also serve a product onboarding flow, the SaaS chatbot page covers the wider setup.
The short checklist
- View source on three docs pages: the article text is in the HTML
- Docs subdomain added as its own source
- Old versions marked
noindex(or removed from Sources) - Long reference pages split by resource
- Instructions say which version, and to link rather than write code
- Bugs, billing and account issues go to the contact form
- Unanswered tab reviewed after every docs release
The fastest way to find out whether your docs are bot-ready is to point a bot at them and ask the questions in your support inbox. Every ChatBento plan starts with a 7-day free trial, so you can try it on your own docs before paying.