German Municipal RAG Chatbot
Published:
German municipal governments publish an enormous amount of information about citizen services — but finding the right answer buried in council websites and PDF handbooks is its own small ordeal. I built a retrieval-augmented generation (RAG) chatbot designed to give citizens direct, conversational answers about municipal services, instead of a search results page to dig through.
The Challenge
Public-sector chatbots have a low tolerance for error: citizens rely on this information to know their entitlements and obligations, and municipal content is fragmented across departments, formats, and update cycles. The bot needed to answer confidently and correctly, stay current as source content changed, and do it all in a domain where “close enough” isn’t good enough.
My Approach
I implemented the system in Python using a RAG architecture, so every answer was grounded in retrieved municipal documentation rather than a model’s unverified output. Because the quality of a RAG system depends heavily on the data feeding it, I led the data generation effort myself — curating and structuring the underlying knowledge base so the retrieval step could reliably surface the right passage before the language model ever had to reason over it. I also designed a rigorous evaluation covering answer quality and AI safety — measuring whether responses were accurate, well-grounded in the source material, and safe enough for citizens relying on them for real decisions. This was as much a data-engineering and evaluation project as an NLP one: the modeling was only as good as the groundwork underneath it.
Outcome
The result was a working conversational interface that let citizens ask natural-language questions about municipal services and get accurate, sourced answers. Beyond the immediate deployment, the project sharpened an approach I’ve reused since — treating data generation and curation as a first-class part of any RAG system, not an afterthought — which later carried directly into government-facing AI work in Rwanda, including the Tunga agricultural voicebot.
Technologies: Retrieval-augmented generation, Python, data generation and curation pipelines, LLMs.
