Filings that used to be done by hand, now done in minutes and without incorrect submissions.
The challenge
Spanish legal-sector clients filled in official fee forms (Modelo 790) by hand from each case file. It was slow and repetitive, and any wrong field meant a rejected filing.
How I solved it
A language model extracts the data from each document against a strict schema.
Every field is validated deterministically: tax ID check letter, fee codes and offices against the official lists.
A person reviews and approves before anything is filed.
The moment that defines the system
During testing, the model returned a perfectly formatted tax-office code that didn't exist. No person would have spotted it at a glance; validation against the official list caught it. That's why the system's principle is that model fluency is never evidence.
Result
75-90% less manual time per filing and zero incorrect submissions since launch.
Case studies
Production RAG over US tax regulationRAG system over 50+ IRS documents for a US tax-compliance client: 9 retrieval configurations benchmarked, Recall@5 of 0.98 and on-premise deployment.
An AI agent with boundaries enforced in codeLangGraph agent with SQL, document and maths tools, read-only access enforced by a parser, Langfuse tracing and 138 automated tests including adversarial ones.