Back to blog
5 min read

What Is "Chat With Docs"? How It Works on Documentation Sites

A plain explanation of chat with docs: what it is, how it pulls answers from your pages, where it sits on a documentation site, and how to tell a good implementation from a broken one.

"Chat with your docs" is the short version of a longer answer. It is the idea that a documentation site should be able to hold a conversation with a visitor instead of only serving pages and hoping the visitor finds what they came for.

The phrase gets thrown around loosely. A chatbot on the homepage that collects leads is called chat with docs by some vendors. So is a widget that summarizes pages using a generic model. Neither of those is what the term should mean. This post walks through what the term actually describes, how a working implementation is built, and what to look for when you evaluate tools that claim to offer it.

A plain definition of chat with docs

Chat with docs is a conversational interface that answers visitor questions using only the content of a specific documentation set.

Three parts to that definition carry the weight:

  • Conversational. Visitors type full questions in their own words, not keywords.
  • Answers questions. The output is a direct reply, not a list of links to go read.
  • Uses only the documentation. The knowledge comes from your pages, not from whatever the model learned during training.

A tool that skips any of those three is something else. A search box is not chat with docs because it does not answer. A general ChatGPT plugin is not chat with docs because it does not restrict itself to your content. A marketing chatbot is not chat with docs because it is not pulling from your documentation at all.

What happens under the hood when a visitor asks a question

The visitor experience is one box, one question, one reply. The implementation underneath has four steps.

  1. Indexing. The tool reads your Markdown, MDX, or HTML documentation, splits it into sections or paragraphs, and stores embeddings for each chunk. This happens once, and then again whenever the docs change.
  2. Retrieval. When a question arrives, the tool embeds the question and searches the index for the chunks that are most likely to contain the answer. A good retrieval step is tuned to your docs and returns five to ten candidate passages.
  3. Grounded generation. The question and the retrieved passages are handed to a language model with instructions to answer only from the passages. The model writes a reply that stays within that scope.
  4. Citation. Every claim in the reply is tied back to the passage it came from, so the visitor can click through and verify. This is what separates a trustworthy answer from a guess.

The quality of the whole system depends on how well step 2 works. Bad retrieval sends the wrong passages to the model, and the model either invents something or says it cannot find the answer. Good retrieval makes the generation step almost boring, which is a feature.

The role of retrieval and citations

Two parts of the pipeline deserve more attention than they usually get.

Retrieval is the real product. The model that writes the reply is mostly interchangeable. The difference between a chatbot that answers well and one that hallucinates is almost entirely upstream: whether the retrieval layer returned the right content. Good retrieval handles synonyms, handles vocabulary mismatch between the visitor and the docs, and ranks passages by how directly they address the question, not just by surface word overlap.

Citations are not decoration. A chatbot without citations is a black box. Visitors cannot verify anything, the docs team cannot tell whether the bot is on solid ground, and any wrong answer spreads uncorrected. A chatbot with citations turns every reply into something the visitor can check in one click, which is what makes them trust it enough to use it again.

If you want to see how retrieval and citations look in practice, try Knoku free. Push a folder of docs from the CLI and watch answers come back with the section they came from.

Where it sits on a documentation site

Chat with docs is usually embedded as a widget in a corner of the docs, most often the bottom right. A small button opens a panel where the visitor types a question and reads the reply.

The implementation side matters more than it looks:

  • The widget should render inside a Shadow DOM so it cannot break the site's styles or scripts.
  • It should load asynchronously so it never slows down the first paint of the docs.
  • It should be themeable so it does not clash with the rest of the site.
  • It should persist recent questions for the current session so the visitor can scroll back without losing context.

Some teams also put chat behind a slash command in the docs search bar, or expose it as an API that powers a Slack bot. Those are fine as secondary surfaces. The widget on the docs site is where most of the real traffic lives.

If the installation requires editing a bundler config or writing custom React, the tool is too heavy for what it does. A single script tag is the right bar for this category.

What separates a good implementation from a broken one

Most of the failure modes fall into three buckets.

The bot answers without citations. This is the biggest one. The answer might be right, but the visitor has no way to verify and the docs team has no way to audit. Over time, wrong answers accumulate silently.

The bot answers from the open web. If the model is allowed to pull from outside your docs, it will fill gaps with half-remembered public knowledge. Answers start sounding confident and generic, and they reflect what the model guesses about your product more than what your product actually does.

The bot cannot tell when to say "I do not know." A good docs chat says "I could not find this in the docs" when the retrieval step comes up empty. A bad one writes a plausible sounding paragraph anyway. The first behavior is useful. The second is dangerous.

You can spot all three in about five minutes. Ask the bot a question you know the docs do not cover. If it invents an answer without citing anything, the implementation is broken.

Where to go from here

If you are deciding whether chat with docs is worth adding to your site, the fastest test is to install a source-grounded tool on your existing Markdown and ask it ten of your most common support questions. If it answers seven of them with correct citations, the docs already have the content. If it answers three, the docs have gaps, and now you know which pages to write.

Start free on Knoku to try this on your own docs. Push Markdown from the CLI, drop a script tag, and see which of your top questions get answered without a ticket. See pricing when you are ready to scale past the free tier.