All posts
AI / RAG

Let Your Chatbot Say I Don't Know

Aug 20266 min read

Most chatbot demos are impressive because the person demoing knows which questions to ask. Put the same thing in front of the public and the questions get stranger, more specific, and much harder.

I have been working on an AI concierge for a tourism board. It answers visitor questions about a city. Where to eat near my hotel, what works with young kids, plan me two days around this event. The stakes are different from an internal tool, and the difference is physical. If it invents a restaurant, someone stands outside a shuttered building at 9pm holding a phone.

That single scenario shaped nearly every decision in the build.

Why wiring a model to a chat box fails

You can connect a good model to a chat interface in an afternoon and it will feel like it works. Ask it about a famous museum and it will answer well, because that museum is thoroughly represented in its training data.

Then someone asks about a restaurant that opened four months ago. Or one that closed. Or a small place that was never written about much online. Now the model has three options. Say it doesn't know, which most models are reluctant to do. Answer vaguely enough to be useless. Or produce something confident and wrong.

The third one is the dangerous one, and it is the default behaviour, because these models are optimised to produce fluent plausible text. Fluent and plausible is exactly what a wrong answer looks like.

Answering from a source instead of from memory

The fix is not a better prompt. Telling a model "do not make things up" helps a little and fails under pressure, because you are asking it to know what it doesn't know, which is not something it can reliably do.

The fix is to stop asking it to answer from memory at all.

We built a retrieval layer that pulls the tourism board's actual content, documents, listings, structured data, extracts and chunks it, and embeds it into pgvector on top of Postgres. At query time the relevant chunks get retrieved and handed to the model along with the question. Its job stops being "answer this" and becomes "answer this using only what I have given you".

That is a much easier job, and more importantly it is a job where failure is visible. If retrieval returns nothing relevant, there is nothing to answer from, and the honest response falls out naturally.

Give it permission to fail

This part gets skipped a lot. Grounding the model is only half of it. You also have to make "I don't have that" an acceptable answer.

If you do not explicitly allow it, the model will reach. It will find the closest thing in the retrieved context and stretch it, because everything in its training pushes toward producing a helpful sounding response. A retrieved chunk about one neighbourhood becomes an answer about a different one.

Saying it plainly, and building the flow so that a low relevance retrieval routes to a graceful fallback rather than a forced answer, matters as much as the retrieval itself. A visitor told "I don't have reliable information on that, here is who to ask" has been served well. A visitor sent to a closed restaurant has not.

Stale is the same as wrong

A knowledge base is not a thing you build once. Restaurants close, exhibitions end, hours change seasonally.

Content gets re-ingested on a schedule, so the index reflects the source rather than a snapshot from whenever we last deployed. This is unglamorous and it is the difference between a system that degrades gracefully and one that quietly gets worse every week while looking exactly as confident as it did on day one.

That last part is what makes staleness nasty. There is no error. Nothing fails. The answers just drift away from reality while the tone stays reassuring.

What public actually means

Two more things that only matter because anyone can talk to it.

People probe it. Not most people, but enough. A public assistant will be asked to ignore its instructions, reveal its prompt, or behave as something else, usually within days. We run injection screening before the main flow rather than hoping the system prompt holds, because the system prompt will not hold.

And it needs moderation on the way in and out, for the ordinary reason that a tourism board's name is attached to every response.

If you are building one of these

Spend your time on retrieval, on evaluating whether the right chunks come back, and on what happens when they don't. That is where the quality lives.

The prompt is maybe a fifth of the work, and it is the fifth that everyone spends their time on because it is the part you can see.

© 2025 Bilal

All posts