We put a "ask our docs anything" box in front of a support form and spent three weeks learning the same lesson over and over: the hard part is not answering. The hard part is refusing to answer.
A retrieval bot that guesses is worse than a support form that fails. The form at least fails visibly. The bot fails with a paragraph of confident prose, and the customer acts on it. Every design decision below came from a real miss.
Abstention is the feature
The first version scored chunks by similarity, took the top three, and asked the model to answer. It answered everything. Some of those answers were assembled from three unrelated documents that each mentioned a similar word. A user asking "can I export invoices as CSV" got a tidy explanation of the CSV import format, because "CSV" appeared in both.
So the contract changed. The model is given a task it can decline:
- answer only from the quoted passages
- if the passages do not contain the answer, say so and hand off
- never blend passages that describe different features
The threshold matters more than the prompt. We moved from "always answer" to three outcomes keyed on retrieval score:
| score | action |
|---|---|
| high | answer, with the source sentence quoted |
| middling | show the closest passages and ask a clarifying question |
| low | no answer, straight to the contact form |
The middling band is doing most of the work. It is where the bot says "here is what I found, is this the thing you mean?" instead of inventing a fourth possibility. Users are remarkably good at picking from two wrong options and telling you the right one.
Chunk by heading, and keep the title attached
Splitting on token count destroys meaning. A paragraph from the middle of a page about refund timing reads like a universal policy once it is detached from its heading. We chunk on headings and prepend the document title plus heading path to every chunk before embedding. It is unglamorous and it fixed a whole class of wrong answers where the right text was retrieved but interpreted as applying to the wrong plan tier.
Overlap between chunks also matters, but less than people think. Half a sentence of overlap stops boundary truncation. More than that mostly adds duplicates to the top-k and squeezes out the one passage that mattered.
Quote the sentence, do not paraphrase it
Every answer ships with the passage it came from, verbatim, collapsed under the answer. Two things happen:
- Users stop trusting the bot blindly and start checking — which is the correct relationship.
- We can audit failures without guessing. When an answer is wrong, the citation tells us whether retrieval failed or the document itself is wrong or stale.
That second point is the real payoff. Without citations, "the bot was wrong" is not a bug report. With citations, it is a documentation patch with a file and a paragraph.
Log the misses and treat them as a backlog
The most valuable artifact in the whole system is the list of questions it declined to answer. Ours is sorted by frequency and shows the closest passage that scored highest but fell below threshold. Every week that list turns into either a new doc page or a threshold adjustment, and the share of questions ending in handoff drops.
This is the part that is easy to skip because it is not part of the "AI" work. It is also the only part that compounds.
Timezone is a feature, not a footnote
The pattern that finally made this click for us was cross-border sellers: a buyer asks at 2am local time, and the person who knows the answer is asleep eight hours away. A self-serve link that answers the top twenty questions — and honestly defers the rest — covers the gap without pretending to be a person. The handoff is not a failure state. It is the queue for the next morning, pre-filtered.
Honest limits
- Stale docs get answered confidently. The bot is exactly as current as the source. If nobody updates the page about shipping cutoffs, it will confidently describe last quarter's policy.
- It is not a support agent. It cannot look up an order, issue a refund, or check an account. Anything account-specific has to hand off, and pretending otherwise produces the worst possible failure: a plausible promise nobody can keep.
- Low traffic domains stay thin. With thirty questions a month, there is not enough volume to find the gaps, so the backlog loop never gets going.
The linking step itself is a five-minute job — upload the docs, get a URL your customers can ask. Everything above is what we had to get right afterwards, and it is all in service of one behaviour: knowing when to stop talking.
Top comments (0)