rag-pdf-chatbot.mdx

All notes · RAG

A medical RAG bot that knows when to say "I don't know"

Retrieve, rerank, and refuse. A local vector index over PDFs, with an answer only when the pages support it.

The failure mode

A medical chatbot that always answers is worse than one that is quiet. The first version would paraphrase the question back as if it had read the PDF.

The loop

Load the PDFs, chunk them, embed them, retrieve, rerank, then answer only from the passages. If the top passages do not cover the question, the reply is a refusal plus the closest heading.

What shipped

Medical ChatBot is that loop: a local vector database, a conversational UI, and an explicit "I don't know" when retrieval is thin. Smart Exam Assistant uses the same idea on university exam policy.

This note is the design, not medical advice.