RAG bot that refuses outside its docs scores 9/10 on held-out set — what broke

ZtasnimS75 · reddit · 2026-10-22

A developer built a small RAG assistant over 8 FastAPI tutorial pages that must answer only from retrieved docs and cite the source file, else reply NOTINDOCS. Stack: ChromaDB, all-MiniLM-L6-v2 (800-char chunks, 100 overlap), Gemini flash-lite, Streamlit free tier.

Key findings:

Caveats: test cases drafted with AI help, only 9 of 25 expected answers manually checked. The author asks whether hybrid BM25 + vector, a re-ranker, or more chunk overlap would fix the miss, and how to better set the refusal threshold. Demo, code, and full write-up linked.

Original post →

More from coding & agent

coding & agent channel →