How to Add an AI Assistant to Docusaurus
2 min read
Docusaurus gives you fast, well-organized docs and a search box. What it doesn't give you is an answer. A reader who doesn't know which page to open still has to guess. An AI assistant fills that gap: the reader asks in their own words and gets a short answer drawn from your docs.
Search and an assistant do different jobs
Search, such as Algolia DocSearch or a local search plugin, lists the pages that match the words someone typed. It works well when the reader knows the term to look for. An assistant answers the question itself, in a few sentences, even when the reader's words differ from yours. Most docs sites that add an assistant keep their search too.
What to look for in a docs assistant
- It answers only from your docs, and says so when they don't cover the question.
- You can see what readers asked and which questions went unanswered.
- It keeps up when you publish changes.
- The price is clear before you start, and a busy month can't run up a surprise bill.
Docs-focused tools such as Kapa quote their paid plans through sales. CertifChat is built for small software teams that answer support questions themselves, and it publishes its prices.
Add CertifChat to Docusaurus in two files
- Create a CertifChat account and add your docs site as a source. The crawler renders each page and can read the sitemap.xml that Docusaurus generates.
- In the dashboard, open Widget and copy your embed snippet: an import line and an init() call with your public key.
- Create static/certifchat.js in your Docusaurus project and paste those two lines into it.
- In docusaurus.config.js, add scripts: [{ src: '/certifchat.js', type: 'module' }]. Put your baseUrl in front of the path if your docs don't live at the site root.
- Add your docs domain to the allowed origins in CertifChat, then build and deploy.
The full steps, with answers to common questions, are on the Docusaurus integration page.
Check it before readers do
Ask the assistant the ten questions your users ask most. Open each conversation in the dashboard to see which pages the answer used. Where an answer is wrong, the page usually is too, or two pages disagree. Fix the page and ask again.
Keep it current
Turn on watching for your docs source so CertifChat checks it for changes, or re-crawl after a big release. Then read the knowledge gaps once a week: they are the questions your docs don't answer yet, in your readers' own words.
You can try it for a week for $9 on your own docs.
