How a $28 Million Blunder Led to Estonia’s AI ‘Error Detector’

How a $28 Million Blunder Led to Estonia's AI 'Error Detector'

Estonia’s AI misstep originated from a single incorrect phrase.

In December, the Riigikogu, Estonia’s parliament, made amendments to the Gambling Tax Act intended to reduce the tax rate on remote gambling. However, the law’s phrasing referred solely to “skill games” for that year, omitting games of chance or remote gambling entirely. Estonia’s gambling sector is valued at roughly €300 million ($343 million), with its online gambling market rapidly expanding within the EU.

This one mistake resulted in online casinos unintentionally being excluded from the tax framework for a full year, costing the government €24 million ($27.4 million) annually in gambling revenue.

The oversight was identified by a legal advisor for a gambling company. The situation worsened when Luukas Ilves, former undersecretary for digital transformation, processed the legislation through Claude and Gemini. Both AI systems, according to Ilves, quickly pinpointed the inconsistency.

Within hours, Ilves developed a prototype tool—named Apsakaleidja, or “Mistake Detector”—that could extract draft bills from the Riigikogu website and highlight issues such as broken references, contradictory phrasing, calculation errors, and impossible dates. It classifies these issues as high, medium, or low risk—out of the current 112 bills, 102 are deemed high risk. One highlighted example from the Mistake Detector indicates conflicting wording in draft text. Ilves even showcased it on national television, much to the host’s astonishment.

Though the blunder was embarrassing, it also led to a significant realization within the government. “This situation illustrated how AI can serve as an incredibly valuable aide,” Kristen Michal, Estonia’s prime minister, told WIRED. “And through a vibe-coded platform for reviewing draft legislation in response to this incident, we witnessed an illustration of how agentic tools can empower civil society and individual citizens.”

Consequently, Estonia intensified its commitment to AI use in governance. In January, Michal proposed utilizing tools like Apsakaleidja to draft legislation aimed at proactively identifying and correcting loopholes. She initiated the Eesti.ai program to train Estonians in AI applications, aiming to double the country’s productivity by 2035. Among the advisers for the Eesti.ai initiative are Bolt founder Markus Villig and Ilves, the creator of the Mistake Detector.

Later, in April, the parliament received a bill from the government granting state and local authorities the authority to utilize digital solutions, including AI, for automating administrative tasks. This bill is currently being discussed in parliament, which is evaluating the potential changes. In June, Michal informed an Eesti.ai meeting that, if all goes according to plan, “Estonia will emerge as the first nation globally to establish official digital identities for AI agents.”

“This marks a new landscape for the public sector,” Michal shared with WIRED. “It requires adaptability and the capacity to evolve as technology progresses.” Estonia is better prepared than many countries for such changes: it has pioneered digital identity integration through a digital-first government, with 99 percent of public services already available online, according to Michal. Estonia is often showcased as a model for running a contemporary digital state—an example first highlighted by WIRED a decade ago. This foundation has facilitated smoother AI integration. “These investments enable us to accelerate our transition into the AI era with confidence,” he adds.

Catherine Flick, a technology ethics researcher at the University of Staffordshire, mentions that the gambling tax oversight raises a fundamental question: “Why aren’t humans undertaking this review process during the legislative drafting?” she asks. “At some point, someone needs to carefully read through the entire document, grasping the context and nuances, to ensure it constitutes a sound law.”

https://in.linkedin.com/in/rajat-media

Helping D2C Brands Scale with AI-Powered Marketing & Automation 🚀 | $15M+ in Client Revenue | Meta Ads Expert | D2C Performance Marketing Consultant