03 — Governance, Audit & Operations

Governance, Audit & Operations

Chapters 36 – 59 + Appendices — Security model, audit logging, monitoring, testing, productivity measurement, supplier replacement, procurement, continuity, and scaling.

Full Master Architecture PDF

Download the complete NHS Sovereign AI Replacement Architecture master record. The web pages provide section summaries; the PDF contains the full technical architecture.

Download PDF
In This Section
NHS Security Deployment Model

The security model enforces defence-in-depth across all layers:

ControlImplementation
Closed network operationAir-gapped option available; no external connectivity required
No direct transformer accessAll model access through NMAI Core only
API key authenticationKeys rotated, never hardcoded, stored in environment variables
Endpoint restrictionOnly approved endpoints exposed through Nginx
Data minimisationOnly conditioned input reaches model; raw input never exposed
Audit log protectionAppend-only JSONL, tamper-evident, access-controlled
Model weight protectionPhysical and logical access controls on model files
Ruleset protectionChange control, versioned, signed updates
Plugin securityLocal-only, no external network calls
Failure-safe behaviourFail closed, never fail open to external model

Security Controls Summary:

  • Plugin endpoint control — local API only
  • Direct model route blocking at Nginx layer
  • Ruleset change control with governance approval
  • Network segmentation between containers
  • Container isolation and read-only mounts where possible
  • Output controls preventing unreviewed content release
  • Security testing before every deployment
Audit & Evidence Logging

The audit layer creates tamper-evident evidence for every decision:

Audit EventRecorded
Minimum audit eventTimestamp, input hash, ruleset version, decision state, audit reference
Blocked-state evidenceFull input hash, matched markers, blocking rule reference, user/session ID
Warning-state evidenceCaution markers, warning type, user acknowledgment
Model-handoff evidenceConditioned input hash, model name/version, permission state, timestamp
Output evidenceOutput hash, review status, reviewer ID, acceptance/rejection

Audit Log Format (JSONL):

{"timestamp": "2026-06-29T10:15:30Z",
 "audit_ref": "NMAI-20260629-001015-A7F3",
 "ruleset_version": "nhs-rules-v2.3.1",
 "input_hash": "sha256:a1b2c3...",
 "decision": "permit",
 "markers_detected": ["patient_data_boundary", "clinical_risk"],
 "model_access": "allowed",
 "model_name": "Llama-3.3-70B-Instruct",
 "model_version": "v3.3-70B",
 "session_id": "sess-7f8a9b"}

Tamper-evident requirements: Append-only logs, checksum chaining, restricted access, integrity monitoring, separate storage from application.

Monitoring Layer
MonitorChecks
Service healthNMAI API, vLLM, Nginx all responding
NMAI monitoringConditioning latency, decision throughput, error rate
Model endpointvLLM queue depth, GPU utilisation, response time
Reverse proxyRequest rates, routing errors, blocked direct access attempts
Plugin monitoringConnection success, error rate, user workflow completion
Audit integrityLog continuity, checksum validation, tamper detection
Ruleset monitoringVersion compliance, load errors, update status
Security eventsBlocked access attempts, unusual patterns, escalation triggers
Blocked/warning patternsTrend analysis of blocked inputs, marker frequency
Testing & Simulation Layer

Test Categories:

Test LayerWhat Is Tested
NMAI rules testingRuleset loads correctly, all decision states reachable
Marker detectionAll marker types detected at correct thresholds
Blocked inputBlocked inputs never reach model
Warning inputWarnings surface correctly, user acknowledgment recorded
Permitted inputPermitted tasks route to model with correct conditioning
Model handoffConditioned package format correct, response handling safe
Plugin testingDocument check, blocked state, output integration
CUI testingWorkflow states, marker display, review routing
Audit testingEvery event logged, tamper evidence working
Failure-state testingFail-closed behaviour confirmed, no external fallback
Simulation testingSynthetic cases across all decision states

Simulation Mapping:

  • Blocked simulation: NHS numbers, safeguarding, legal terms, clinical risk
  • Warning simulation: Urgent clinical wording, ambiguous governance markers
  • Review simulation: Complex multi-marker cases requiring human judgment
  • Permitted simulation: Generic policy rewrites, meeting summaries, formatting
  • Drift resistance: Input variations that should not change decision
  • Threshold testing: Boundary cases at marker trigger points
  • Ethical alignment: Cases testing NHS ethical principles
Productivity Measurement Replacement

The architecture replaces generic time-saving claims with route-level productivity measurement.

Productivity = (Time Saved) / (Total Route Cost)
Total Route Cost = NMAI conditioning time + model runtime + human review time + correction time + governance overhead
MeasurementWhat It Captures
Baseline workflow timeManual task without AI assistance
Assisted workflow timeTotal time with NMAI-controlled AI
Review-time adjustmentHuman review burden added by AI output
Correction-time adjustmentTime spent fixing AI-generated content
Blocked/warning event valueRisk avoided by preventing unsuitable model access
Model-handoff rateWhat percentage of tasks actually need generation
Energy-adjusted productivityAccount for local compute vs. cloud energy
Risk-adjusted productivityAccount for sovereignty, audit, safety value

Pilot Task Table:

  • Meeting note summarisation (permitted administrative)
  • Policy document restructuring (permitted governance)
  • Internal memo drafting (permitted communication)
  • Form text plain-English conversion (permitted accessibility)
  • Clinical document handling (blocked / review states)
Key Principle
A fast model output is not a productivity gain if it increases review burden, correction burden, or governance risk. The sovereign route must demonstrate lower total cost of ownership including governance, audit, and risk.
Supplier Replacement Matrix
Existing DependencyReplacementStatus
Microsoft 365 OfficeLibreOffice + NHS Clinical CUIOpen-source
Copilot chat interfaceNHS Clinical CUI (controlled workflow)NHS-built
Cloud processingUK-hosted servers / local trust serversUK-controlled
Model inferencevLLM on UK infrastructureOpen-source
Telemetry/loggingNMAI audit trail (JSONL)NHS-controlled
LicensingOpen-source stack, no per-seat licenceOpen-source
Update controlNHS-controlled update cycleNHS-governed
Supplier continuityMulti-supplier capable, exit-readyDe-risked

Procurement Questions for Suppliers:

  • Can the component operate without internet connectivity?
  • Is the source code inspectable?
  • Where is data processed and stored?
  • Who controls update timing?
  • What is the exit route?
  • Is there a per-seat licence dependency?
  • Can NHS governance override supplier defaults?
Procurement & Pilot Readiness
Readiness AreaEvidence Required
Architecture readinessDesign documents, API specifications, deployment diagrams
Supplier readinessDue-diligence answers, open-source licences, UK hosting confirmation
Data protectionDSPT alignment, DPIA, data minimisation evidence
Clinical safetyDTAC alignment, safety case, hazard log
Information governanceIG toolkit, Caldicott compliance, records management
Security readinessCyber essentials plus, penetration testing, vulnerability assessment
Testing readinessTest plan, simulation results, evidence pack
Productivity measurementBaseline metrics, measurement protocol, success criteria

Procurement Evidence Pack: Architecture overview, technical specification, security assessment, IG assessment, test evidence, pilot protocol, exit plan, support model, scaling route, risk register.

Go / No-Go Decision: Pilot proceeds only when architecture, supplier, data protection, clinical safety, IG, security, testing, and productivity measurement readiness are all confirmed.

Continuity & Exit Architecture

The architecture is designed for graceful exit at every layer:

Failure ModeFallback
Model-endpoint failureCondition-only mode continues; manual workflow available
NMAI failureFail closed; no model access; manual workflow continues
Ruleset failureFail closed; use last known good ruleset; alert administrators
Audit failureFail closed; cannot proceed without audit capability
Supplier exitOpen-source components continue; model replaceable
Model replacementSwap model endpoint without redesign; NMAI Core unchanged
Hosting replacementDocker containers portable to new UK infrastructure
Office-layer continuityLibreOffice continues without AI; documents remain accessible
Plugin exitRemove plugin; LibreOffice continues normally

Fallback Modes:

  • Condition-only mode: NMAI conditioning works, generation disabled
  • Manual review mode: All tasks routed to human review
  • Full stop mode: Emergency stop engaged, all AI disabled
NHS Retained Control
Control AreaNHS Authority
Patient-data boundaryNHS defines, enforces, and audits what data may enter the AI route
RulesetsNHS creates, approves, and updates all marker and decision rules
Input conditioningNMAI Core is NHS-controlled; supplier cannot alter conditioning logic
Model accessNHS decides which tasks may reach a model
Model selectionNHS approves model, version, and capability envelope
Audit logsNHS owns all audit data; supplier has no access
Output statusNHS reviews, approves, or rejects every model output
Plugin configurationNHS controls plugin settings and deployment
Supplier accessNHS controls what suppliers can access, update, or modify
MonitoringNHS monitors system health, security, and compliance
UpdatesNHS controls timing and approval of all updates
Emergency stopNHS can stop all AI generation at any time
ExitNHS can exit the architecture without supplier dependency
DSPT Alignment Mapping

The architecture is mapped against NHS Data Security and Protection Toolkit standards:

DSPT RequirementArchitecture Evidence
Data minimisationOnly conditioned input reaches model; raw input never exposed
Patient-data boundaryMarker detection blocks patient data; audit records every boundary check
Access controlAPI keys, endpoint restriction, Nginx controls
Ruleset governanceNHS-approved rules, versioned, change-controlled
Audit trailAppend-only JSONL, tamper-evident, audit reference per transaction
Incident responseEmergency stop, fail-closed, cyber incident evidence
Supplier managementOpen-source stack, exit-ready, continuity architecture
Emergency Stop & Cyber Incident Alignment
TriggerAction
Fail-closed principleAny control failure stops model access; never falls back to external model
Emergency stop triggersSecurity incident, ruleset breach, model compromise, IG alert, cyber attack
Condition-only modeNMAI continues conditioning and audit; generation disabled
Manual review modeAll tasks routed to human specialists
Restart evidenceFull audit of stop event, restart authorization, system checks
Cyber incident evidenceLogs preserved, incident reference created, forensic trail maintained
Deployment Scaling Route
StageScopeCriteria
1. Local prototypeSingle developer machineNMAI conditions, ruleset works, audit logs, safe failure
2. Department pilotSingle department, synthetic dataBounded workflow tasks, non-identifying data, governance oversight
3. Trust pilotSingle NHS TrustOperational deployment, IG approval, cyber review, clinical safety sign-off
4. Regional deploymentMultiple trusts, ICS levelInteroperability, shared rulesets, regional audit, scaling evidence
5. National deploymentNHS-wideFull evidence, governance, cyber, procurement, exit controls all approved
Final Architecture Position
Core Position
NMAI Core governs access. The model executes only after permission. The model is replaceable. The route is sovereign.
ComponentPosition
NMAI CoreDeterministic input-conditioning kernel; pre-transformer control authority
TransformerPost-conditioning execution module; drafts only after permission
Open-source officeDocument control layer; NHS retains document sovereignty
NHS Clinical CUIControlled workflow interface; not a chatbot
UK compute layerUK-hosted only; patient data never leaves UK jurisdiction
AuditTamper-evident evidence for every decision; NHS-owned
ProcurementOpen-source, exit-ready, evidence-based, no supplier lock-in
ProductivityRoute-level measurement including governance, audit, and risk value
ContinuityGraceful exit at every layer; fail-closed; emergency stop available
NMAI Core first. Audit before model handoff. Model only where permitted. Output always reviewable. No external fallback. No direct model access. No NMAI Core decision, no model call.
← 02 Implementation Home