zianalytics_
← All writing
Aug 12, 2026 RAG / LLM / tutorial

Building a RAG chatbot that admits what it does not know

A retrieval-augmented chatbot is only as trustworthy as its willingness to decline. This post walks through the retrieval pipeline I use — chunking, embeddings, and a vector store — and the prompt discipline that keeps answers grounded in the retrieved context.

The pipeline

Index your source documents, retrieve the top matches for a question, and pass them to the model as the only allowed evidence. If the retrieved chunks do not contain the answer, the model says so.