Digital Transformation with AI: A real-world guide from the Cornellà administration

Introduction: The myth vs. the reality of AI in government
In today's technological ecosystem, it seems that any project that doesn't mention Artificial Intelligence (AI) is born obsolete. However, for public administrations, the challenge isn't adopting technology simply because it's trendy, but rather solving chronic problems: staff shortages, disorganized data, and bureaucratic processes that slow down citizen services.
Oscar Toledano (Cornellà de Llobregat City CouncilThey propose a pragmatic approach. Far from science fiction narratives, their experience demonstrates that AI in the public sector is not meant to replace functions, but rather to enhance human capabilities where they are most needed, transforming decades of unfinished business into agile processes. Technology should not be an end in itself, but rather orchestrated according to organizational culture to close historical efficiency gaps.
Point 1: AI as a human tool, not as a substitute
The philosophy applied at Cornellà City Council moves away from the fear of job displacement. The implementation of AI agents has focused on detecting bottlenecks and automating repetitive tasks that consume civil servants' time, allowing them to focus on higher value-added work.
The success of these projects lies in understanding that technology supports internal talent. By using AI agents to solve specific problems, the administration becomes more resilient and capable of responding to the demands of a dense and active city, without dehumanizing public service.
«"AI has to be a tool to help us people do our jobs better." — Jordi Ribalta.
Point 2: The surprising discovery of the "50% No-AI"«
One of the most revealing use cases was the classification of the city council's 40,000 annual incoming records. Initially, it was thought that this volume of documents would require a massive deployment of artificial intelligence. However, the training process revealed a counterintuitive fact: half the work could be handled without AI through some preliminary "house sorting.".
By analyzing the patterns, the team discovered that if a document contained phrases like "PIA Request" (related to dependency) or "ATKP Certificate" (related to IT), a complex language model wasn't needed; a simple logical rule sufficed. This hybrid approach allowed them to:
  • Optimize the process: Identify key terms to instantly direct documents to the correct department.
  • Improve the Electronic Headquarters: Adjust the input forms to capture clean data from the source.
  • Increase accuracy: Achieve a success rate of 80%, with the technical objective of reaching 90% in the short term, matching or exceeding the average human interpretation.
Point 3: From months of development to a single day of work
Agility is the most disruptive benefit of this transformation. An exemplary case was the calculation of waste collection fee rebates. Faced with a sudden regulatory change that forced fluctuations between annual and bimonthly billing, the city council needed to cross-reference complex data: how many times a specific container was opened, the use of recycling centers, and payments on water bills.
Traditionally, this would have involved months of database development and high consulting costs. With AI agents and RPA, the system was set up in a single day. This capability represents a paradigm shift in cost efficiency: it allows public administrations to experiment and fail (or succeed) quickly and at low cost, eliminating the financial risk of legacy technology projects that typically last for years and cost millions before delivering the first result.
Point 4: Privacy and technological sovereignty (GPT vs. Local Models)
Public administration handles sensitive data, which requires a robust technical strategy that does not compromise privacy. The architecture implemented in Cornellà uses N8N as orchestrator, allowing total data sovereignty through the use of local models and specialized libraries.
  • GPT: It is used for general tasks that require speed and do not compromise personal data.
  • Call 3: Deployed locally to process sensitive information that must not leave municipal servers.
  • Microsoft Presidio: Used for automatic data anonymization.
  • Qdrant: Employee for the data vectorization, allowing for efficient semantic searches.
  • Apache Tika: Crucial for the content extraction both in complex PDFs and in the analysis of image metadata.
The entire ecosystem generates logs detailed, ensuring that every AI decision is traceable and auditable, complying with government transparency standards.
Point 5: Artificial vision to validate bureaucracy
Managing the 750 annual grants to citizen organizations is usually an administrative ordeal. Now, an agent of Machine Vision It analyzes invoices, decrees, and even photographs of activities (such as t-shirts with the municipal logo) to validate compliance with the aid.
Currently, the system operates under an 80/20 rule: AI successfully resolves 80% of cases, while the remaining 20% require human oversight due to ambiguities. For example, if the AI detects an invoice for "FIFA 2026" in a sports grant application, the system could mark it as valid based on context, but a human must verify whether it is an actual eligible expense.
The most innovative thing is the shift towards a Collaborative ManagementThe plan is to open this agent to citizens so they can validate their documents. before to submit them. The AI will tell them: "You are missing this invoice" or "The logo is incorrect," allowing the citizen to proactively correct errors and the administration to receive perfect files from the first attempt.
Conclusion: Towards data-driven management
The ultimate challenge for Cornellà de Llobregat is to overcome the dispersion of information. The goal is to move from a system where searching for files depends on the memory of civil servants to one where... Integrated municipal CRM.
What once seemed like a 20-year task to organize the data is now seen as an achievable goal in just a couple of years. AI isn't a magic wand, but rather the engine that allows us to close historical efficiency gaps and transform bureaucracy into an agile, data-driven service.
Are our governments ready to stop seeing AI as a threat and start using it as the tool that will finally put their data in order?
Here's the link to the presentation:
                Watch video
table of Contents
Newsletter
Stay informed about news, projects, and trends in technology and digital services.