Charlie Roffe

Principal Architect & Engineering Director · Cloud & AI

Madrid, Spain · LinkedIn · GitHub

ADR-013: EU AI Act & AI Governance Compliance Framework

Context

As a production-grade portfolio showcasing generative AI capabilities in Europe (deployed in the GCP Madrid hub Node europe-southwest1), the system must proactively comply with the newly enacted EU AI Act (Regulation on Artificial Intelligence). This regulation establishes legal obligations based on AI risk categories to ensure safety, privacy, transparency, and accountability.

Decision

Establish a robust, built-in AI Governance & Compliance Architecture: Classify our Generative Q&A, Cost Advisor, and Cert Assistant features under the Limited Risk / Chatbot & Transparency tier (Article 50 of Regulation (EU) 2024/1689), which mandates user disclosure. Implement clear UI transparency labels, route generative inference through the Vertex AI EU multi-region endpoint (processing guaranteed inside EU geography while serving the newest Flash generation) with document embeddings vectorized on the Madrid regional endpoint, process raw uploads in-memory with derived cache artifacts persisted only in the Madrid-regional Firestore (ADR-007), and log every run (demo type, model, location) for audit telemetry.

Amended 2026-10-16: the same tier now also covers the contact concierge (a public chatbot that introduces itself as an AI across every page), the Architecture Diagram generator, the Architecture Copilot (now a direct TypeScript state machine, ADR-024), Diagram-to-Terraform (ADR-032), Job Match (ADR-040), ADR Explainers (ADR-041), the prompt-injection challenge (ADR-042), the ARB Gauntlet (ADR-044), and on-demand translation (ADR-045); the Cost, ADR, and Cloud Defender demos are off by default. Generation runs on Gemini 3.8 Flash (default) or Gemini 3.5 Flash-Lite (ADR-029), and embeddings use gemini-embedding-001. Firestore (default in prod, isolated portfolio-dev in dev) now also holds demo_results, translations, Copilot checkpoints, ai_usage counters and contact_messages (name, email and message, kept 90 days), all with TTLs. Contact messages are also emailed through Resend, an external processor, so that delivery path is the one exception to the EU-only guarantee.

Consequences

Benefits:
* Preemptive compliance ensures full alignment before EU enforcement deadlines.
* Serves as a strong architectural proof point in technical interviews.
* Regional processing — in-memory uploads, Madrid-resident Firestore caches — keeps demo data inside the EU and aligned with the GDPR (contact-message email delivery via Resend is the stated exception).

Alternatives considered

1. Global Model Routing: Rejected — the global endpoint offers no data-residency guarantee, so user-uploaded data could be processed on non-EU nodes, violating data residency standards.
2. Single-Region Pinning (Madrid europe-southwest1): Rejected — no compliance benefit over the EU boundary guarantee, while single regions lag model generations (Gemini 3.5 Flash is not served there).
3. Self-Hosting Models on VM Groups: Rejected due to significant monthly standby billing costs, violating our zero-budget standby goal.

Architecture Decision Records