An AI data assistant for the Community of Madrid's 2,700 infrastructure projects

The Community of Madrid manages more than 2,700 active public-infrastructure projects. Working alongside Conurma, Tailor built a secure AI interface that gives institutional decision-makers live answers from that data in seconds.

An AI data assistant for the Community of Madrid's 2,700 infrastructure projects

Client

The Community of Madrid is Spain's largest regional public administration. Its infrastructure portfolio spans more than 2,700 active projects, each generating information about budgets, contractors, timelines, execution status, incidents and contract modifications.

Conurma was the engineering consultancy responsible for the technology engagement with the regional government. When the project required specialist AI engineering capabilities, Conurma brought Tailor into the team to design and build the solution.

Challenge

The Community of Madrid already had complete and current information about its infrastructure projects. Accessing it still required writing SQL.

Managers, directors and institutional decision-makers depended on technical specialists to prepare each query, format the result and send it back. A straightforward question could take hours to answer, and the resulting snapshot might already be outdated when it reached the person making the decision.

Conurma saw an opportunity to make that information directly accessible through natural language. Delivering it required an AI architecture capable of operating within the security, privacy and accountability constraints of a public administration.

Procurement records and project files had to remain within the European data perimeter. Every interaction needed to be auditable. The system could never modify the source database, and it had to acknowledge uncertainty when it could not produce a reliable answer. An incorrect figure could feed directly into a decision about public spending.

What we built

Tailor developed a conversational interface that translates a question in Spanish into SQL, validates the query, runs it against the live database and explains the result in natural language.

The architecture applies several layers of control:

  • European data processing. The model runs through Azure OpenAI in an EU region, keeping public-procurement data within the required perimeter.

  • Validation before execution. LangGraph orchestrates the workflow, but the model never executes SQL directly. Every generated query passes through a validation layer first.

  • Read-only access. The validator blocks any operation other than SELECT, while the database connection independently prevents writes.

  • Controlled failure. A failed query can be retried with the database error as context. When the system still cannot produce a reliable result, it communicates that uncertainty.

  • Auditable interactions. Logs record who asked the question, when it was asked, the SQL generated and the number of rows returned, without duplicating the sensitive data itself.

  • Automatic visual context. When a result is easier to understand as a table or chart, the system generates the appropriate visualisation.

Impact

Managers and directors can now consult live project information directly, using the language they already use in their work. Questions that previously required a technical specialist and could take hours to process can be answered in seconds.

The technical team no longer acts as an intermediary for every routine request, leaving more time for work that genuinely requires its expertise. Decision-makers gain a more current view of budgets, contracts and execution status while the organisation retains control over permissions, traceability and data residency.

The system has operated in production without security incidents since launch, and the project opened a longer-term relationship between Conurma and Tailor.

Congratulations to the Tailor team for completing a project that responds to current challenges and anticipates future needs — an admirable result.

Rosana López - Project Management Officer