Agentic RAG · Python
Driver Ops
A compliance assistant for truck drivers. They ask in plain words, by Telegram or a chat page, and get a short answer that cites the regulation or company procedure it came from.
When the documents do not cover the question, it says so and gives a phone number instead of guessing. Refusing is a first-class outcome: every question passes a guardrail, retrieved text is graded, and a miss returns a fixed message that no model writes.
FastAPI · LangGraph · OpenSearch (BM25 + kNN) · Ollama · Docling · Airflow · Postgres · Redis · Langfuse · Docker Compose
My repository, built with Claude Code. The repo carries its CLAUDE.md and workflows.
Read the source ↗Agent control flow · pick a question to trace its path
Does retrieval find the right document?
24-question eval, 18 answerable
- BM25 only66.7%
12 of 18
- Hybrid BM25 + vectors83.3%
15 of 18
- Agent: guardrail, then grading88.9%
16 of 18
The guardrail earns its place. Plain RAG refused 0 of 3 out-of-scope questions. The agent refused 3 of 3.
Where it still falls short. Citation accuracy is 83.3%, one of three unanswerable questions got an invented answer, and answers took roughly 14 to 23 seconds on a local 4B model. The repo records these misses.

