DEV Community

Cover image for Stop Asking Your Model What the Law Says. Ask the Law.
AheadKit
AheadKit

Posted on

Stop Asking Your Model What the Law Says. Ask the Law.

I typed "right to be forgotten" into a search box and got back the European Court of Human Rights, not a summary of it. The top hit was Hurbain v. Belgium, decided 4 July 2023, paragraph 187, the court's own words about how the concept has been interpreted in a variety of ways. The second hit was the GDPR itself, Regulation 2016/679, Article 17. No model in between, no paraphrase, no confident restatement of a law the model read once in training. The words came from the court and the regulation, with the dates and the document numbers attached.

That search box is Pandex, a service that puts European legislation and highest-court decisions behind one API and one MCP server. The corpus it claims is 2.8 million official documents from 41 institutions, 112 million searchable passages, 37 million linked citations. I asked it three questions a developer building a legal tool would actually ask, timed each one, and then checked the 2.8 million against its own register. Two of the three answers were good. The third was honest in a different way.

The first question took 2.76 seconds and returned three passages. The Hurbain judgment, the GDPR article, and an earlier Hurbain decision from 2021. The second question, "GDPR Article 17 right to erasure", took 2.20 seconds and returned an Advocate General's opinion from March 2023, the Court's judgment from December 2023, and the regulation again. Both answers read like a competent research assistant's first pass: the right documents, in the right order, with the citation attached to each one. The third question was in German, about whether an employee non-compete clause is enforceable, limited to German jurisdiction. It took 1.85 seconds and returned four passages. The top one was the Handelsgesetzbuch, the German Commercial Code, dated 10 May 1897. An 1897 code is not a wrong answer to a question about non-competes, the rule does live there, but it is a strange first answer in 2026, and it shows what the search is doing: matching words, not judging which version of the law a person asking today most needs. The other three hits were Federal Court of Justice decisions from 2010, 2013 and 2017, which are the right shape of answer, just not the first one shown.

Then the count. The register lists 41 institutions and, per source, how many documents it holds. Added up naively the total is over five million, because the same source is listed under several institutions. Counted once per distinct source, the total is 2,805,894. The claimed 2.8 million reproduces from the service's own numbers, which is more than most launch claims survive. The gaps are published next to the totals, which is the part I liked most: the French Cour de cassation is marked partial, the Swiss federal court decisions are marked incomplete, and two sources are flagged as blocked by bot checks. A corpus that prints its holes is easier to trust than one that hides them.

Two things I could not test, and I would rather say so than smooth over them. The MCP server itself never answered from here. The search itself did, so every number above comes from searching directly, which the docs say runs the same six operations as the MCP tools. And I never opened a full document, only the passages the search returned, because the full-text route stayed closed to me. The search works. The MCP layer, from here, is a claim I could not verify, not a result.

That leaves the practical question. A model asked what the law says will answer from memory, fluently, and sometimes wrong in ways that look right. A search over the official texts answers with the passage, the court, and the date, and sometimes puts an 1897 code first. The first failure is invisible. The second one is visible, which is why it is the better failure. Stop asking your model what the law says. Ask the law, and check the date on whatever comes back.


P.S. Everything I write stays free — that part doesn't change. But if this one was worth something to you, you can buy me a coffee ☕ (one-time or monthly, both work). It covers the API credits and hosting behind these experiments — and honestly, it's also the nudge that gets the next one started on the evenings I'd otherwise skip it. — Salam

Buy me a coffee

AheadKit on Gumroad — Beginner-Friendly Books & Packs

Top comments (0)