Stadt Bern proof of concept: open-source RAG chatbot on Llama-3.3-70B answers staff questions on legal documents
The Institute Public Sector Transformation at Bern University of Applied Sciences built a proof-of-concept chatbot for the City of Bern's resident services. It uses retrieval-augmented generation over a knowledge base of 296 documents with Streamlit, Haystack, Snowflake Arctic Embed 2.0, a reranker and Llama-3.3-70B-Instruct. It shows sources, supports follow-up questions, and all data can be processed on the city's own servers. Evaluated qualitatively by a lawyer and with automated metrics.
Overview
The Institute Public Sector Transformation at Bern University of Applied Sciences built a proof-of-concept chatbot for the City of Bern's resident services. It uses retrieval-augmented generation over a knowledge base of 296 documents with Streamlit, Haystack, Snowflake Arctic Embed 2.0, a reranker and Llama-3.3-70B-Instruct. It shows sources, supports follow-up questions, and all data can be processed on the city's own servers. Evaluated qualitatively by a lawyer and with automated metrics.
This entry has 12 published fields tied to exact passages in an immutable source capture.
Inspect the highlighted sourceThe challenge
The City of Bern needed a solution to help staff answer questions on complex legal documents, for example in the foreigners and migration area. Existing proprietary AI solutions are restricted by data protection concerns because sensitive documents may not be processed on external servers.
The solution
The Institute Public Sector Transformation at Bern University of Applied Sciences developed a retrieval-augmented generation service over a knowledge base of 296 documents (3,932 pages), using Streamlit as frontend and Haystack as AI backend. Three models are used: the Snowflake Arctic Embed 2.0 embedding model, the BAAI/bge-reranker-v2-m3 reranker and the Llama-3.3-70B-Instruct language model. Queries are processed lexically (BM25) and semantically, the chatbot supports follow-up questions and shows its sources.
Reported business value
This was a proof of concept, not a productive deployment. In a qualitative evaluation by a lawyer, answers were mostly correct and sources precise. In automated evaluation the setup reached a recall of 0.73 and nDCG of 0.46, and Llama-3.3-70B-Instruct scored 0.92 for answer relevancy and 0.92 for faithfulness. The project states that the open-source approach allows all data to be processed on the city's own servers, with low, predictable operating costs.
Sources
Open any source and check the claim yourself — that is the point of the register.
This record was researched and written with AI assistance, and its claims were checked against the sources above. (EU AI Act art. 50 transparency notice.)
Other government & public sector entries in the register.
GovTech unlocks data insights to improve nationwide services with Databricks
Singapore's Government Technology Agency (GovTech) migrated from an on-premises dashboarding system to the Databricks Data + AI Platform on AWS with Unity Catalog and Delta Lake, cutting dashboard creation time from 90 to 30 days, democratizing data across 50% of corporate divisions in the first year, and saving 8,000 labor hours annually.
Estonia rolls out Bürokratt, an AI-guided virtual assistant network for public services
Bürokratt is a network of chatbots deployed on Estonian public sector institutions' websites, letting people obtain information from institutions and use public and information services via virtual assistants. It is a state-created, AI-based digital assistant that helps institutions deliver modern, efficient, around-the-clock customer service using large language models.
City of Helsinki pilots watsonx.ai for multilingual customer care chatbot translation
The City of Helsinki collaborated with IBM Client Engineering and IBM Consulting on a Proof of Value testing whether IBM watsonx.ai could translate foreign-language questions into Finnish for its customer care chatbot, which supports Finnish, English, and Swedish. Watsonx.ai scored 0.90 on the COMET machine-translation metric for English-to-Finnish translation (versus 0.91 for the incumbent system) and 0.87 for Swedish-to-Finnish (versus 0.86), performing on par with the city's existing translation solution.
Madrid builds VisitMadridGPT on Azure OpenAI to answer tourists in 95+ languages
The City of Madrid, with partner iUrban, built the VisitMadridGPT virtual assistant on Microsoft Azure OpenAI Service to give tourists accurate, real-time, personalized information in more than 95 languages, drawing from the city's official tourism content. Users average 2.8 questions and spend about 4 minutes 18 seconds per session with a low bounce rate, and the city analyzes assistant conversations to identify popular topics and refine its digital marketing strategy.
Was this helpful?
Your feedback helps us improve our use case database
