EU Law Questions in Lithuanian, Answered Offline
Can an offline system find the right article of the AI Act, NIS2 or GDPR for a question asked in Lithuanian? It did for 98% of test questions, in its top 5 results. Answers first cited the right article 71% of the time; with the citation format fixed in a rerun, 91%. Both bars set before the test are now passed.
- Our compliance team asks questions about the AI Act, NIS2 and GDPR in Lithuanian. Can a system on our own hardware find the article that answers them, and can its answers be trusted to cite the right one?
- On 515 machine-written test questions, search with a reranker found the right article in its top 5 for 97.6% of Lithuanian questions (95% interval 94.8–98.9%) and 90.7% of English. Bar passed. Given those results, the model's answers first cited the right article for 71% of Lithuanian questions and 86% of English, missing the 80% bar: most Lithuanian misses named the law in Lithuanian instead of the code asked for. In a rerun with the citation format stated in the sources' own labels, 91% of Lithuanian answers cited the right article (English 87%), and only 1 of 956 citations pointed outside the text given. From memory alone, without the text, the model cited the right article 12% of the time.
- Offline search over EU law works in Lithuanian and is the part to rely on: it puts the right article in front of a person. Generated answers cite well when the prompt states the citation format plainly, and every citation can be checked automatically against the text the model was given. A language model's memory of article numbers is not usable at all. The questions here were machine-written and closer to the law's wording than real ones, so expect lower numbers in use.
A compliance officer at a Lithuanian company has a question about the EU’s AI Act, the NIS2 cyber-security directive or the GDPR, and asks it in Lithuanian. The laws exist in every EU language, but they are long: the three together have 258 articles. The question here: can a system that runs on the company’s own hardware find the article that answers the question, and does a language model answering from what it found cite that article correctly?
This is a test of finding and citing the right text. It is not legal advice, and the answers were not checked for legal correctness.
The test
- Texts: the AI Act (Regulation 2024/1689), NIS2 (Directive 2022/2555) and GDPR (Regulation 2016/679), in English and Lithuanian, from EUR-Lex. Articles split into their numbered paragraphs, about 1,300 per language. Recitals and annexes were left out.
- Questions with known answers: a language model (Qwen3-14B) wrote two practical questions per article per language from the article’s text, with one fixed prompt: describe a situation, do not name the article, do not copy its wording. Questions that named an article (19) or copied five words in a row from it (209) were dropped. That left 802 questions, each with the article it was written from. Each question records how many of its words appear in that article.
- Split: articles divided 30% / 70% by a hash. Settings were checked on the 30%; results are on the other 70%: 515 questions, 247 Lithuanian and 268 English.
- Search: keyword search (BM25, with a Lithuanian or English stemmer); embeddings (bge-m3, which handles both languages); the two combined; the combination reranked by a second model (bge-reranker-v2-m3). Each searched the paragraphs in the question’s language. A cross-language run searched the other language’s text.
- Answers: Qwen3-14B, on the same GPU, answered each question in its language, given the top 5 paragraphs. It also answered with no text at all, from its own memory. Each answer had to list the articles it relied on, by law code and article number.
- Hardware: one RTX 4070 (12 GB), everything offline.
- Pre-set pass: the right article in the top 5 for at least 90% of Lithuanian questions (Lithuanian text); answers cite the right article for at least 80%.
Results
- of Lithuanian questions: right article in the top 5 results
- 98%
- of Lithuanian answers cite the right article, with the citation format fixed
- 91%
- from the model's memory alone
- 12%
- searching the English text with Lithuanian questions
- 95%
| LT top 1 | LT top 5 | EN top 1 | EN top 5 | |
|---|---|---|---|---|
| Keyword search (BM25) | 66.4% | 92.3% | 53.4% | 77.6% |
| Embeddings (bge-m3) | 74.1% | 92.7% | 65.3% | 86.6% |
| Keyword + embeddings | 75.3% | 95.1% | 65.3% | 86.6% |
| Keyword + embeddings, reranked | 83.8% | 97.6% | 75.7% | 90.7% |
| Embeddings, other language's text | 68.4% | 88.7% | 53.4% | 82.5% |
| Reranked, other language's text | 78.1% | 95.1% | 67.2% | 88.8% |
Search passed. Keyword search with embeddings and the reranker found the right article in its top 5 for 97.6% of Lithuanian questions, and put it first for 84%. The reranker added the most: 2.5 to 10 points over the plain combination. Searching the English text with Lithuanian questions still found the right article 95% of the time, so a system indexed in one language serves both.
English scored lower than Lithuanian, which is not what one would expect. The reason is in the questions. The model wrote its Lithuanian questions closer to the law’s own words: on average 72% of a Lithuanian question’s words appear in its article, against 56% for English. At the same overlap, the two languages score about the same.
Low (under 57%)
- Lithuanian87.5%
- English85.8%
Middle (57–73%)
- Lithuanian100.0%
- English93.5%
High (73% and over)
- Lithuanian99.2%
- English97.9%
Questions that share fewer words with the article are the realistic ones, since a person who has not read the law does not use its terms. In the third with the least overlap, the right article was in the top 5 for 87.5% of Lithuanian questions and 85.8% of English: under the 90% bar. That is the figure to expect in practice, or lower.
| Lithuanian | English | Questions | |
|---|---|---|---|
| AI Act | 98.0% | 88.7% | 208 |
| NIS2 | 98.0% | 90.6% | 102 |
| GDPR | 96.9% | 92.7% | 205 |
Answers: the citations
| LT: cites the right article | EN: cites the right article | LT: cited articles right | EN: cited articles right | |
|---|---|---|---|---|
| With the top 5, citation format fixed (28 Oct) | 91.1% | 86.9% | 51.6% | 51.7% |
| With the top 5 paragraphs | 71.3% | 86.2% | 51.4% | 50.5% |
| Same, law names read leniently (diagnostic) | 89.9% | 86.2% | 50.0% | 50.5% |
| From memory (no text given) | 12.1% | 23.9% | 5.6% | 11.3% |
The answer bar was missed in the first run and passed in the second. In the first run, given the search results, the model’s answers listed the right article for 71% of Lithuanian questions and 86% of English, against a bar of 80%.
In Lithuanian, the main cause was format, not understanding. 56 Lithuanian answers listed no usable article. We reran those prompts with the raw output kept, and got the same answers word for word. The model had named the law as the sources were labelled, “DI aktas” for the AI Act or “BDAR” for the GDPR, or invented a code such as “di_act”, instead of the code the prompt asked for. Sometimes it copied the placeholder “ai_act|nis2|gdpr” from the instructions. The prompt labelled the sources in Lithuanian and asked for English codes: that mismatch was ours. Read leniently, Lithuanian answers cite the right article 90% of the time. That figure is a diagnosis after the test, not a pass.
The rerun, 28 October. The fix was set before rerunning: each source is labelled with the same code the answer must use (“[gdpr 6]”), the codes are named once in the question’s language, and the JSON example uses a real code instead of the placeholder. Same 515 questions, same search results, scored strictly as before. Lithuanian answers then cited the right article for 91.1% of questions (225 of 247), English for 86.9%, and no answer came back without a usable citation. The bar is passed. We also checked each cited article against the five paragraphs the model was given: only 1 of 956 citations pointed outside them, so a check that rejects such citations costs almost nothing and catches the rare invented one.
About half of all cited articles were not the one the question was written from. Some of those are real second sources: many questions touch several articles, and only one counts here. The example below is one: a broad question written from the AI Act’s first article, which the answer from memory placed in later articles.
- Kokie yra pagrindiniai reikalavimai, kuriuos turi laikytis įmonės, siekiant pateikti dirbtinio intelekto sistemas rinkai?
- DI aktas, 1 straipsnis: Dalykas
- Pagrindiniai reikalavimai, kuriuos turi laikytis įmonės, siekiant pateikti dirbtinio intelekto sistemas rinkai, apima tinkamą rizikos vertinimą, dokumentavimą, naudotojų informavimą ir atitiktį etiniams reikalavimams. Šie reikalavimai yra nustatyti AI Act, kuris siekia užtikrinti saugų ir etiškai atsakingą dirbtinio intelekto naudojimą. [Articles cited: AI Act Article 6, AI Act Article 10, AI Act Article 13]
- Pagrindiniai reikalavimai, kuriuos turi laikytis įmonės, siekiant pateikti dirbtinio intelekto sistemas rinkai, apima aukšto lygio sveikatos, saugos ir pagrindinių teisių apsaugą, įskaitant demokratiją, teisinę valstybę ir aplinkos apsaugą nuo žalingo DI sistemų poveikio. Taip pat reikalavimai apima atitiktį III skyriaus 2 skirsnyje nustatytiems reikalavimams, kurie yra svarbūs vertinant DI sistemų atitiktį ir jų saugumą. [Articles cited: AI Act Article 1, AI Act Article 74, AI Act Article 102, AI Act Article 105]
From memory, without the text, the model is no use for citations. It cited the right article for 12% of Lithuanian questions and 24% of English, and nine in ten of the articles it named were not the source.
- Kada pradėsio taikytis reglamentas, kuris yra susijęs su AI technologijų naudojimu verslo aplinkoje?
- DI aktas, 113 straipsnis: Įsigaliojimas ir taikymas
- AI Act Article 102, AI Act Article 105, AI Act Article 111, AI Act Article 57, AI Act Article 6
- Reglamentas, susijęs su AI technologijų naudojimu verslo aplinkoje, pradės taikytis ne vėliau kaip 2026 m. rugpjūčio 2 d., kai pradės veikti apribotos bandomosios AI reglamentavimo aplinkos. [Articles cited: AI Act Article 57]
What this means in practice
- Search over EU law in Lithuanian works offline, on one office GPU, with open models. Use a reranker. Show the person the articles found, not just a generated answer.
- Check every citation in a generated answer against the text it came from. That check can be automatic: the system knows which paragraphs it gave the model.
- Never rely on a model’s memory of article numbers. Even a capable 14-billion-parameter model gets them wrong almost every time.
- Label the sources with the exact codes the answer must use. That one change took Lithuanian citations from 71% to 91% right.
- Expect real questions to score lower. People ask vaguely, mix laws and use their own terms; the least machine-like third of these questions already fell under 90%.
Method and environment
- texts
AI Act (Regulation 2024/1689), NIS2 (Directive 2022/2555) and GDPR (Regulation 2016/679), English and Lithuanian, from the CELLAR XHTML on EUR-Lex; articles split into numbered paragraphs; recitals and annexes left out- questions
Qwen3-14B (Q4_K_M, llama.cpp, temperature 0) wrote two practical questions per article per language from the article text, with one fixed prompt; 209 dropped for copying five consecutive words of the article, 19 for naming an article, 1 unreadable; 802 kept- split
articles split 30% dev / 70% test by hash of law and article number; settings checked on dev, results on test- search
BM25 (bm25s, Snowball stemmer, Lucene variant, k1 1.5, b 0.75); bge-m3 dense embeddings, fp16; hybrid by reciprocal-rank fusion (k 60); hybrid reranked with bge-reranker-v2-m3 on the top 30 paragraphs- answers
Qwen3-14B with the top 5 reranked paragraphs, or with no text; JSON answer plus a list of cited articles; scored on whether the list includes the source article- pilot
question writing piloted on articles 1–3 of each law (31 questions, read in full) before the full run- environment
gpu: RTX 4070 12 GB · llm: Qwen3-14B Q4_K_M, llama.cpp, 8k context- measured
- 2026-10-26
Limits
The questions were written by a language model from the article it was answering, so they are cleaner and closer to the law’s wording than real questions, even after dropping those that copied it. Real questions often span several articles; here only one counts as right. The answers’ content was not graded, only their citations. Recitals, annexes, national implementing laws and guidance were left out. The question prompt was piloted on articles 1–3 of each law and those 31 questions were read in full before the full run. The empty citation lists were rerun once to see the raw output. The answers were then rerun once with the fixed citation format, a change set before the rerun and checked on 20 test questions for the pipeline only. Legal texts: EUR-Lex, © European Union; only the texts published in the Official Journal are authentic. The code is in labs/eu-law-qa in this site’s repository.
New Lab results by email
A short email when a new measurement is published, a few times a year. No newsletter fluff, reply to unsubscribe.