Adopted

A legal assistant that cites Spanish law

So our agents get the right answer when a legal question comes up mid-task. It answers from official Spanish sources only and cites the article or ruling behind every claim. A professional still reviews everything legal.

Status
Adopted
Stage
Works for us
Date
Aug 2026
Where
Our own platform; clients next
Our resultsMeasured on our own work
8,755
Consolidated state laws (BOE)
17 / 17
Autonomous communities covered
41,237
Binding tax rulings, 2015–2026
100%
Right citation in the top 5

On a test set of 116 legal questions.

01Why we tried it

Our agents work on their own: they book expenses, apply VAT, prepare tax figures. Legal questions come up mid-task, and nobody is there to answer them. An agent that guesses the law makes mistakes that look correct.

The questions are concrete and frequent: whether an expense is deductible, which VAT applies, what changed this year. General AI models answer them fluently, and sometimes invent the article.

So the answers had to be ones we could check: each claim tied to the law in force on the date that matters, or to an official tax ruling, with the source one click away.

02How it works

Step by step.

  1. 01

    Official sources only. The corpus holds the state’s consolidated legislation from the BOE (8,755 laws), the consolidated laws of all 17 autonomous communities and the binding rulings of Spain’s Directorate General of Taxes (Dirección General de Tributos, part of the Ministry of Finance) from 2015 to 2026. A weekly job keeps the laws current.

  2. 02

    Search, not training. The texts are split by article and searched both by keywords and by meaning. The model answers from what the search finds, not from memory.

  3. 03

    Citations are mandatory. Every legal claim carries its reference: the article and the law, or the ruling number and date. Ruling dates are always shown.

  4. 04

    The law as of a date. A question about a past tax year searches the version in force at the time.

  5. 05

    Honest gaps. When the sources don’t cover a question, it says so instead of answering. Asked about an article that doesn’t exist, it refuses rather than invent the text.

  6. 06

    Your data plus the law. On our platform, a question like “can I deduct this?” first reads the actual expense and supplier, then grounds the answer in both.

Built with Spanish law from the BOE · Binding tax rulings (Dirección General de Tributos) · Search by words and by meaning · Citations on every answer · Connects to AI tools (MCP)

03What happened

The hard part was not the model. It was the corpus: every consolidated law and every ruling in, kept current, and split so an article stays whole.

Citations changed how we use answers. One with an article number can be checked in seconds; one without has to be researched again.

Search had to read like a lawyer: amending laws ranked below the law they change, and the version in force on the right date.

04The verdict

What we decided.

Adopted for our own work. Our agents and our team use it on the tax and legal questions in our finance, and a professional reviews everything legal. It is also the template for the agents we will offer clients.

For your project

Answers grounded in official sources, with the citation attached, work for law and for any body of rules a business follows. For you, that can mean:

  • Your team asks tax and legal questions from the AI tools they already use and gets the article behind each answer.
  • Inside your systems: an expense or a contract checked against the law, using your own records.
  • Customer-facing help that answers regulatory questions with sources and says when a professional is needed.
  • The same pattern for sector regulations, standards or your internal policies.
Limits and guardrails
  • Everything legal is reviewed by a professional. The tool makes the work more precise; it doesn’t replace that review.
  • Spanish law for now. EU VAT law is next.
  • Quotes come from consolidated texts, which are not the official gazette, and say so.
Next

Open access for clients through MCP, then add EU VAT law: the VAT Directive and key rulings of the EU Court of Justice.

05Questions
Can AI answer Spanish tax questions reliably?

Only when it answers from official sources and cites them. Ours searches BOE consolidated law and the binding rulings of the Dirección General de Tributos, cites the article or ruling behind every claim and says when the sources don’t cover the question.

Is it trained on Spanish law?

No. It searches the official texts at question time and answers from what it finds. That keeps answers current and every claim traceable to its source.

Can I use it from ChatGPT or Claude?

Soon. It runs as an MCP server, the standard way to connect tools to AI assistants. Client access is the next step.

Does it replace a lawyer or tax adviser?

No. Everything legal is reviewed by a professional. The tool helps our agents and our team do better, more precise work before that review, and shows its sources.

Want this in your systems? Ask us.

Tell us about your project →