Skip to content
Back to work

EU Regulation Q&A

Ask a question about EU insurance, finance or data rules and get an answer that cites the exact article and paragraph.

JavaSpring BootSpring AIPostgreSQL Source on GitHub
Type
Studio product
Role
Design, development and evaluation
Year
2026
Platform
Web app
Right article in the top 5
98.3%
Faithfulness to sources
0.996
Out of scope questions declined
8 of 8
EU Regulation Q&A screenshot 1

Overview

A question answering system over five EU acts from EUR-Lex: the Insurance Distribution Directive, Solvency II, the GDPR, DORA and the AI Act, in English and German. Every statement in an answer links to the article and paragraph it comes from, and the system declines when the texts do not cover the question.

Challenge

Legal text is long, cross referenced and written in more than one language. A general chatbot answers confidently even when it is wrong, and gives no way to check where an answer came from.

Approach

We split each act into article and paragraph passages, searched them two ways at once (meaning and exact words), reranked the best matches with a second model, and let Claude answer only from those passages, citing each one. Embeddings and reranking run locally with open models.

Outcome

On a set of 68 test questions in both languages, the right article was in the top five results for 98.3% of answerable questions, answers scored 0.996 for faithfulness to their sources, and all 8 questions outside the texts were declined. The code is open source under the MIT licence.

Key features

  • Answers you can check

    Every statement links to the act, article and paragraph it relies on, with the source passage one click away.

  • Says when it does not know

    If the retrieved texts do not cover the question, the answer says so instead of guessing.

  • English and German

    Ask in either language and get sources in the same language, or pick the language of the sources yourself.

  • Two ways to search, then a second look

    Meaning based search and exact word search run together, and a reranking model puts the best passages first.

  • Measured, not assumed

    A test set of 68 questions compares three retrieval modes on hit rate, ranking, faithfulness and declines.

  • Runs on one machine

    Docker Compose starts the database and the app. Embeddings and reranking use local open models.

Want something like this?

Tell us what you run. One line is enough, and we answer within 24 hours.

WhatsApp Gabriel