Case #2061 · Government & Public · Industry-specific

Stadt Bern proof of concept: open-source RAG chatbot on Llama-3.3-70B answers staff questions on legal…

The most noteworthy point is that the City of Bern runs legal document Q&A on local servers using a fully open-source stack, turning data protection constraints directly into an architectural choice.

Evidence score
92
Third-party verified · High
AI capability
Retrieval-Augmented Generation
Capability as labeled by source
Industry scope
Government & Public
Industry-specific
Maturity
Case-verified
Verified case
01 — Background

What was the challenge

Challenge as recorded by the sourceThe 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.
02 — How it works

What they actually did

1

Knowledge base of 296 documents and 3932 pages; Streamlit frontend, Haystack backend, with retrieval running both BM25 and semantic paths

2

Three-model combination: Snowflake Arctic Embed 2.0 for embeddings, BAAI/bge-reranker-v2-m3 for reranking, Llama-3.3-70B-Instruct for generation

3

Automated evaluation: recall 0.73, nDCG 0.46, answer relevance 0.92, faithfulness 0.92; lawyers' qualitative assessment found answers largely correct with precise sources

Practice as recorded by the sourceThe 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.
TAKEAWAY
What you can reuse
Data-sensitive small and medium organizations can directly adopt the combination of open-source models + local deployment + source citation, starting with a small-scale document base for proof of concept before discussing production.
03 — Risks & pitfalls

Know this before you try

Analyst judgment · risks and limitsExplicitly a proof of concept rather than production deployment; recall of 0.73 means roughly a quarter of relevant content is still not retrieved; evaluation sample size is not disclosed.
Evidence & sourcing reminderThis entry is third-party verified (evidence grade High, evidence score 92). All figures are quoted from third-party verification sources; trace them back to primary sources before citing externally. Rollout time and gains vary by company.
04 — Results & evidence

What the results were

Organization: Stadt Bern / Berner Fachhochschule (IPST) · Third-party verified

Reported resultsThis 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.

Figures are third-party verified, not measured by this site.

Source: https://www.bfh.ch/hafl/de/forschung/forschungsprojekte/2024-487-206-324/