Skip to main content

EU AI Act Compliance

Classification

TrustRelay is classified as a High-Risk AI System under the EU AI Act (Article 6, Annex III, Point 5(b)) — AI systems used for risk assessment and fraud detection in financial services.

This classification is not incidental. TrustRelay makes or informs decisions that affect individuals' access to financial services and business relationships. The EU AI Act framework — technical documentation, automatic logging, transparency, human oversight, accuracy monitoring, and quality management — maps directly onto the architectural requirements for a production-grade KYB/KYC compliance platform.

Article-by-Article Mapping

Article 11 — Technical Documentation

RequirementImplementationEvidence
General description of the AI systemArchitecture docs at trust-relay.pages.devProduct overview, data flow, tech stack pages
Design specifications and development methodologyS4U Methodology with design-before-code principleADR records (48 ADRs documented, latest ADR-0049)
Information about training dataNot applicable — TrustRelay uses deterministic algorithms + LLM API calls, no custom-trained modelsEVOI engine uses mathematical decision theory, not ML training
Development and testing proceduresPoC methodology with 90% workflow coverage targetpytest + testcontainers, no mocking without approval
Intended purpose and foreseeable misuseKYB/KYC compliance for financial services onboardingDocumented in PRD and business context
Post-market monitoring planCase intelligence pattern detection, officer decision calibrationEpisodic memory, cross-case pattern analysis

Article 12 — Automatic Logging

Article 12 requires high-risk AI systems to automatically record events during operation to enable post-hoc traceability and auditability.

RequirementImplementationEvidence
Automatic recording of eventsevoi_decisions table logs every AI decision31 rows per case: belief state, EVOI score, decision rationale
Traceability of AI operationsaudit_events table with full event historyCase lifecycle from creation to decision
Identification of input dataEvery finding has source field citing data originINSEE, NorthData, OpenSanctions, GLEIF, VIES
Network investigation audit trailEach entity scan logged with EVOI decision, depth, connection weightCompound risk scores are deterministic and reproducible
Immutabilityaudit_events is append-only by convention — AuditService only ever inserts (log_event), never updates or deletesAppend-only at the application layer; no DB trigger or revoked-UPDATE grant enforces it yet (see Known Gaps)
Retention periodMinimum 5-year retention aligned with 6AMLD/AMLRDeletion only on explicit officer action; case data retained per AML rules

The evoi_decisions log is the primary compliance artifact for Article 12. Every inference, every investigation decision, every skipped agent is recorded with the inputs that produced it. An auditor can reconstruct the exact state of the belief model at any point in a case's lifecycle.

Article 13 — Transparency

Article 13 requires that high-risk AI systems be designed so that deployers and affected persons can interpret their output and understand the basis for recommendations.

RequirementImplementationEvidence
Users can interpret outputConfidence scoring with 4-dimension breakdownEvidence completeness, source diversity, consistency, calibration
Logic behind alerts documentedEvery finding includes description + cited sources"Credible adverse media: Le Monde (2026-03-20), Reuters (2018-04-25)"
Risk scores explainableCompound risk scoring uses deterministic formulaJurisdiction +30, dissolved +20, shared directors +10 each
Recommendation reasoningESCALATE verdict includes specific risk drivers"ESCALATE: corruption allegations; 5 secrecy entities; SPF missing"
Model identificationEvery LLM call records model version and prompt templatePydanticAI all_messages() captured; PromptRegistry tracks version
Limitations disclosedInvestigation scope, missing sources, and data freshness surfacedSPF check failures, VIES API unavailability reported in findings

The confidence score decomposition — evidence completeness, source diversity, consistency, historical calibration — is specifically designed to satisfy Article 13(2)(b): the system must be interpretable to persons with reasonable technical knowledge. A compliance officer does not need to understand EVOI mathematics to understand "3/7 sources returned data; findings are internally consistent."

Article 14 — Human Oversight

Article 14 is the most architecturally consequential EU AI Act requirement. It mandates that high-risk AI systems be designed to allow effective oversight by natural persons.

RequirementImplementationEvidence
Human-in-the-loop by designREVIEW_PENDING state requires officer decisionSystem never auto-approves — workflow waits for officer_decision signal
Override capabilityOfficers can accept/reject/follow-up/escalateDecision recorded with timestamp and reasoning
System recommends, human decidesRecommendation is advisory ("ESCALATE"), not bindingOfficer can approve despite escalation recommendation
Cannot suppress risk signalsArchitectural constraint — findings cascade UP onlyNetwork insights propagate to parent case as HIGH findings
Fallback mechanismsManual document review always availableOfficer can upload/review documents independently of AI
Awareness of automation tendencyConfidence scores and source citations prevent blind trustOfficers see exactly which sources are missing
Audit of oversight decisionsOfficer identity, timestamp, and reasoning recordedaudit_events table; decision immutable post-submission

This is not a paper commitment. The Temporal workflow is structurally incapable of transitioning from REVIEW_PENDING to APPROVED without a human signal. There is no code path that bypasses this gate. The system can recommend ESCALATE, APPROVE, or REJECT — but the state machine will not advance until an officer issues the officer_decision signal.

Article 15 — Accuracy, Robustness, Cybersecurity

RequirementImplementationEvidence
Accuracy monitoringConfidence scoring tracks prediction qualityHistorical calibration dimension (agreement rate with officer decisions)
Multi-source corroboration7+ independent data sources per investigationCross-referencing reduces single-source errors
Bias mitigationFuzzy name matching with diacritics normalization"Cédric" and "Cedric" matched correctly
Data freshnessOpenSanctions auto-refresh (sanctions daily, PEPs weekly)831K entities, last refreshed tracked
Resilience to data gapsGuard-and-swallow pattern — individual check failures don't block investigationPEPPOL failure does not prevent OSINT completion
Resilience to adversarial inputsSource diversity prevents manipulation via single-source poisoningA false record in one registry is contradicted by others
CybersecurityTenant isolation with PostgreSQL Row Level Security (set_config('app.current_tenant', ...) GUC + per-table policies)RLS enforced at the DB layer on the sensitive tenant-scoped tables (18 tables under FORCE ROW LEVEL SECURITY); not yet applied to every table (see Known Gaps)

Article 17 — Quality Management System

Article 17 requires providers of high-risk AI systems to implement a documented quality management system covering the entire lifecycle.

RequirementImplementationEvidence
Risk management processEVOI engine with asymmetric utility functioncost_false_negative (10,000) >> reward_correct_approve (100) — 100x penalty for false approvals
Data governanceSource attribution on every factsource field on all findings, SourceBadge in UI
Post-market monitoringCase intelligence learns from officer decisionsEpisodic memory, pattern detection across cases
Documentation managementADR records + Docusaurus site48 ADRs, 90+ documentation pages
Testing and validationMandatory quality gates before every commitruff F-codes + TypeScript strict before merge
Corrective action processADR process for any deviation from PRDNew ADR required before implementing significant change
Traceability of changesGit history + ADR recordsEvery architectural decision recorded with rationale

EVOI Decision Framework

The Expected Value of Investigation (EVOI) engine is the core AI decision-making component. It satisfies EU AI Act transparency requirements because every decision is mathematically grounded and auditable.

Mathematical Foundation

EVOI(agent) = E[V(b_after)] - V(b_now) - cost(agent)

Where:

  • b_now = current belief state (probability distribution over clean / risky / critical)
  • b_after = expected belief state after running the agent
  • V(b) = expected utility of making the optimal decision given belief state b
  • cost(agent) = normalized cost of running the agent (time + API calls)

An agent is run if and only if EVOI > 0. This means: "the expected improvement in decision quality exceeds the cost of obtaining the information."

Utility Function (Asymmetric by Design)

DecisionOutcomeUtility
ApproveEntity is clean+100
ApproveEntity is risky-1,000
ApproveEntity is critical-10,000
RejectEntity is clean-50
RejectEntity is risky+500
RejectEntity is critical+1,000

The 100x asymmetry between cost_false_negative and reward_correct_approve is an explicit policy decision: the cost of approving a criminal entity is one hundred times greater than the cost of incorrectly rejecting a clean one. This is encoded in the EVOI utility function, not in ad-hoc rules.

This asymmetry is disclosed to officers via the confidence scoring UI and documented in the ADR for the EVOI engine.

Logged State Per Decision

Every row in evoi_decisions records:

FieldDescription
case_idParent case
iterationWorkflow iteration number
step_numberSequential step within iteration
decision_typeinvestigate, skip, or snapshot
candidate_agentAgent being evaluated for the next step
belief_p_cleanProbability mass on "clean"
belief_p_riskyProbability mass on "risky"
belief_p_criticalProbability mass on "critical"
evoi_valueComputed EVOI score (with v_now, e_v_after, step_cost)
connected_entity_idNetwork entity being evaluated
connection_weightStrength of link to primary entity
network_depthDepth in ownership/directorship graph
scan_tierInvestigation tier selected
decisionResulting decision (investigate / skip)
reasonHuman-readable decision explanation

For a typical Bolloré SE case, this table contains 31 rows covering the full investigation path: initial belief snapshots, 16 investigate decisions at depth 0, 6 skip decisions (budget exhausted), and 7 depth-1 discoveries.

Budget and Depth Constraints

The EVOI engine operates under two hard constraints:

  • Budget cap: Network investigation budget is capped at 3× the primary investigation cost. The system cannot spend unbounded resources on recursive entity discovery.
  • Depth cap: Recursive network scanning is bounded at max_network_depth=2. There are no infinite loops; the recursion terminates by construction.

Both constraints are logged. When an investigation is truncated by budget or depth, the truncation reason is recorded in audit_events.


Network Investigation Audit Trail

The network investigation module (entity graph scanning) presents a specific Article 12 compliance challenge: the investigation visits dozens of entities, each with its own risk signal, and the final case finding is a compound of all discovered signals. An auditor must be able to reproduce exactly why the system flagged a subsidiary three hops removed from the primary entity.

The audit trail design handles this as follows:

  1. Entity scan log: Every entity scanned — primary, subsidiary, director, UBO — is logged with the EVOI decision that authorized the scan.
  2. Finding provenance: Every finding records which entity it originated from, what scan tier produced it, and which external source returned the data.
  3. Signal propagation log: When a network finding is promoted to a parent case finding, the propagation is recorded with the connection weight and depth that justified promotion.
  4. Deterministic reproducibility: Because EVOI is a deterministic mathematical function given the belief state, any historical investigation can be replayed from the logged inputs.

Regulatory Alignment Summary

EU AI Act ArticleCompliance LevelImplementation Mechanism
Art. 6 + Annex III (Classification)Classified correctlyPoint 5(b): risk assessment in financial services
Art. 11 (Technical Documentation)FullADRs, Docusaurus, methodology, PRD
Art. 12 (Automatic Logging)Fullevoi_decisions + audit_events tables
Art. 13 (Transparency)FullExplainable scores, cited sources, model identification
Art. 14 (Human Oversight)FullHuman-in-the-loop by Temporal workflow design
Art. 15 (Accuracy & Robustness)FullMulti-source, calibration, diacritics normalization
Art. 17 (Quality Management)FullEVOI asymmetric utility, ADR process, testing gates

Additional Regulatory Coverage

The EU AI Act compliance architecture intersects with and reinforces several other regulatory frameworks:

GDPR

ArticleRequirementImplementation
Art. 22Right to human review of automated decisionsOfficer decision required — no automated final decisions
Art. 25Privacy by designTenant isolation via PostgreSQL Row Level Security (18 sensitive tables under FORCE RLS); PII encrypted at rest via EncryptedText (AES-256-GCM)
Art. 30Records of processing activitiesaudit_events captures processing steps; DomainEvent correlation/causation chains link related events
Art. 35Data Protection Impact AssessmentArchitecture supports DPIA; formal document pending (known gap)
Art. 15/16/17Data subject access, rectification, erasureapp/api/data_subject.py/api/data-subject/{access,rectify,erase}; erasure respects AML 5-year retention via DSRService

AML Directives (6AMLD / AMLR)

RequirementImplementation
5-year minimum retentionAudit events and case data retained; deletion requires explicit officer action
SAR-ready audit trailgoAML XML export (Phase 1) generates structured transaction reports
Risk-based methodologyEVOI utility function is a documented, auditable risk-based approach
Documented due diligenceEach case produces a full investigation report with source citations

ISO 42001 — AI Management System

The EVOI framework aligns directly with ISO 42001's risk-based approach to AI governance:

  • Clause 6.1 (Risk assessment): EVOI utility function is a formal risk assessment model with documented parameters.
  • Clause 8.4 (AI system impact assessment): Confidence scoring provides the required uncertainty quantification.
  • Clause 9.1 (Monitoring and measurement): Historical calibration dimension tracks AI decision quality over time.
  • Clause 10.2 (Nonconformity and corrective action): ADR process provides the required corrective action mechanism.

ISO 27001 — Information Security Management

DomainImplementation
A.8 (Asset management)MinIO object storage with tenant-scoped prefixes
A.9 (Access control)Keycloak OIDC, JWKS token validation, role-gated endpoints, RLS at DB layer on sensitive tables
A.12 (Operations security)Audit logging, immutable event records
A.18 (Compliance)This documentation; ADR process; testing gates

Known Gaps

GapStatusMitigation
GDPR Art. 35 formal DPIA documentArchitecture supports it; document not yet draftedLow risk — DPIA can be produced from existing documentation
Per-tenant audit isolationNot yet correct. The persist_audit_event workflow activity calls AuditService.log_event(), which opens get_session() — pinned to the demo tenant (DEMO_TENANT_ID). Workflow audit events are written under the demo tenant default, not the case's actual tenantWire AuditService to accept and apply the case tenant_id (via get_tenant_session) before claiming per-tenant audit trails
audit_events immutability enforcementAppend-only by application convention only (AuditService never updates/deletes); no DB trigger or revoked-UPDATE/DELETE grant exists; audit_events is not under FORCE RLSAdd a DB-level immutability constraint (trigger or revoked grants) and an RLS policy to make the guarantee structural
ISO 42001 formal certificationNot yet pursuedFramework alignment enables rapid certification path
ISO 27001 formal certificationNot yet pursuedPrerequisite for enterprise sales; planned post-PoC
Art. 13 transparency notice to data subjectsPortal discloses AI-assisted reviewFull notice template pending legal review

These gaps are known and tracked. None affect the architectural correctness of the compliance implementation; they represent documentation and process formalization work that follows the PoC phase.