Why the line matters
Every search returns something. Ask a store's assistant about a product it has never stocked, and the search will still find the nearest passages, perhaps a similar product or a general page about the range. Without a threshold, the assistant would write an answer from those weak matches, and that answer would sound exactly as confident as a correct one. The threshold is what lets it say "we do not have that" instead.
Two ways to get it wrong
- Too low. Weak matches are used, and the assistant answers questions it should have declined, using passages that are only loosely related. This is how most confident wrong answers are made.
- Too high. Good matches are dropped, and the assistant declines questions your content could have answered, often because a shopper worded the question differently from your page.
There is no universal right value
Scores depend on the embedding model, on how your content is written and on how your shoppers ask. A value tuned on one store routinely fails on another. The right way to choose it is to measure it on your own questions: collect real questions with known answers, and see where the passages that answer them score compared with the ones that do not.
Seeing it in action
A trace draws the threshold as a line through the candidates. When an answer is wrong, the first question is where the right passage sits relative to that line: absent, a little below it, or above it and still misread. Each points to a different fix.
What to do when it is wrong
When the assistant declines questions it should answer, look at the dropped candidates: if the right passage is there, a little under the line, rewrite that passage in the words shoppers use, or add a verified answer. When it answers questions it should decline, look at what it used: a loosely related passage above the line usually means the content is too broad, not that the line is too low.
How ChatWidget uses it: every trace shows the threshold as a line, with the passages that were used above it and the ones that were dropped below it, dashed.