The system this book follows
Merehaven’s Evidence Desk assists peers handling synthetic payment disputes and complaints. It has a deliberately narrow purpose.
It may:
- search policy and case material the authenticated peer is allowed to read;
- retrieve versioned evidence before generation;
- extract structured facts with provenance;
- identify missing evidence;
- draft an internal case note;
- propose questions for a human reviewer; and
- produce a cited, visibly provisional summary.
It may not:
- decide a complaint, fraud, credit or eligibility outcome;
- determine redress;
- file or decide a suspicious-activity report;
- change an account;
- issue or reverse a payment;
- send a customer communication;
- disclose a restricted document;
- widen its own permissions; or
- convert generated text into an approval.
Those limits are not aspirations hidden in a prompt. The surrounding application enforces them through purpose-bound data access, tenant and case scope, closed tool schemas, exact-action approval, transaction limits and a human decision boundary.
How the argument develops
The chapters follow the evidence needed for a release decision.
- Start with the boundary. Identify assets, actors, capabilities, threat events and harms.
- Locate the information. Separate weights, adapters, prompts, retrieval records, caches, logs and tool outputs.
- State the privacy claim. Define the protected unit, adjacency, mechanism, parameters and composition horizon.
- Test what can leak. Measure memorisation, membership, extraction, reconstruction and retrieval disclosure without conflating them.
- Reduce the data surface. Minimise content, preserve provenance, authorise before ranking and plan deletion across derivatives.
- Adapt under constraints. Decide whether fine-tuning, differential privacy, federation or cryptographic processing is justified.
- Secure the serving path. Establish workload, identity, artefact, network, resource and evidence controls.
- Attack the complete system. Test how untrusted content could reach restricted data or capabilities.
- Engineer layered defences. Convert findings into deterministic boundaries, supplemental detectors and regression tests.
- Examine unequal effects. Measure group performance, linguistic framing, explanation limits and the conditions for meaningful review.
- Build the assurance case. Link claims to controls, fresh evidence and accountable owners.
- Release or hold. Walk the complete architecture and make the decision without averaging away a missing mandatory gate.
Readers designing a new system should follow this order. Privacy specialists can begin with Chapters 3 to 6 after reading the Evidence Desk boundary. Security reviewers can start with Chapters 1, 7, 8 and 9. Risk owners can begin with Chapters 11 and 12, then trace every claim back to its technical evidence.
How to read a claim
The book uses four kinds of statement.
Formal claim. A definition or theorem applies under named mathematical assumptions. Differential privacy belongs here. A formal property is not established by observing a few favourable outputs.
Empirical finding. A test observed a result for a fixed system version, fixture, adversary and protocol. The result needs a denominator and uncertainty. It does not cover untested attacks or later versions.
Engineering decision. A team selects a limit, architecture or residual risk for a declared use. The decision can be reasoned and evidenced, but it is not a universal threshold.
Legal or regulatory relevance. An official text may matter to a particular entity and use. The book identifies the engineering question it raises while leaving entity-specific interpretation to qualified reviewers.
Each substantial chapter therefore asks:
- What is the claim?
- What assumptions make it meaningful?
- Which control is supposed to support it?
- What test could falsify it?
- Which evidence is retained?
- Who can accept the remaining risk?
- Which change makes the evidence stale?
Vocabulary that must remain separate
The following terms are related but not interchangeable.
| Term | Question it answers |
|---|---|
| Privacy | How can processing affect people even when data is not breached? |
| Confidentiality | Who is permitted to learn the information? |
| Integrity | Can data, policy, model or action be changed without authorisation? |
| Availability | Can the service and its dependencies perform when required? |
| Safety | Can system behaviour cause unacceptable harm? |
| Fairness | How are benefits, errors and burdens distributed? |
| Authentication | Which identity is making the request? |
| Authorisation | What may that identity do for this purpose and object? |
| Memorisation | Has training caused specific content to influence model outputs? |
| Membership inference | Can an adversary infer whether a protected unit was in training data? |
| Extraction | Can an adversary recover content through interaction or artefact access? |
| Reconstruction | Can an adversary estimate a record, attribute or representative input? |
| Prompt injection | Can untrusted content alter how the application interprets instructions? |
| Jailbreak | Can a model be induced to produce behaviour its policy intended to restrict? |
| Guardrail | A behavioural or policy check around an input, output or action proposal |
| Capability boundary | A deterministic limit on data or action authority |
The consolidated glossary defines these and other terms in full.
Measurement conventions
Rates are reported as a numerator over a denominator before they are shown as percentages. A zero observed event count does not prove a zero event probability. Where appropriate, the book reports a confidence interval or conservative upper bound.
For an attack test with declared successes in trials,
The success predicate, trial construction and adversary must be fixed before the rate is interpreted. Comparing a defence uses both:
and, when the baseline is non-zero,
The relative value is undefined when the baseline is zero. The code returns that state explicitly rather than substituting a favourable number.
All times are UTC-aware. Monetary and quota limits use exact decimal arithmetic where rounding affects a governed boundary. Identifiers, dates and data in listings are synthetic.
Reproducibility record
A security, privacy or fairness result should be recoverable from:
- the application, model and artefact versions;
- immutable digests and, where applicable, signatures;
- the data, corpus, policy and rights-manifest versions;
- the principal, purpose and authorised scope used by the test;
- the prompt, tool, schema and output-policy versions;
- the evaluator, fixtures and random seeds;
- the attacker access, knowledge, budget and success predicate;
- raw per-trial outcomes and severity;
- metric implementation and uncertainty procedure;
- infrastructure and dependency versions;
- waivers, limitations and unresolved findings;
- reviewer identity and decision authority; and
- the evidence expiry or change trigger.
An aggregate without those records is not durable evidence.
Colour and figure conventions
Figures use the same semantic language throughout:
- blue documents and cylinders denote data or evidence;
- teal shields and solid boundaries denote trusted controls;
- amber diamonds and person markers denote human review or decision;
- coral crosses and broken paths denote threats, blocked flows or failure;
- violet rounded processes denote models or other probabilistic components; and
- neutral dotted boundaries denote external, unknown or inactive elements.
Labels, shapes and line styles repeat the meaning, so colour is never intended to be the only carrier of information. Before release, each figure must have an equivalent text alternative, a visible caption, and an internal title and description for assistive technology. Those properties are checked in the packaged EPUB rather than inferred from this manuscript.
Code contract
The reference module is designed to implement control contracts rather than model behaviour. Its examples cover:
- purpose-bound processing;
- authorisation before retrieval;
- attack-rate intervals and comparison;
- membership-inference metrics;
- synthetic-canary exposure;
- differential-privacy records and elementary composition;
- log minimisation;
- trusted-policy and untrusted-evidence separation;
- capability-scoped tools;
- exact-action approval;
- token, tool, time and cost ceilings;
- artefact integrity;
- pseudonymised audit events;
- lineage-aware deletion; and
- conjunctive release gates.
At release, every published listing is extracted and executed from the assembled manuscript. The fuller module is checked with unit and deterministic property tests. External model, vector-store, cloud, signing, privacy-accounting and cryptographic integrations remain outside the laboratory and are reported as not run.
Acknowledgements
This work depends on the researchers, engineers, standards bodies, public authorities and open security communities cited in the notes and bibliography. Their publications make the claims inspectable. Any error in interpretation or implementation remains the author’s.
Chapter 1: Start with the boundary
Merehaven Bank’s proposal fits on one page. The Evidence Desk will help complaint handlers find policy and case material, extract facts and draft an internal note. It will serve peers rather than customers. It will not decide an outcome or execute an account action.
That description is useful, but it is not yet a security boundary. “Staff-only” does not identify which staff member may see which case. “Find policy” does not say whether retrieval searches public guidance, internal procedures or customer evidence. “Draft a note” does not identify where the prompt, retrieved passages and generated draft will be stored. “No account action” is not enforceable until the system lacks the corresponding capability.
The first engineering task is therefore to turn the proposal into claims that can fail.
For the initial release, Merehaven adopts five:
- a peer can retrieve only the documents authorised for that peer, purpose and case;
- retrieved documents and tool responses are treated as untrusted data, so their content cannot alter deterministic data scope, tool grants, transaction limits or approval requirements;
- the application cannot expose a payment, account-change or customer-communication capability to the model;
- logs retain the policy decision and evidence references without copying unrestricted case prose; and
- a missing, failed or stale mandatory test holds the release.
Each claim identifies a result the team can inspect. None depends on the model being obedient.
The protected system is larger than the model
In this text-only Evidence Desk path, the model endpoint receives tokenised context and returns generated output. The surrounding application authenticates a peer, looks up entitlements, retrieves documents, builds context, invokes the model, parses the response, calls services, displays a draft and records evidence. A weakness in any of those stages can create the same visible harm.
Suppose a complaint handler sees a restricted case note. Several causes are possible:
- the note was present in adaptation data and later reproduced;
- retrieval searched the whole corpus before applying a case filter;
- a cache key omitted the peer or case scope;
- the application logged another user’s context and exposed the log;
- an indexing job placed the document in the wrong tenant;
- a tool ran with a service identity broader than the user’s identity;
- generated output combined authorised fragments into a prohibited inference; or
- an ordinary access-control defect returned the wrong record.
Calling every cause “the model leaked data” makes the investigation less accurate. Training-data memorisation, retrieval disclosure, cache isolation and authorisation require different tests and different owners.
The NIST Generative AI Profile treats generative AI risk across the lifecycle and describes itself as a voluntary, cross-sector companion to the AI Risk Management Framework.1 The UK National Cyber Security Centre’s secure-AI guidance likewise addresses design, development, deployment, operation and maintenance, including systems assembled from third-party components.2 Both are useful here because the system boundary includes the supply chain and operating environment.
Six properties, six questions
Security discussions often use a single colour for everything undesirable. The Evidence Desk instead separates six properties.
Privacy
Privacy concerns the effects of processing on people. A perfectly confidential system can still process more personal data than its purpose requires, retain it too long or draw intrusive inferences. Conversely, a privacy-preserving aggregate can become confidential business information. Privacy cannot be reduced to breach prevention.
For Merehaven, the privacy question is:
Does the collection, use, retention or inference create an unjustified effect on a person, even if no unauthorised party sees the data?
Confidentiality
Confidentiality asks who may learn information. The Evidence Desk holds internal policy, customer records, staff notes and security evidence with different readerships. Encryption can protect content across one channel, but it does not decide whether the authenticated recipient is entitled to read it.
The confidentiality question is:
Can an identity learn content outside its tenant, case, purpose or sensitivity scope?
Integrity
Integrity concerns unauthorised change. A poisoned policy document can be harmful even if it contains no secret. A changed model artefact, altered retrieval filter, forged approval or corrupted audit event can make the application act on false evidence.
The integrity question is:
Can data, policy, configuration, model, action or evidence change without detection and authority?
Availability
Availability includes ordinary service continuity and economic exhaustion. Long prompts, repeated retrieval, recursive tool calls and uncontrolled generation can consume tokens, accelerators, database connections and money. A system that remains online but exceeds its cost boundary has also failed.
The availability question is:
Can authorised work complete within its time and cost objective during failure or hostile demand?
Safety
Safety concerns unacceptable harm caused through use or failure. An unsupported complaint summary may mislead a handler. A proposed payment action may create direct loss if the workflow executes it. The severity follows the consequence, not the eloquence of the output.
The safety question is:
Which output or action path could create unacceptable harm, and where is the last independent stop?
Fairness
Fairness concerns how benefits, errors and burdens are distributed. Two cases can receive the same proposed outcome while the generated drafts differ in scepticism, missing evidence or urgency. Aggregate accuracy may not expose that difference.
The fairness question is:
Which groups or comparable cases bear the errors, omissions, delays or review burden?
These properties interact. Minimising logs may reduce privacy exposure while weakening incident evidence. Adding detailed group attributes may improve a fairness audit while increasing sensitivity. A threat model should record the trade rather than hide it under a blended “responsible AI” score.
Build the context before listing attacks
An attack catalogue is not a threat model. A list can remind a team that prompt injection, poisoning or extraction exists, but it cannot say whether the Evidence Desk exposes the required surface or what damage would follow.
A compact system context records:
- the allowed purpose;
- identities and organisations;
- data stores and classifications;
- processes and external services;
- capabilities and transaction boundaries;
- trust-boundary crossings;
- deployment and administration paths;
- logging and evidence paths; and
- explicit non-goals.
Merehaven assigns the release candidate the identifier ED-RC-01. The identifier matters because evidence for one candidate must not be reused silently for another.
Actors
The first actor inventory is intentionally broader than “attacker”.
| Actor | Legitimate access | Additional capability to consider |
|---|---|---|
| Complaint handler | Allocated cases and current procedure | Can submit crafted text and upload case evidence |
| Team leader | Team cases and quality review | Can approve selected internal workflow transitions |
| Platform engineer | Runtime and deployment telemetry | Can change configuration through controlled delivery |
| Data curator | Approved corpus and metadata | Can add, correct, revoke and reclassify documents |
| Model or API supplier | Contracted inference or artefact delivery | May operate infrastructure outside Merehaven’s direct view |
| Compromised account | Whatever the stolen identity can access | May automate queries or combine results over time |
| Malicious document author | Content accepted into a source channel | Can place instructions or misleading evidence in text |
| Dependency maintainer | Upstream package or model release | Can introduce code, artefact or metadata changes |
| External adversary | Public endpoint surface, if any | Can scan, exhaust or exploit exposed components |
The model is not an actor with legal intent. It is a probabilistic component whose output can influence actors and services. Treating it as a peer can obscure who granted its permissions and who owns the consequence.
Assets
An asset is something whose loss, disclosure, corruption or unavailability matters. The Evidence Desk register includes more than customer text.
| Asset | Relevant property | Example harm |
|---|---|---|
| Customer case evidence | Privacy, confidentiality, integrity | Exposure, false case history or unlawful reuse |
| Current policy corpus | Integrity, availability | Incorrect handling or inability to support a decision |
| Entitlement and allocation data | Confidentiality, integrity | Cross-case access or denial of authorised work |
| Prompt and retrieval context | Privacy, confidentiality | Concentrated disclosure of case and policy content |
| Model and adapter artefacts | Integrity, confidentiality | Altered behaviour or theft of proprietary work |
| Tool credentials and grants | Confidentiality, integrity | Unauthorised read or action |
| Evaluation fixtures and findings | Confidentiality, integrity | Attack knowledge exposure or false release evidence |
| Audit and approval records | Integrity, availability | Inability to reconstruct or challenge a decision |
| Capacity and cost budget | Availability | Denial of service or uncontrolled spend |
| Staff attention | Safety, fairness, availability | Automation bias, review fatigue or unequal delays |
Entry points
The obvious entry point is the chat field. Others include uploaded documents, retrieved content, feedback, policy-ingestion feeds, administrator interfaces, model and package downloads, tool responses, telemetry, batch evaluation files and recovery procedures.
Untrusted content can enter through an authorised source. A policy document may be legitimate for retrieval and still contain an instruction-like string. Authorisation answers whether the user may read the document. It does not make every sentence an application instruction.
Trust boundaries
A trust boundary marks a change in authority, owner, process, integrity assumption or exposure. It is not synonymous with a network hop.
The Evidence Desk request crosses at least these boundaries:
- staff device to workforce identity service;
- authenticated session to application policy;
- application identity to entitlement and case-allocation data;
- authorised corpus to the ranker;
- retrieved evidence to model context;
- model output to the output validator;
- provisional draft to human review;
- policy decision to the audit store; and
- build system to the admitted serving artefact.
Some crossings happen inside one cloud account. Some involve no network at all. A generated JSON object crossing into a payment service would be a major authority boundary even if both processes shared a host.
Describe capability, not personality
Adversary labels such as “insider” or “sophisticated attacker” are too coarse on their own. A useful record states what the actor can do.
The capability dimensions for ED-RC-01 are:
- access: no access, public interface, authenticated staff interface, corpus contribution, build access or artefact access;
- knowledge: black-box behaviour, application design, prompt and policy, model weights or source and configuration;
- query budget: one request, bounded session, sustained access or offline computation;
- identity: own account, stolen account, service identity or privileged administrator;
- content control: direct prompt, uploaded document, retrievable document, feedback, tool output or training record;
- observation: final text, scores, citations, timing, token counts, logs, gradients or model parameters; and
- goal: disclose, infer, corrupt, execute, exhaust, evade, persist or undermine evidence.
MITRE ATLAS supplies a maintained vocabulary of tactics and techniques for attacks on AI-enabled systems.3 Selected OWASP 2025 risk families include prompt injection, sensitive-information disclosure, supply-chain weakness, poisoning, improper output handling, excessive agency, system-prompt leakage, vector and embedding weakness, misinformation and unbounded consumption.4 Merehaven uses those catalogues as coverage checks after it describes its own actors and surfaces. Neither list assigns the bank’s impact or acceptance decision.
Turn a concern into a scenario
The threat register represents a scenario as:
where:
- is the actor;
- is the capability;
- is the surface;
- is the crossed boundary;
- is the observable event; and
- is the harm.
For example:
A complaint handler who can upload a document places instruction-like text in a synthetic case attachment. The text enters the authorised retrieval corpus and appears in model context. The model proposes a query for another case. The tool-policy service refuses the call because the case is outside the handler’s allocation. The attempted scope change is recorded without retaining the uploaded prose.
The scenario separates two results. The model followed untrusted text, so a behavioural control failed. The capability boundary refused the cross-case query, so the confidentiality claim held. Both findings belong in the evidence bundle.
A vague alternative such as “prompt injection leaks data” cannot tell the team which component to test or what a pass means.
Misuse, abuse, accident and dependency failure
Not every harmful path begins with a hostile outsider.
Misuse is an allowed user applying the system outside its intended purpose. A peer might use complaint evidence to draft unrelated marketing copy.
Abuse is intentional exploitation, such as a compromised account enumerating case identifiers or a curator planting poisoned content.
Accident includes an indexing mistake, a stale policy version, a cache collision or a reviewer approving the wrong draft.
Dependency failure includes a model update that changes tool-call formatting, a package compromise, an identity-provider outage or an external endpoint retaining data contrary to the expected contract.
The response differs by cause. Training a stronger refusal model will not correct a cache key. Adding a content filter will not restore an expired certificate. Threat modelling must keep conventional software and operational failures in view.
Model risk and system risk
For this book’s engineering analysis, model-level risk covers error, instability, misuse and uncertainty attributable to the model. System-level risk adds the data, software, identities, tools, people and processes that determine consequence. A formal model-risk definition from a regulator or institution must be cited and scoped separately.
The Evidence Desk uses a simple distinction:
| Observation | Model question | System question |
|---|---|---|
| Draft cites the wrong policy | Why did ranking or generation prefer it? | Why was an invalid version eligible and why did validation accept it? |
| Model proposes another case ID | Why did context lead to the proposal? | Could the retriever or tool act outside the user’s allocation? |
| Output contains a synthetic identifier | Was it copied, inferred or memorised? | Which store supplied it, and was disclosure authorised? |
| Generation loops until timeout | Why did stop behaviour fail? | Which request, session, time and cost ceilings were enforced? |
| Reviewer accepts an unsupported statement | How confident or persuasive was the text? | Did the interface expose provenance, uncertainty and a usable challenge path? |
This division prevents two common errors. The first is relying on the model to enforce a permission. The second is declaring the model harmless while the application provides an over-privileged tool.
Information persists in different places
The same sentence can exist in several forms, each with a different control owner.
| Location | Typical creation | Access boundary | Retention and deletion concern |
|---|---|---|---|
| Base weights | Pre-training | Model artefact and serving process | Individual-record deletion may be infeasible or unproven |
| Adapter or checkpoint | Fine-tuning | Training and registry roles | Copies, merges and exports need lineage |
| Vector record | Corpus ingestion | Retrieval authorisation | Source revocation must invalidate indexes and caches |
| Prompt context | Request assembly | Session and model endpoint | Must not cross users, cases or provider contracts |
| KV or response cache | Serving optimisation | Cache-key and runtime isolation | Expiry and scope must include identity and policy state |
| Audit or telemetry record | Operation | Investigator and platform roles | Minimise text, restrict access and apply retention or hold |
“Delete the conversation” is incomplete until it says which rows, object versions, traces, caches, indexes and downstream evaluation artefacts are affected. Later chapters build the lineage needed to answer that question.
A fault tree for restricted disclosure
The top event in Merehaven’s first confidentiality analysis is:
An authorised peer receives case evidence outside the peer’s current allocation.
The team then maps candidate causal paths. A path may contain several conditions that must coincide:
- source metadata places the evidence in the wrong tenant or case, and later controls trust or fail to reconcile that metadata;
- corpus filtering is absent or late, or stale allocation data makes the evidence eligible and the result proceeds to disclosure;
- cache isolation omits identity, tenant, case, purpose or policy version;
- retrieved content causes the model to request a broader tool call, and the tool accepts it;
- a model or adapter reproduces protected training content;
- a log or evaluation store retains another request, and an unauthorised reader can access it;
- an administrator or supplier path bypasses ordinary access; or
- several individually permitted fragments combine into a prohibited inference.
The tree exposes where a control can cut a path. Pre-retrieval filtering does so only when identity, purpose, tenant, case and policy state are complete, current, correctly bound and fail-closed. Exact cache scoping can cut the cache path. A closed tool grant can cut the tool path even if prompt injection changes model behaviour. A filter on generated prose cannot cut a direct log-store exposure.
Impact is not a single likelihood score
Merehaven does not rely on a product of ordinal likelihood and consequence scores as its sole decision basis. It records the underlying dimensions, uncertainty and evidence so the owner can see what a summary rating would hide:
- number and vulnerability of affected people;
- sensitivity and reversibility of the information or action;
- financial and operational consequence;
- duration and propagation;
- detectability;
- legal or regulatory relevance;
- effect on evidence and challenge rights; and
- confidence in the scenario and available data.
These are evidence labels for a real implementation. In this fictional chapter, a path remains hypothetical unless an executable synthetic test is explicitly reported. Likelihood language is tied to a declared environment:
- observed means the event occurred in a declared test environment or documented real operation;
- demonstrated means a credible path worked under stated conditions;
- feasible means the prerequisites are present but the path was not shown;
- speculative means one or more prerequisites are unverified; and
- not applicable means an enforced boundary removes a required capability.
“Not applicable” needs evidence. If the model has no write-capable tool, an autonomous account change through that tool is outside scope. If an undocumented administrator endpoint still exposes the action, the conclusion is false.
Purpose binding precedes model access
The Evidence Desk does not ask the model whether a use is appropriate. The application checks the declared asset, processing purpose, approved data classes and time-bounded grant first.
The executable laboratory expresses the decision as a record with four outcomes to inspect:
- the grant names the exact asset;
- the grant names the exact purpose;
- every data class is allowed for that purpose; and
- both the grant and the asset are within their valid period.
Where the approved processing policy requires a recorded lawful basis or other processing authority, a missing or expired approved record causes the application to deny access before retrieval. An out-of-purpose data class is denied as well. The record supports governance; its existence does not establish legal sufficiency, which remains subject to privacy and legal review. The required test is that a denied asset is not sent to ranking, model context, cache, telemetry or a downstream processor.
This is a small example of a larger pattern: uncertain language processing begins only after deterministic identity, purpose and scope checks.
Write non-goals before choosing controls
A non-goal limits what an evaluation result can be taken to mean. For ED-RC-01, Merehaven records:
- the release does not serve customers directly;
- it does not decide a complaint or redress;
- it does not cover credit, fraud detection, marketing or employee decisions;
- it does not fine-tune on live complaint evidence;
- it does not grant internet browsing or arbitrary code execution;
- it does not expose payment, account-change or outbound-message tools;
- it does not claim differential privacy for inference;
- it does not claim that a passed red-team suite proves the absence of unknown attacks; and
- it does not treat an internal policy mapping as legal advice.
These statements reduce ambiguity, but they do not remove obligations. A system described as “decision support” can still influence a decision. The interface, review time, evidence display and quality monitoring must show that the human role is real.
The first Merehaven threat record
The release team stores the following record in its assurance repository.
| Field | Synthetic value |
|---|---|
| Record | THR-ED-001 |
| Candidate | ED-RC-01 |
| Claim at risk | A peer receives only evidence authorised for the active case |
| Actor | Authenticated complaint handler |
| Capability | Upload content and query allocated cases |
| Surface | Uploaded evidence entering the retrieval corpus |
| Boundary | Retrieved evidence to model context, then model proposal to tool policy |
| Event | Model proposes a different case identifier |
| Harm if uncontrolled | Cross-case confidentiality breach and unfair case handling |
| Deterministic controls | Pre-ranking scope filter; exact case in tool grant; no generic search tool |
| Supplemental controls | Instruction-like-content flag; output evidence validator |
| Safe test | Inert document requests MH-CASE-999999; user holds only MH-CASE-100042 |
| Required result | No unauthorised document reaches ranking; tool call denied; minimised event retained |
| Residual risk | Inference from several authorised documents; compromised allocation source |
| Owner | Evidence Desk service owner |
| Evidence expiry | Corpus-policy, allocation-service, tool-schema or model-context change |
The safe fixture does not need a persuasive jailbreak. It needs a token that should never change scope. That makes the test repeatable without publishing a reusable harmful prompt.
Boundary decision
Threat record THR-ED-001 binds the approved purpose and capabilities to a versioned system context, asset register, actor matrix, trust-boundary map, prohibited actions, control owners and a safe regression fixture. Misuse, accident and dependency failure are recorded separately so that one convenient attacker story cannot hide other routes to harm.
This is enough to define testable claims, not enough to release. The Evidence Desk now has a boundary within which a model version may change behaviour. It must not silently change who can see data, which evidence can enter context or what the surrounding system can do.
Chapter 2: Where information lives
The Evidence Desk processes one complaint file, yet information from that request can appear in at least six places:
- the source document;
- its search record and vector;
- the assembled prompt;
- a model’s temporary attention state and cache;
- the generated draft; and
- telemetry, review and audit records.
If the bank adapts a model, information may also influence a checkpoint or adapter. If the application calls a tool, it can enter the tool request, response and downstream system. Each location has a different owner, permission model, retention period and deletion path.
Security work begins by naming those locations. “The LLM has the data” is too imprecise to support access control, incident response or a rights request.
Representation is not removal
Language models do not consume a paragraph as an indivisible object. A tokeniser maps text to identifiers from a fixed vocabulary. The model maps those identifiers to vectors and transforms the vectors through a sequence of layers.
That representation change does not make the content harmless. An account reference split into five tokens remains an account reference when the application decodes it. An embedding derived from a restricted document remains linked to that document and may expose attributes through similarity, inversion or downstream use.1 Recoverability depends on the representation, auxiliary model or corpus, access interface and evaluation protocol. An encrypted vector store remains capable of returning the wrong authorised object after decryption if its policy is wrong.
Tokenisation
A subword tokeniser represents frequent strings directly and decomposes less frequent strings into smaller units. Byte-pair encoding, WordPiece, unigram language-model tokenisation and byte-level variants make different segmentation choices. BPE was adapted to open-vocabulary neural translation to represent rare words through subword units rather than a single unknown token.2
Consider a synthetic identifier:
MH-CUST-483921
One tokeniser might preserve common punctuation and split it into pieces resembling:
MH | - | CUST | - | 48 | 392 | 1
Another might operate on bytes or create a different grouping. These are illustrative pieces, not the output of a named tokeniser. The security conclusion does not depend on the exact split:
- a rule that looks for one token ID will be brittle across tokenisers and versions;
- text can change under Unicode normalisation, case folding or whitespace handling;
- token-level length differs from character length and affects cost and truncation;
- segmentation changes detector behaviour, context use and truncation boundaries, so controls must reason over the reconstructed string as well as individual tokens; and
- decoding recombines pieces into readable content.
A secret scanner should therefore operate on the original input and on carefully chosen normalised representations. It should also inspect decoded output. Normalisation needs a domain contract because collapsing characters can alter names, legal text or evidence. Where purpose and records policy authorise retention, the original source remains in its governed system and the detection record identifies the normalised view or transformation version used. The scanner does not create an unrestricted duplicate.
Embeddings
An embedding table maps each token identifier to a vector:
where is the vocabulary size and is the hidden dimension. The row is the starting representation for token . Positional information is then added or incorporated so the model can distinguish the same token in different positions.
The vector is learned for prediction, not for privacy. Similar vectors can reveal semantic or structural relationships. A vector database can also retain document identity, tenant, access labels, timestamps and source locations in metadata. Even when the vector itself is difficult to interpret, the surrounding record can be sensitive.
For Merehaven, every search record therefore carries:
- a stable document and version identifier;
- tenant and case scope;
- sensitivity class;
- purpose tags;
- validity interval;
- source digest;
- revocation state; and
- the embedding model and index version.
The vector does not replace those controls.
Attention routes visible context
The Transformer replaces recurrent processing with attention and feed-forward blocks.3 A decoder-style language model predicts the next token using the tokens already visible in its context.
For one attention head, a layer projects the current hidden states into queries, keys and values:
Scaled dot-product attention calculates:
where masks positions the decoder is not allowed to use and is the key dimension. Each row of is a distribution over visible positions for that query under the implemented mask.
This equation supports three security observations.
First, policy text, user text and retrieved text can all influence the same calculation after the application places them in context. Markup can help the model learn a distinction, but it does not create an access-control boundary.
Second, attention weights are not a complete causal explanation. Later layers, residual paths, feed-forward transformations and interactions among heads affect the output. A colourful heat map should not be presented as proof of why a model produced a statement.
Third, visible context is an information concentration point. A request that combines a customer note, internal policy, staff instruction and tool response has assembled a new sensitive object even when every component was authorised separately.
Multi-head attention and the residual stream
Several heads apply different learned projections, concatenate their outputs and project the result back into the hidden dimension. The layer also contains a feed-forward network applied at each position, normalisation and residual connections.
The residual stream allows information from earlier transformations to continue alongside new computations. This is one reason a single internal activation is not a simple store from which a document can be removed. The model’s behaviour arises from distributed parameters and repeated transformations.
The book uses “knowledge in weights” as operational shorthand. It does not mean a fact occupies one address. A model may reproduce a string because the training process changed distributed parameters, because the prompt contains the string, because retrieval supplied it, or because common language makes it predictable without exposure to the specific record. Attribution needs an experiment.
Decoder inference creates temporary state
At inference, the model transforms the current context into logits over the vocabulary. A decoding rule then selects the next token.
Greedy decoding chooses the highest-logit token. Sampling may apply a temperature, a top- or top- restriction, repetition controls or other rules. The output is appended to the context and the process repeats until a stop condition or limit.
Security evaluation must pin these settings. An extraction result obtained with many sampled continuations under a large query budget is not comparable to one greedy request. A refusal observed once under one seed is not a stable access-control result.
The key-value cache
Recomputing keys and values for all previous tokens at every generation step is wasteful. Serving systems commonly retain key and value states for earlier positions and calculate only the new step. This key-value cache is temporary model state derived from the prompt and generated output.
The cache creates operational questions:
- Is it isolated by tenant, user, session, model and policy version?
- Can prefix sharing cause content from one security scope to influence another?
- Does eviction erase the storage or only remove a reference?
- Is the cache included in a crash dump or diagnostic trace?
- What happens after a user’s entitlement is revoked?
- Can a restored process resurrect stale entries?
A serving optimisation must not weaken the scope that authorised the original prompt. The cache key and reuse policy need the same security attributes as the context they represent.
Context length
For the dense attention equation above, the score matrix has entries for sequence length . Implementations can change memory use and constant factors, and architectures can use sliding windows, sparsity or other patterns. The application should not infer a universal cost curve from the textbook matrix without measuring its chosen model and runtime.
The security trend is nevertheless clear. A larger context can hold more authorised evidence, but also:
- more personal or confidential content;
- more untrusted instructions;
- more stale or conflicting policy;
- a larger cache;
- more text available to logging or support paths;
- higher latency and cost; and
- more opportunities for relevant evidence to be lost among distractors.
The safe target is the minimum context that supports the declared task, not the maximum the model accepts.
Risk hotspots in the model path
The Transformer is one component, but its interfaces expose several distinct hypotheses.
Input and context assembly
The application decides which messages, documents, tool responses and previous turns enter context. A scope failure here can give the model content it should never have received. An instruction-boundary failure can allow untrusted evidence to influence planning.
Feed-forward layers and sparse routing
Some models use a mixture-of-experts arrangement in which a router sends token representations to selected expert sub-networks. Routing can affect capacity, load and timing. It should not be declared a data leak without an observed channel and a capable adversary. The safe statement is narrower: routing, batching and shared infrastructure add implementation state that the threat model should inventory.
Logits and decoding
Scores, token probabilities and repeated queries can expose more than one final string. A public API that returns top-token probabilities creates a different extraction surface from an interface that returns text only. Rate and budget controls should follow the richer interface.
Sampling and stop conditions
An output can continue beyond the useful answer, repeat private context or consume resources. The controller, rather than the model, enforces maximum input, output, time, tool and cost limits.
Training and adaptation move information into artefacts
Pre-training adjusts model parameters across a large corpus. Adaptation changes a base model for a narrower task or domain. The resulting artefacts can include:
- full checkpoints;
- parameter-efficient adapters;
- optimiser state;
- gradient and loss records;
- intermediate checkpoints;
- merged weights;
- quantised exports;
- tokeniser and chat-template files;
- generation configuration; and
- evaluation outputs.
LoRA represents a weight update with lower-rank matrices rather than updating the full base matrix.4 This can reduce trainable parameters and simplify the identity of an adaptation artefact. It does not make the adapter private.
For a base weight matrix , a simplified LoRA form is:
where and are trained low-rank matrices and is a scaling term whose exact parameterisation depends on the implementation. The combined output depends on the base model, adapter, input and decoding. An adapter can influence reproduction of sensitive training content. Merging into an exported weight creates another derivative that deletion must trace.
Merehaven’s first release does not adapt on complaint records. The decision avoids a difficult privacy and deletion surface rather than trying to repair it later. A synthetic-only adapter remains an educational comparison in Chapter 6.
Retrieval keeps content outside weights, not outside risk
Retrieval-augmented generation supplies external text at inference rather than relying only on model parameters.5 This makes sources easier to update and cite. It also introduces an index, ranking process, metadata, caches and a new path for untrusted content.
The control order is:
- authenticate the peer;
- resolve tenant, purpose and current case allocation;
- filter the eligible corpus;
- rank only eligible records;
- validate document version and integrity;
- add the minimum relevant spans to context;
- generate a provisional output;
- validate each material claim against authorised evidence; and
- re-check authorisation when a peer opens a citation.
Ranking the global corpus and removing unauthorised results afterwards is unsafe. Titles, scores, timing, cache entries or context can reveal that a prohibited document exists before the filter acts.
The retrieval system is also responsible for revocation. If policy version 4 is withdrawn, version 4 must become ineligible even if its vector remains near the query. Deletion or restriction from the source must propagate to indexes, caches and derived evaluation fixtures.
Tools turn text into possible action
A model may generate:
tool: retrieve_case
case_id: MH-CASE-100042
That output is a proposal. The application determines whether:
- the tool is present in the model’s current capability set;
- the authenticated peer has an active grant;
- the tenant, purpose and case match;
- the argument names and types match a closed schema;
- the requested impact is within the grant;
- the call is inside token, time, tool and cost budgets; and
- a human approval is required.
The model cannot widen the grant by emitting a different case identifier. Document text may alter model behaviour, but deterministic policy prevents that text from changing the external grant. These are application invariants rather than prompt promises.
Tool responses return to the application as untrusted evidence. A search result, email or document may contain instruction-like text. The context renderer records provenance and a trust label for audit and model conditioning. Those labels do not enforce authority: deterministic controls outside the prompt prevent document content from changing data scope, tool grants, transaction limits or approval requirements.
One fact, five locations, five control families
The synthetic statement “the disputed transaction occurred on 12 May 2026” can be copied, transformed or referenced across five separately governed objects.
Source record. The exact case-document version is controlled by case allocation, data classification, retention, document integrity and any applicable hold.
Search record. A text span, vector and metadata are controlled by ingestion provenance, tenant isolation, pre-ranking authorisation, index version and deletion propagation.
Prompt context. The selected span is controlled by session scope, provider contract, context minimisation, cache isolation and instruction marking.
Generated draft. The statement is controlled by schema, claim-to-evidence validation, provisional status and human review.
Audit record / potential evidence. The application retains document ID, version, span, digest, policy decision and model release rather than copying the entire case paragraph into general telemetry. The record can support a claim only after provenance, integrity, access, retention and relevant completeness are established. Its existence does not prove that the recorded action was correct or authorised.
If the bank adapted a model on the statement, it would add checkpoint lineage, memorisation evaluation and possible retraining or unlearning analysis. Avoiding that copy is a design control.
This five-object trace is deliberately narrower than the complete lineage inventory. KV and response caches, tool requests and responses, provider copies, evaluation fixtures, exports, backups and replicas remain in scope for the wider assessment. A connector in Figure 2.5 means copy, transformation or reference. It does not transfer authority or make deletion propagate automatically.
The information-location inventory
Merehaven records the following fields before an object can enter the Evidence Desk:
| Field | Purpose |
|---|---|
| Object and version | Distinguish the exact source or derivative |
| Owner and custodian | Assign the content decision and technical operation |
| Tenant and matter scope | Establish the first authorisation boundary |
| Data and sensitivity classes | Drive handling, access and incident severity |
| Approved purposes | Prevent convenient reuse |
| Source and rights record | Preserve provenance and lawful authority |
| Creation and transformation | Identify what changed and by which process |
| Storage and region | Locate copies and transfer questions |
| Retention, expiry and hold | Separate ordinary deletion from required preservation |
| Downstream derivatives | Find indexes, caches, checkpoints, logs and exports |
| Access and change evidence | Support investigation and challenge |
| Test hypothesis | State how exposure or corruption would be detected |
For ED-RC-01, one simplified row reads:
| Field | Synthetic value |
|---|---|
| Object | DOC-MH-CASE-100042-v3 |
| Owner | Complaints Operations |
| Tenant and scope | merehaven-retail; MH-CASE-100042 |
| Class | Customer case evidence; restricted |
| Purpose | Complaint investigation and internal review |
| Search derivative | VEC-DOC-MH-CASE-100042-v3 |
| Context rule | Maximum two cited spans for an authorised request |
| Cache | Session, case, model and policy scoped; short expiry |
| General telemetry | No document text |
| Audit record | Source ID, version, span, digest and policy result |
| Deletion action | Remove or restrict source, rebuild index, invalidate cache, review fixtures and holds |
The table does not prove that implementation follows the rule. It identifies the assertions that later tests must exercise.
Deletion follows lineage
Deleting one source row does not remove every derivative. The application needs a graph, not a checklist remembered during an incident.
A deletion or restriction assessment starts at the subject or source and follows:
- raw document;
- cleaned and redacted copies;
- search chunks and metadata;
- embeddings and index snapshots;
- request and response caches;
- support, trace and audit records;
- evaluation or red-team fixtures;
- fine-tuning datasets;
- checkpoints and adapters;
- merged and quantised artefacts; and
- backups, replicas and processor copies.
The resulting action may be delete, expire, restrict, retain under hold, rebuild, retrain, validate unlearning or investigate. The correct action depends on the right, purpose, exception, technical facts and evidence. A model-weight question cannot be settled by deleting an index entry, and a legal hold cannot be ignored because deletion is technically possible.
The location decision
Release candidate ED-RC-01 keeps case-specific knowledge in an authorised evidence store rather than in adapted weights. The location register binds every copy or derivative to an owner, purpose, permission boundary, retention rule and deletion route. Its context and cache scopes are explicit; retrieval filters the permitted corpus before ranking; and the capability inventory records where text can become an external action.
That decision does not make retrieval private. It makes the knowledge surface observable enough to authorise, update, cite, revoke and test. A model, index, cache, trace or tool that cannot be placed in the lineage graph cannot enter the candidate.
Chapter 3: State the privacy claim
Merehaven’s first Evidence Desk release does not fine-tune on complaint records. Case-specific content remains in an authorised retrieval store. That design avoids one training-data exposure, but it does not answer every privacy question.
The application still processes personal data in prompts, retrieved passages, drafts and operational evidence. It can disclose the wrong case through a retrieval defect. It can retain text longer than its purpose permits. It can enable intrusive inference without breaching confidentiality. None of those problems becomes differential privacy merely because a model is involved.
This chapter addresses a narrower decision:
If Merehaven claims that a randomised release is differentially private, what exactly must the claim contain?
The answer begins before epsilon.
Define the data universe
Let be a dataset drawn from a declared domain. A randomised mechanism maps to an output in some range .
The domain description needs operational content:
- What constitutes one record?
- Can a person contribute several records?
- Is a conversation one unit or many messages?
- Can the same event appear in several systems?
- Are records clipped, deduplicated or sampled?
- Which releases share a population and budget?
For a synthetic complaint-statistics exercise, Merehaven defines one contribution as all eligible events from one complaint, bounded to a maximum count before the mechanism runs. That is a complaint-level unit. It is not automatically person-level because one person may have several complaints.
Changing the unit changes the claim.
Choose neighbouring datasets
Differential privacy compares the mechanism’s output distributions on neighbouring datasets.
Two common adjacency relations are:
Add or remove one. and differ by the presence of one protected unit.
Replace one. and have the same size but one protected unit differs.
These relations are not interchangeable. Sensitivity, noise and accounting can change with the choice. “One row differs” is also incomplete when one person can occupy many rows.
Write:
only after the relation has been defined.
For the Merehaven exercise:
when one bounded synthetic complaint contribution is added to or removed from the eligible cohort.
This statement identifies the unit, bound and relation. A user-level training claim would require a different construction that groups and bounds all training examples associated with one user.
The formal guarantee
A randomised mechanism is -differentially private under the declared adjacency relation if, for every pair and every measurable set of outputs ,
The definition quantifies over all neighbouring pairs and all output events. Because the adjacency relation is symmetric in the usual constructions, the comparison applies with and reversed as well.1
When , the mechanism satisfies pure -differential privacy. When , the additive term allows a bounded departure from the multiplicative comparison. A report should not hide delta in a footnote.
This definition yields several immediate corrections to common shortcuts.
- Training two models and comparing one observed sentence cannot prove DP.
- Adding arbitrary noise does not prove DP.
- A low empirical extraction rate does not prove DP.
- Encryption does not produce DP.
- A small adapter does not produce DP.
- A stated epsilon without adjacency and unit is incomplete.
NIST SP 800-226 describes differential privacy as a mathematical framework and organises evaluation around the unit of privacy, privacy parameters, algorithm correctness, trust model, query model, side channels and data-collection exposure.2 That breadth is useful because a mathematically valid mechanism can still be implemented or governed incorrectly.
What epsilon says
Epsilon controls the multiplicative term . For a fixed mechanism, adjacency relation, unit, delta and accounting scope, a smaller epsilon generally gives a tighter bound.
The following values show only the exponential term:
| Illustrative | , rounded |
|---|---|
| 0.1 | 1.105 |
| 0.5 | 1.649 |
| 1.0 | 2.718 |
| 2.0 | 7.389 |
The table is not a policy ladder. It does not say that 0.5 is safe or that 2.0 is unsafe. The practical meaning also depends on the unit, delta, composition, auxiliary knowledge, participation frequency, mechanism and consequences.
Epsilon is not:
- a probability that a person is identified;
- a percentage of records protected;
- a confidence level;
- a cap on every person’s real-world harm; or
- a regulator-approved score.
What delta says
Delta is an additive slack in approximate DP. It should be stated with the same prominence and precision as epsilon.
A team may choose delta relative to the protected population and threat model, but there is no context-free rule in this book. The decision record should explain:
- the eligible population;
- the unit of protection;
- the mechanism and accountant;
- why the selected delta is appropriate;
- how many releases compose;
- whether one person can participate repeatedly; and
- who approved the residual risk.
If composition causes the cumulative delta to reach a nonsensical value, the arithmetic should fail rather than print a favourable label.
Privacy loss is an output-specific random variable
For an output with densities or probability masses and , the privacy loss in one direction is:
The value depends on the neighbouring pair, output and direction. Under the mechanism’s randomness, is a random variable.
Zero probabilities need careful measure-theoretic handling. A toy function that returns infinity whenever either scalar is zero loses the distinction between an impossible event under both distributions and an event possible under only one. More importantly, averaging likelihood ratios for unrelated generated strings is not a privacy accountant.
Formal accounting derives a bound from the implemented mechanism and its composition. Empirical privacy auditing asks whether attacks reveal more than expected. The two evidence streams complement each other; one cannot be renamed as the other.
Sensitivity connects the query to noise
For a numeric function , global sensitivity under an adjacency relation is:
The supremum ranges over all allowed neighbouring datasets. Bounding contribution is often what makes sensitivity finite.
Suppose the synthetic exercise releases a count of eligible complaints and each protected unit contributes at most one. Under add-or-remove-one adjacency, the count’s sensitivity is one. If one person can contribute an unbounded number of complaints while the claim is person-level, the same conclusion does not hold.
The Laplace mechanism and Gaussian mechanism calibrate noise under their respective definitions and conditions. The book does not implement either from scratch as production code. In a real release, use a maintained library, pin the version, verify its adjacency and sampling assumptions, and test the integration against an independent reference where the consequence warrants it.
Composition follows the protected population
Privacy cost accumulates when several mechanisms use overlapping protected data. The elementary sequential-composition result gives:
This bound can be loose. Rényi differential privacy and other accounting frameworks can support tighter analysis for suitable mechanisms.3 Tighter mathematics does not remove the need to identify every release.
Merehaven’s ledger records:
- mechanism and run identifier;
- cohort;
- unit and adjacency;
- epsilon and delta;
- sampling model;
- clipping norm and noise multiplier where applicable;
- steps;
- accountant and version;
- date and owner;
- previous and cumulative budget; and
- downstream release or checkpoint.
The ledger includes experiments, hyperparameter searches and intermediate releases when they expose protected information under the chosen accounting model. Publishing only the final training job can omit most of the cost.
A deliberately limited code example
The Book 04 reference module validates the shape of a DP record and demonstrates elementary composition. It rejects non-finite parameters, missing fields, duplicate mechanism identifiers, incompatible cohorts, different units or adjacency relations, and a composed delta at or above one.
The function does not certify a training loop. It does not implement a mechanism-specific accountant. Its result is labelled basic sequential composition.
This division is intentional. A small dependency-free listing can teach evidence validation and fail-closed composition without pretending to replace specialist privacy software.
Post-processing
If is differentially private, any possibly randomised transformation that has no additional access to the protected dataset beyond preserves the same formal guarantee:
Fixed or public side information may be supplied to without changing this statement. The relevant boundary is access to the protected data, not whether every input to is a constant.
- If a downstream component obtains another data-dependent view of the protected population, the joint pipeline is no longer mere post-processing and requires separate privacy analysis or accounting.
- Releasing several transformations of the same DP output remains post-processing, but querying the protected data again can consume additional budget.
- External retrieval can create confidentiality or authorisation failures while the original DP mechanism’s formal statement remains true.
- Post-processing does not resolve copyright, confidentiality, fairness, accuracy or purpose limitation.
- A synthetic dataset generated by a DP mechanism can inherit the mechanism’s source-data DP guarantee, but it is not automatically unrestricted or factually reliable.
Sampling amplification is conditional
Random subsampling can amplify privacy under specified sampling schemes and accounting results. The factor depends on whether sampling is Poisson, without replacement or otherwise structured, and on how individuals contribute.
“The batch is one per cent of the dataset, so privacy is one hundred times better” is not a valid general rule. The training implementation and accountant must agree on the sampling model.
Group protection is not free
A record-level guarantee does not automatically become a same-parameter guarantee for a group of related records. Group-privacy bounds generally degrade with group size. A bank cannot protect a person who contributes fifty messages by declaring each message a person.
The control is to choose the unit early, group contributions correctly and enforce a contribution bound. Where one household, business or organisation is the meaningful unit, the data pipeline and accountant must support that decision.
De-identification answers a different question
Traditional de-identification methods can be useful for structured releases. They do not produce the same claim as DP.
k-anonymity
A release satisfies -anonymity with respect to declared quasi-identifiers when every released combination of those quasi-identifiers appears in at least records.4
Consider these wholly synthetic rows:
| Area band | Age band | Product | Case theme |
|---|---|---|---|
| North-1 | 40–49 | Current account | Bereavement |
| North-1 | 40–49 | Current account | Bereavement |
| North-1 | 40–49 | Current account | Bereavement |
With Area band, Age band and Product as quasi-identifiers, the equivalence class has size three. It is 3-anonymous under that definition.
It still reveals that every member has the same sensitive case theme. This is a homogeneity problem.
l-diversity
l-diversity requires diversity of a sensitive attribute within an equivalence class.5 It addresses some homogeneity attacks, but distinct values may be semantically similar or distributed very differently from the population.
t-closeness
t-closeness constrains the distance between the sensitive-attribute distribution in an equivalence class and the distribution in a reference population.6 The distance measure and threshold are part of the definition.
These methods require a structured release and declared attributes. They do not prevent model memorisation, secure unstructured text, authorise a search or account for arbitrary auxiliary data.
Pseudonymisation is not anonymisation
In the UK GDPR example used here, pseudonymisation replaces or transforms identifiers and keeps the additional attribution information separately under technical and organisational controls. If Merehaven retains the key or mapping, the result remains linkable and is governed as personal data.7
Anonymisation is a contextual conclusion about whether people are identifiable by means reasonably likely to be used. Removing names is not enough when combinations, free text, rare events or external data restore identity.
Synthetic data also needs its own assessment. A generator may reproduce source records, preserve unique outliers or create inaccurate groups. The team tests duplication, nearest neighbours, membership and extraction, then separately assesses rights, utility and fairness.
Protection claims are not interchangeable
| Technique | Primary claim | Does not establish by itself |
|---|---|---|
| Access control | An identity may perform a permitted operation on an object | DP, anonymity, correct output or lawful purpose |
| Encryption | Content confidentiality against the stated adversary under the selected scheme, key-management and endpoint assumptions | Authorisation after decryption, DP or deletion |
| Pseudonymisation | Direct attribution requires separately held information | Anonymity or freedom from data-protection duties |
| k-anonymity family | Structured equivalence-class property | Protection from every linkage, model leakage or misuse |
| Differential privacy | Bounded distributional influence of a protected unit under stated assumptions | Confidentiality of raw stores, accuracy, fairness or legal compliance |
| Data minimisation | Less data is collected or retained for the declared purpose | A formal privacy guarantee for what remains |
Merehaven’s privacy claim sheet
In the fictional release design, an Evidence Desk record would contain:
| Field | Decision for ED-RC-01 |
|---|---|
| Case-specific fine-tuning | None |
| Case content in model weights by Merehaven adaptation | Not applicable to this release design |
| Case retrieval | Purpose, tenant and case authorised before ranking |
| Prompt context | Minimum cited spans; session and case scoped |
| General telemetry | No unrestricted prompt or response prose |
| Formal DP claim for inference | None |
| Empirical leakage tests | Retrieval isolation, synthetic canaries, extraction probes and log-redaction tests |
| Rights and deletion | Source-to-index, cache, fixture, log and processor lineage |
The optional synthetic aggregate exercise uses a separate record:
| Field | Required entry |
|---|---|
| Protected unit | One bounded synthetic complaint contribution |
| Adjacency | Add or remove one protected unit |
| Mechanism | Named implementation and immutable version |
| Epsilon and delta | Experiment inputs, not banking norms |
| Sampling | Exact scheme |
| Contribution bound | Declared and enforced |
| Accountant | Named method, library and version |
| Composition | Full experiment and release horizon |
| Utility | Error and subgroup measures with uncertainty |
| Approval | Privacy owner and release purpose |
Until every entry is complete and the mechanism matches the accountant, the result cannot be described as a DP release.
Claim acceptance rule
Merehaven may use the phrase “differentially private” for a release only when its record names the data domain, protected unit, contribution bound, adjacency relation, mechanism, output range, , , sampler, trust model, accountant, composition horizon, utility evidence, owner and expiry. The implementation and accountant must describe the same mechanism. Missing fields, an incompatible sampler or unrecorded composition changes the status to claim incomplete; empirical leakage tests cannot fill the gap.
The release sheet therefore keeps epsilon beside its unit, delta, mechanism and lifetime. Compressing those fields into one dashboard number would discard the meaning of the claim.
Chapter 4: Test what can leak
A privacy evaluation should begin with a sentence that an unfavourable result could disprove.
For the Evidence Desk, one claim is:
A peer cannot retrieve evidence outside the tenant and case scope resolved for the current request.
That claim is different from:
The base model does not reproduce a training string.
The first concerns application authorisation and retrieval. The second concerns model behaviour and training-data influence. A single test cannot settle both.
This chapter turns each exposure hypothesis into an adversary, protocol, metric and decision. The attack fixtures remain synthetic and inert.
Name the event before the metric
“Leakage rate” is ambiguous. A useful evaluation record states:
- protected asset;
- adversary identity and access;
- prior knowledge;
- query or compute budget;
- target system and immutable version;
- input construction;
- success predicate;
- severity;
- denominator;
- repeated-trial or sampling method;
- uncertainty procedure; and
- evidence retained.
For example:
An authenticated synthetic principal allocated to
MH-CASE-100042submits 240 requests whose nearest semantic neighbour is a canary document in another tenant. A success occurs if the ranker returns that document’s identifier, title, text, score or citation at any stage.
This definition catches metadata disclosure as well as final prose. It also makes zero successes interpretable: zero out of 240 under the declared cases, not “zero risk”.
Memorisation needs a specific operational target
In this book, a memorisation finding means unexpectedly high recoverability or preference for a specific training sequence relative to declared controls and baselines. Reproduction alone does not establish that the sequence was a member of training data or that training caused the match.
Evidence that appears in an output may have come from:
- the current user input;
- conversation history;
- retrieved documents;
- a tool response;
- a cache;
- adaptation or pre-training;
- general language regularity; or
- a combination of these.
The evaluator isolates paths. A retrieval test disables generation and inspects eligible candidates. A model memorisation test runs without the target in current context or tools. A log test inspects the telemetry projection. Attribution becomes stronger as alternative paths are removed.
Memorisation is also uneven. Duplicated, unusual or highly predictable sequences may behave differently from ordinary records. An average over generic text should not stand in for the rare secrets that matter most.
Membership inference asks a binary question
A membership-inference adversary tries to determine whether a protected unit belonged to a model’s training data. The original supervised-learning attack literature showed how output behaviour can support such inference under particular access and data assumptions.1
An evaluator needs members and non-members drawn from a defensible construction. If non-members come from a visibly different time period, format or population, the attack may learn that difference rather than membership.
For one decision threshold, the confusion matrix is:
| Predicted member | Predicted non-member | |
|---|---|---|
| True member | TP | FN |
| True non-member | FP | TN |
Useful measures include:
and:
Undefined denominators remain undefined. Returning zero can turn “no positive predictions” into apparent perfect safety.
Base rate changes the operational meaning
Consider a wholly synthetic audit with 20 members and 80 non-members:
- TP = 12;
- FN = 8;
- FP = 4; and
- TN = 76.
Then:
- prevalence is 20 per cent;
- recall or TPR is 60 per cent;
- FPR is 5 per cent;
- precision is 75 per cent;
- specificity is 95 per cent; and
- balanced accuracy is 77.5 per cent.
If real-world membership prevalence were much lower, the same TPR and FPR could produce far lower precision. The evaluator should report results under plausible base rates rather than presenting ROC-AUC as the whole operational answer.
Threshold and curve reporting
ROC-AUC summarises ranking across thresholds. It can hide performance in the low-FPR region that matters when false accusations are costly. Report:
- TPR at one or more pre-declared FPR limits;
- precision-recall behaviour for the relevant prevalence;
- confidence intervals or resampling uncertainty;
- calibration if a score is interpreted probabilistically;
- subgroup and duplication slices; and
- the result against a simple baseline.
A membership score should not be converted directly into an epsilon. Formal DP parameters and empirical attack performance describe related but different evidence.
Extraction seeks content
Extraction asks whether an adversary can recover training or otherwise restricted content through model or system interaction. Research has demonstrated training-data extraction from language models under specific access, sampling and ranking procedures.2
A defensive evaluation can study the risk without publishing a reusable harmful payload. It uses:
- synthetic canaries or approved test strings;
- an isolated model or application version;
- benign prompt families;
- a declared generation and query budget;
- deduplication of candidate outputs;
- matching against the authorised synthetic target set;
- human severity review; and
- separate public and restricted evidence records.
The adversary record states whether it sees text only, token probabilities, embeddings, weights or gradients. Those interfaces differ materially.
The public report retains aggregate scores, protocol and non-operational evidence, and does not publish successful payloads. The restricted evaluation record keeps only the authorised material needed for reproducibility, such as a synthetic fixture identifier and digest, a pinned prompt-set version, or an encrypted controlled attachment with access and retention limits. Real extracted secrets are never retained merely to make a test reproducible.
Exact and approximate matches
An exact substring match can be strong evidence for a distinctive, provenance-known target after declared normalisation and comparison with an appropriate reference corpus or non-member baseline. It can still miss minor changes. Approximate measures can help triage:
- character or token edit distance;
- longest common subsequence;
- n-gram overlap;
- semantic similarity; and
- structured-field reconstruction error.
Each has failure modes. Semantic similarity can call two generic sentences close without demonstrating reproduction. Token overlap depends on the tokeniser. Edit distance should define normalisation and denominator. Human review should see the target provenance and the candidate, but only within an authorised environment.
Reconstruction estimates an input or attribute
Reconstruction tries to recover a record, feature or representative input from a model, gradient, aggregate or other observation. Model inversion is one related family.3
The metric follows the object:
- mean absolute or squared error for bounded numeric attributes;
- exact match for closed categorical fields;
- edit distance or field-level accuracy for structured text;
- intersection over union for a set;
- perceptual or task-specific measures for images; and
- success against a pre-declared harmful inference.
No single semantic score can prove that a record was reconstructed. An evaluator should compare with a prior-only baseline. If median income in the cohort already predicts an attribute well, the model may add little adversarial advantage.
Synthetic canaries create a controlled target
A canary is a synthetic sequence inserted deliberately so the evaluator knows its provenance and exposure. The Secret Sharer work formalised an exposure measure based on how highly a model ranks the canary among a defined candidate space.4
For candidate space size and one-based canary rank , the reference laboratory uses:
Top rank gives ; last rank gives zero. The candidate construction, rank procedure and model access are part of the result.
A complete canary report states:
- generation rule and candidate space;
- insertion count and locations;
- training or adaptation version;
- prompt families;
- decoding and rank method;
- total query budget;
- exposure and extraction results;
- uncertainty or repetition;
- false-positive checks; and
- whether the canary resembles natural sensitive content.
Failure to extract the canary does not prove that other data cannot be extracted. A canary is one controlled signal.
Retrieval disclosure needs a system test
The Evidence Desk’s highest-priority confidentiality test does not require membership or extraction machinery. It constructs authorised and prohibited documents whose semantic content is deliberately similar, then verifies:
- tenant and case policy produce the eligible document set;
- ranking receives only that set;
- prohibited identifiers do not appear in candidates, scores, titles or snippets;
- cache keys include the relevant scope;
- generated citations resolve only to eligible versions; and
- opening a citation repeats the authorisation check.
The test runs again after:
- document revocation;
- case reassignment;
- policy-version change;
- session expiry;
- index rebuild;
- model change; and
- cache restoration.
A vector-space nearest neighbour in another tenant should never become a candidate. Noise added after global ranking does not repair that boundary.
System-prompt disclosure need not expose a credential or customer record
A system prompt may be disclosed or inferred. The architecture should assume that possibility.
Treat the prompt as disclosable and never place credentials, private keys or customer records in it.
The prompt must not contain:
- credentials;
- encryption keys;
- hidden entitlements;
- customer secrets;
- irreversible safety dependencies; or
- instructions whose disclosure grants access.
Testing prompt disclosure can still identify policy and intellectual-property exposure. It should not be confused with proving that an application is compromised. If full prompt disclosure leaves the capability and data controls intact, the design has removed a fragile dependency.
Count events and report uncertainty
For successes in trials, the observed rate is:
The Book 04 laboratory reports a Wilson score interval. It returns an error for zero trials and an exact zero or one endpoint at the corresponding observed boundary, while retaining a non-zero uncertainty bound.
Worked calculation: if 0 of 240 declared synthetic trials succeeded for a pinned candidate, the observed sample rate would be 0 per cent and the 95 per cent Wilson interval would be approximately 0 to 1.58 per cent. This hypothetical calculation is not a Merehaven test result. Its bounded interpretation would be:
In this worked calculation, the sample contains 0 successes in 240 trials; the upper end of the 95 per cent Wilson interval is approximately 1.58 per cent.
It is not:
The system has zero leakage.
The trials also need coverage. Two hundred and forty near-duplicate prompts may be less informative than a smaller stratified set that exercises tenant, case, revocation, cache and citation boundaries.
Compare a defence in absolute and relative terms
Suppose one synthetic behavioural test observes 18 successes in 100 trials before a control and 4 in 100 afterwards.
The absolute reduction is:
or 14 percentage points.
The relative reduction is:
or about 77.8 per cent.
The 95 per cent Wilson intervals are approximately 11.7 to 26.7 per cent before and 1.6 to 9.8 per cent after. The comparison is illustrative; it is not a Merehaven production measurement.
If the baseline is zero, relative reduction is undefined. The reference code returns None. If the new rate is higher, the reduction is negative. A metric should expose both outcomes.
Behavioural improvement also does not prove confidentiality. A deterministic scope check may block impact even when the behavioural attack still succeeds.
Severity prevents averaging away the important failure
An overall attack success rate can hide a single high-impact disclosure among many low-impact refusal tests. Merehaven reports at least:
- results by threat family;
- results by consequence;
- full and partial success;
- zero-tolerance classes;
- uncertainty;
- adaptive versus fixed attacks;
- ordinary-task utility;
- false-positive or over-refusal burden;
- latency; and
- cost.
A cross-customer document disclosure is not balanced out by hundreds of successful refusals to benign nonsense. Release gates inspect mandatory scenarios individually.
The evaluator is itself an attack surface
An evaluator consumes model output, attack fixtures, labels and sometimes untrusted content. It needs:
- fixed system and evaluator versions;
- a sealed test split;
- safe fixture provenance;
- independent or diverse judging where feasible;
- deterministic parsers for objective properties;
- protection from prompt injection in evaluated text;
- reviewer blinding where relevant;
- duplicate and contamination checks;
- raw per-trial records;
- an immutable result digest; and
- a correction process.
Using the same model to generate, attack and judge can create correlated errors. A model judge may be one signal, but a deterministic policy failure should not be delegated to it.
The Merehaven leakage protocol
The pre-release protocol for ED-RC-01 contains five suites.
Suite 2: citation and rendering
Every material generated claim must resolve to a current authorised document version, digest and span. Revoked and stale evidence causes abstention or review.
Suite 3: safe memorisation probes
A newly generated canary is tested against the unadapted base model as a negative control for incidental generation or similarity. Canary exposure is measured only for a model or synthetic-only adapter into whose controlled training set the canary was deliberately inserted under a recorded schedule. If the base model’s corpus is unknown, the result is not described as membership or exposure evidence for the new canary. The report states candidate space, insertion schedule, prompts, sampling, budget and limitations.
Suite 4: telemetry minimisation
Synthetic customer and case formats, secrets and instruction-like strings exercise the audit projection. The general event store must retain policy, evidence and decision identifiers without retaining free text.
Suite 5: capability containment
Untrusted evidence proposes an out-of-scope case and an unavailable action. The model may reproduce the proposal; retrieval and tool services must deny it.
Each suite has an owner, minimum coverage, blocking findings, evidence retention and expiry trigger. Changing the model, prompt, corpus policy, index, cache, tool schema or identity service invalidates the corresponding evidence.
The evaluation stop rule
No favourable average can release a candidate with a confirmed cross-scope disclosure. Each result remains attached to its adversary, success predicate, denominator, severity, exact system version and immutable per-trial record. Undefined ratios stay undefined; uncertainty accompanies observed rates; evaluator provenance and contamination checks travel with the report.
Empirical evidence is bounded to the protocol that produced it. A formal privacy claim is bounded separately to its mechanism and accounting record. Neither kind of evidence silently upgrades the other.
Chapter 5: Keep sensitive knowledge out of weights
The easiest sensitive fact to remove from a model is the one that never entered its training path.
Merehaven’s first Evidence Desk proposal assumed that two years of complaint notes would improve the assistant’s “banking knowledge”. That phrase concealed several different needs. The service needed current procedure, case evidence, a reliable internal-note structure and vocabulary familiar to complaint handlers. Only the last two might call for adaptation. Current procedure and case evidence belong in governed retrieval because they change, carry access restrictions and need traceable deletion.
The revised design therefore starts with a routing decision:
| Need | Preferred location | Reason |
|---|---|---|
| Current policy and process | Versioned retrieval corpus | Changes without retraining and supports citations |
| Case-specific evidence | Authorised retrieval at request time | Scope follows the peer, purpose and case |
| Stable output schema | Application template and validator | Deterministic structure does not need to live in weights |
| House terminology | Prompt examples, glossary retrieval or small reviewed adaptation set | Use the least persistent route that meets quality |
| Decision authority | Human and external policy service | Generated text cannot own the outcome |
| Payment or account action | Not exposed to this application | The use case does not require the capability |
This is an engineering preference, not a claim that retrieval is automatically private. A retrieval index can disclose documents, metadata, access patterns and embeddings. The benefit is that the knowledge remains attached to identifiable records, policy and lifecycle controls instead of becoming an opaque influence on a new model artefact.
Minimise before transforming
Data minimisation follows purpose. The question is not “How much can the pipeline ingest?” but “Which fields and records are necessary for the declared outcome?” The ICO describes data minimisation as keeping personal data adequate, relevant and limited to what is necessary for the specified purpose.1 Its current purpose-limitation guidance also requires purposes to be specified and documented, and requires a compatibility and lawful-basis assessment when information is reused.2
Merehaven applies five gates before a document can enter either retrieval or adaptation:
- Purpose: does the proposed use match the approved processing purpose?
- Authority and rights: may Merehaven process the material in this way, including personal-data, confidentiality, contractual and copyright considerations?
- Necessity: which fields, passages or labels are required for the task?
- Quality and provenance: is the source current, attributable, correctly classified and free from unresolved integrity concerns?
- Destination: is the surviving content permitted in retrieval, evaluation, transient context, telemetry or adaptation?
The destination matters because each one creates a different persistence pattern. A short-lived prompt is not equivalent to a checkpoint copied to three registries. A vector record is not equivalent to the source document. A redacted evaluation fixture is not automatically suitable for training.
For a fictional intake of 18,400 document versions, the Evidence Desk might retain 12,700 after purpose and rights review, 9,850 after classification and quality checks, and 7,900 after deduplication and necessity review. It could route 7,620 to retrieval, 220 to an isolated evaluation set and only 60 reviewed, synthetic style examples to an adaptation experiment. These numbers illustrate the ledger; they are not a recommended ratio or a production result.
Counting records is insufficient on its own. A single retained attachment may contain more sensitive information than thousands of public policy pages. The manifest records bytes, tokens, document classes and high-risk fields alongside record counts.
“Internal” is not a rights category
A repository inside the organisation can contain:
- customer and employee personal data;
- special-category or criminal-offence data;
- confidential correspondence;
- legal advice or privileged material;
- third-party reports under limited licences;
- trade secrets;
- regulator or law-enforcement material with handling restrictions;
- obsolete drafts whose use would be misleading; and
- content copied from a source whose provenance was never recorded.
The ingestion manifest therefore asks who supplied each object, which rights or authority support the proposed processing, which contractual limits apply, and when that conclusion must be reviewed. “Owned by the bank” is not accepted as a substitute.
Section 29A of the Copyright, Designs and Patents Act 1988 permits specified copying where the person has lawful access, the computational analysis is solely for non-commercial research, and sufficient acknowledgement is given unless that is impractical. A copy made under the section cannot be transferred or used for another purpose without the copyright owner’s authorisation.3 Commercial model training therefore needs a separate rights analysis and may require permission or a suitable licence.4 The provision does not resolve confidentiality, contract, data-protection or privilege questions. The UK government’s March 2026 copyright and AI report is a policy record, not a general licence for model development.5 A US fair-use decision does not determine the UK position.
Merehaven’s minimum ingestion record is:
| Field | Purpose |
|---|---|
source_object_id |
Stable identity independent of filename |
source_version and source_digest |
Exact bytes reviewed |
supplier and custodian |
Origin and accountable owner |
processing_purpose |
Declared use |
rights_record |
Licence, statutory basis, contract or internal authority reviewed |
personal_data_classes |
Data handled and any higher-risk category |
confidentiality_class |
Access and disclosure constraints |
jurisdiction_and_location |
Relevant processing and transfer context |
valid_from, valid_until |
Temporal eligibility |
retention_rule and hold_status |
Lifecycle decision |
allowed_destinations |
Retrieval, evaluation, adaptation, telemetry or none |
reviewer and reviewed_at |
Accountable approval |
downstream_ids |
Index, cache, fixture, adapter or other derivative |
The record supports a review; it does not prove that a legal conclusion is correct. Legal and privacy owners remain responsible for the conclusion and its scope.
A transformation is not provenance
Redaction, pseudonymisation, anonymisation and synthetic generation answer different questions.
Redaction replaces detected content. It can reduce exposure in a declared field or text stream, but a pattern library has false negatives. Names, account references, free-form addresses and contextual identifiers do not obey one regular expression. A replacement can also leave enough surrounding information to identify a person.
Pseudonymisation separates an identifier from additional information needed to attribute the record to a person. The ICO is explicit that pseudonymised information remains personal data for a party able to reconnect it, and that the additional information must be kept separately and protected.6
Anonymisation aims to make people no longer identifiable considering means reasonably likely to be used. It is a property of the released information in context, not the name of a transformation function. The ICO’s 2025 anonymisation guidance was under review for Data (Use and Access) Act changes at this edition’s cut-off, so a real assessment must check the current version.7
Synthetic data is generated rather than directly observed. It can support testing when source data cannot be used, but its privacy depends on how it was produced and evaluated. A generator trained on sensitive records may reproduce or reveal them. A perfectly private generator can still create unrealistic data that makes an evaluation worthless.
Merehaven never overwrites a source and calls the result clean. It creates a new immutable version with:
- the input digest;
- transformation code and configuration versions;
- detection rule versions;
- counts by declared pattern;
- reviewer and exceptions;
- output digest;
- destination approval; and
- known limitations.
The protected source remains under its own retention and access policy. The transformed derivative may have a different policy, but its lineage cannot disappear.
Discovery tools are measurement instruments
Personal-data and secret scanners help triage a corpus. They do not prove that the remaining text is anonymous, lawful or safe to train on.
A defensible discovery evaluation includes:
- a labelled synthetic and approved test set;
- categories relevant to the actual corpus, languages and document formats;
- normalisation and optical-character-recognition behaviour;
- precision, recall and severity by category;
- false negatives under misspelling, spacing and formatting variation;
- nested archives, tables, images, comments and document metadata;
- secrets, credentials and private keys as a separate control family;
- reviewer disagreement;
- a quarantine path for uncertain records; and
- a rule for scanner or corpus changes that invalidate evidence.
The pipeline scans before tokenisation and again after format conversion because conversion can expose or lose text. It scans structured metadata separately from body content. It does not claim that tokenisation reconstructs properly removed information.
For telemetry, the reference laboratory deliberately recognises only fictional formats:
import re
from reference_implementation import RedactionRule, redact_for_logging
rules = (
RedactionRule(
"synthetic-customer",
re.compile(r"MH-CUST-\d{6}"),
"<SYNTHETIC_CUSTOMER>",
),
RedactionRule(
"synthetic-case",
re.compile(r"MH-CASE-\d{6}"),
"<SYNTHETIC_CASE>",
),
)
result = redact_for_logging(
"MH-CUST-123456 opened MH-CASE-654321.",
rules,
)
assert "MH-CUST-123456" not in result.redacted_text
assert result.replacement_counts == (
("synthetic-customer", 1),
("synthetic-case", 1),
)The function checks type, rule identity, literal replacement and idempotence contracts. It also refuses a rule that leaves an observed matched value in the result. Those checks make the example testable; they do not turn two synthetic patterns into a general personal-data detector.
A grounded answer is a set of traceable claims
“The answer cited three documents” says little about whether a specific sentence is supported.
The Evidence Desk assigns each material proposition a stable claim identifier. Its evidence record contains:
| Field | Meaning |
|---|---|
claim_id |
Stable proposition identity within the draft |
claim_text |
Provisional generated statement |
source_object_id |
Stable source identity |
source_version |
Exact version used |
source_digest |
Integrity reference for reviewed bytes |
span_locator |
Page, paragraph, table cell or character range |
valid_at |
Time for which the source was eligible |
retrieval_policy_digest |
Exact policy decision and corpus snapshot |
support_relation |
Supports, contradicts, qualifies or does not address |
review_status |
Machine check, human accepted, human corrected or unresolved |
An entailment score can help prioritise review, but it does not confer authority. Deterministic checks verify that the source version exists, the digest matches, the span is within bounds and the peer remains authorised. A reviewer resolves substantive support and contradiction.
The displayed answer distinguishes:
- directly supported statements;
- calculations derived from cited inputs;
- uncertainty or missing evidence;
- model-generated organisation or wording; and
- the human’s final decision.
This avoids a citation becoming decoration at the end of a fluent paragraph.
Retrieval creates its own attack surface
Keeping knowledge outside weights changes the risks rather than removing them.
Ingestion poisoning. A legitimate upload channel can introduce false facts or instruction-like text. Provenance, quarantine, integrity review and corpus admission policy control whether the object enters an active index.
Indirect prompt injection. Authorised evidence can contain language that changes model behaviour. Evidence is marked as untrusted data, while tool and data authority remain outside the model.
Stale or revoked evidence. An old vector record can survive after the source is withdrawn. Index rebuilds, tombstones, cache invalidation and open-time authorisation need testable service-level objectives.
Metadata disclosure. Titles, scores, document counts, timing and “no result” behaviour can reveal sensitive relationships even when body text is hidden.
Embedding and index exposure. Embeddings can preserve information about source content, and the index is a concentrated derived store. It receives access, encryption, backup, deletion and monitoring controls appropriate to the source sensitivity.
Cross-scope caching. A result cache, prefix cache or response cache can bypass a correct retriever if its key omits tenant, principal, purpose, case, policy version or corpus snapshot.
Citation confused deputy. A generated link can ask a document service to use the application’s broad identity instead of the peer’s bounded identity. Opening the source repeats policy with the human principal.
OWASP’s 2025 vector and embedding category is useful as a coverage prompt, but it is not an access-control design.8 Merehaven keeps the policy invariant and threat tests specific to its architecture.
Logs are concentrated datasets
An observability stack can collect the query, retrieved passages, system policy, generated draft, reviewer edits, tool arguments, identifiers, timing and errors in one place. That combination may be more sensitive than any single source store.
The Evidence Desk separates three records:
- Operational metrics: counts, latency, resource use and bounded error codes without prompt text.
- Audit evidence: principal pseudonym, purpose, policy result, corpus digest, evidence references, model and prompt versions, action proposal and approval result.
- Controlled diagnostic capture: a sampled, time-limited and separately authorised payload available only when the issue cannot be investigated from the first two records.
Raw prompts and responses are off by default. Enabling diagnostic capture requires a purpose, owner, expiry, access group and deletion test. Vendor-side retention, abuse monitoring, support access and regional processing are part of the data-flow and contract review.
A prompt-tracing product is not granted an exemption from minimisation because it is called observability.
Erasure is a routed decision, not one delete call
Under UK GDPR Article 17, the right to erasure applies in specified circumstances and is not absolute. The ICO’s guidance also addresses recipients and copies when personal data has been disclosed.9 Whether a particular right applies, an exemption matters, or a model artefact processes identifiable personal data requires case-specific legal and privacy analysis.
Merehaven uses this engineering route:
- authenticate the requester and scope the request;
- determine the applicable right, data and any exemption or retention duty;
- place an immediate future-use block where appropriate;
- locate the information through source, derivative, processor and recipient lineage;
- delete, restrict, suppress or retain under hold according to the approved decision;
- rebuild or invalidate indexes, caches and derived datasets;
- assess checkpoints, adapters, merged weights and downstream models rather than assuming their status;
- test the effectiveness of the chosen action;
- notify processors or recipients where required and track completion; and
- retain a minimised decision record, limitations, reviewer and response.
Deleting a source row does not prove that replicas, backups, embeddings, logs or vendor stores have been addressed. Deleting a vector record does not untrain a model. Removing an adapter removes that artefact’s contribution from one declared serving composition; it does not perform record-level unlearning or find merged and exported copies.
Machine unlearning is a family of methods whose claim and evaluation must be stated precisely.10 Some research provides formal guarantees under declared algorithms and assumptions; other work reports empirical change under selected attacks or utility tests.11 A method might reduce influence under one extraction or membership protocol without reproducing a retrained-from-scratch model. Approximate suppression is not automatically legal erasure. Conversely, retraining is not automatically required for every request. The approved response follows the facts, applicable law, technical evidence and retained obligations.
The reference planner exposes gaps instead of asserting success:
from datetime import UTC, datetime, timedelta
from reference_implementation import LineageNode, plan_deletion
now = datetime(2026, 7, 28, 9, 0, tzinfo=UTC)
nodes = (
LineageNode(
"source-case-17",
"source",
frozenset({"subject-17"}),
("vector-row-17", "adapter-checkpoint-4"),
True,
),
LineageNode(
"vector-row-17",
"retrieval-index",
frozenset(),
(),
True,
),
LineageNode(
"adapter-checkpoint-4",
"adapter",
frozenset(),
(),
False,
expires_at=now + timedelta(days=30),
),
)
plan = plan_deletion("subject-17", nodes, now)
assert tuple(step.action for step in plan.steps) == (
"delete",
"expire",
"delete",
)The output orders downstream action before the source. It says expire for the non-deletable synthetic adapter because this fixture declares an expiry. A node with neither targeted deletion nor expiry is marked investigate. A production rights workflow still needs the legal decision, processor response and effectiveness evidence.
Corpus release checkpoint
Corpus snapshot ED-RC-01 can be promoted only while all of these conditions hold:
- every active object has immutable source identity, digest, provenance, classification, rights review, destination approval and current validity;
- trusted tenant, purpose, case or global-policy entitlement, sensitivity, time and grant state construct the candidate corpus before semantic ranking;
- each retrieved passage carries its source version, digest, span and policy decision, and opening a citation repeats authorisation;
- uploads and retrieved text remain untrusted data, while admission, tool and instruction authority stay outside the model;
- source revocation exercises tombstone, index rebuild, cache invalidation and citation-open tests;
- ordinary telemetry excludes prompts, evidence and drafts; exceptional capture has a named purpose, owner, scope, expiry and deletion test; and
- a rights request traverses sources, replicas, indexes, caches, processors and model artefacts, recording what was deleted, restricted, expired, retained or left for investigation.
That checkpoint keeps live case facts and changing policy out of model adaptation. The remaining question is narrower: can a reviewed, non-sensitive corpus improve structure or terminology enough to justify another persistent artefact? The answer must come from a measured adaptation experiment, not from the convenience of fine-tuning.
Chapter 6: Adapt and collaborate under constraints
Adaptation creates a new persistent artefact. Before choosing a technique, the Evidence Desk team must show why retrieval, prompting, deterministic templates and interface design do not meet the need.
Chapter 5 left one possible experiment: a small adapter trained on reviewed synthetic examples might improve the structure and terminology of internal drafts. It would not receive live complaint evidence, decide a case or acquire a new tool. The comparison must beat a simpler prompt-and-template baseline by enough to justify training data, evaluation, artefact lineage and operational cost.
That order prevents a catalogue of privacy-enhancing technologies from becoming a shopping list. Each technique protects a particular boundary under assumptions. Adding all of them can create more code, keys, dependencies and failure states without addressing the dominant threat.
Choose the technique by the observer and asset
The first line of a technique-selection record names:
- the protected asset;
- the observer or adversary;
- the information the observer can see;
- the computation that must remain possible;
- the output that may legitimately be learned;
- the integrity and availability requirements;
- the trust and collusion assumptions;
- the permitted residual leakage; and
- the evidence needed for release.
Only then does the team compare methods.
| Technique | What it can change or protect | What it does not establish by itself |
|---|---|---|
| Governed retrieval | Keeps changing facts in a controlled external corpus | Privacy of embeddings, correct authorisation or safe generation |
| LoRA or QLoRA | Reduces trainable and stored adaptation parameters | Differential privacy, non-memorisation or record-level deletion |
| DP-SGD | Can bound the influence of a declared protected unit under a valid mechanism and accountant | Confidentiality of raw training inputs from the training operator |
| Federated learning | Moves training to participant locations so raw records are intended to remain local | Confidentiality of updates, resistance to poisoning or privacy of the final model |
| Secure aggregation | Hides an individual update from an aggregator under a protocol threat model | Correctness of an update or privacy of the released aggregate and final model |
| General MPC | Computes an agreed function over distributed private inputs under a protocol model | Safe outputs, low cost, authorisation or participant honesty beyond the protocol |
| Homomorphic encryption | Permits selected computation over ciphertext | Access-pattern secrecy, output privacy, key safety or support for arbitrary efficient workloads |
| Confidential computing | Protects data in use inside an attested hardware-based environment | Safety of admitted code, host-controlled input/output, side-channel immunity or correct authorisation |
For ED-RC-01, governed retrieval already keeps case facts current and scoped. Differentially private training would not repair a cross-tenant retrieval bug. Homomorphic encryption would not make an unsupported draft reliable. Federated learning would introduce participant and aggregation risks without a cross-entity training need. The default remains no private fine-tune.
LoRA changes fewer parameters, not fewer obligations
Low-Rank Adaptation freezes an existing weight matrix and learns a low-rank update. One common representation is:
where and are trainable matrices, is the chosen rank and scales the update.1
For this convention,
This can reduce training memory, trainable parameter count and per-variant storage. It can also make it easier to keep separate task variants. None of those properties bounds the influence of one training record.
The served behaviour depends on more than the adapter:
where is input, represents tokenisation and decoding, is current context and is surrounding application policy. Sensitive influence can appear in the combined output even though the base matrix is frozen.
QLoRA keeps a quantised base model and trains low-rank adapters to reduce memory requirements.2 Quantisation does not create a privacy guarantee. A DP claim for LoRA or QLoRA depends on the actual per-sample-gradient path, optimiser, quantisation path, library, sampling, clipping, noise and accountant versions. Compatibility should be demonstrated, not inferred from the method names.
Merehaven’s adapter record includes:
- immutable base-model and tokenizer digests;
- LoRA target modules, rank, scale and dropout;
- training-code, optimiser and library versions;
- source and evaluation manifests;
- full, quantised and merged artefact identities;
- canary, membership and extraction results;
- intended serving composition;
- downstream exports and caches;
- approval and expiry; and
- the tested removal and rollback procedure.
Deleting one adapter is an artefact-lifecycle action. It may remove the adapter from a declared serving composition, but it does not locate merged weights, quantised exports, checkpoints, optimiser state, logs or downstream copies. It is not record-level unlearning.
DP-SGD has a specific operation order
Differentially private stochastic gradient descent modifies a training procedure so each protected unit has a bounded contribution before calibrated noise is added. The original DP-SGD work combines per-example clipping, noise and privacy accounting.3 NIST SP 800-226 emphasises that a useful claim must also identify the privacy unit, neighbouring relation, mechanism and composition.4
The equations below pin one convention rather than describing every DP-SGD implementation. Let a dataset contain protected units, choose a declared expected lot size with , and set . At step , Poisson sampling includes each unit independently with probability , producing a random set . The neighbouring relation is add or remove one protected unit. For each sampled unit, first compute:
Clip each gradient independently to a declared norm :
Add Gaussian noise with multiplier to the clipped sum, then normalise by the declared expected lot size :
The optimiser uses . Privacy accounting must use this exact Poisson sampler, expected-lot-size normaliser, clipping rule, Gaussian mechanism, step count, adjacency relation and composition. A fixed-cardinality sampler or realised-batch-size normaliser is a different mechanism and needs a matching analysis.
Several details can invalidate a claim:
- a “record” contains several correlated events for one person while adjacency protects one event;
- microbatching changes the effective protected unit;
- gradient accumulation is omitted from accounting;
- the sampling implementation differs from the accountant’s assumption;
- clipping occurs after examples have been combined;
- distributed workers expose unclipped contributions to an observer outside the threat model;
- training restarts or hyperparameter searches consume privacy budget without being recorded;
- noise is calibrated to a different clipping convention;
- an accountant conversion silently changes ; or
- a library update changes per-sample gradient behaviour.
The reference laboratory does not implement a training loop. It validates the release record and performs only elementary sequential composition:
from reference_implementation import DPRecord, basic_compose
round_1 = DPRecord(
mechanism_id="synthetic-adapter-run-01",
cohort_id="synthetic-style-cohort",
epsilon=1.1,
delta=1e-6,
adjacency="add-or-remove-one-synthetic-example",
unit_of_protection="synthetic-example",
sampling_model="poisson",
clipping_norm=1.0,
noise_multiplier=1.3,
steps=120,
accountant="rdp-accountant-v1.0",
)
round_2 = DPRecord(
mechanism_id="synthetic-adapter-run-02",
cohort_id="synthetic-style-cohort",
epsilon=0.7,
delta=1e-6,
adjacency="add-or-remove-one-synthetic-example",
unit_of_protection="synthetic-example",
sampling_model="poisson",
clipping_norm=1.0,
noise_multiplier=1.5,
steps=80,
accountant="rdp-accountant-v1.0",
)
upper_bound = basic_compose((round_1, round_2))
assert upper_bound.epsilon_upper_bound == 1.8
assert upper_bound.delta_upper_bound == 2e-6
assert upper_bound.method == "basic sequential composition"The numeric inputs are fictional records, not a recommended policy or a claimed accountant output. The function checks consistency and sums declared bounds. It does not prove that either mechanism was implemented correctly and does not replace a mechanism-specific accountant.
The privacy-utility frontier must be measured
More clipping can distort useful gradients. More noise can reduce the information learned from individuals while also reducing task performance. The result is not one universal curve because it changes with model, data, optimiser, task, protected unit, sampling and metric.
Merehaven’s comparison plot would show:
- schema completion and factual-support measures;
- ordinary-task refusal burden;
- extraction and membership results;
- epsilon and delta from the pinned accountant;
- clipping and noise parameters;
- uncertainty over repeated seeded runs;
- training and serving cost;
- subgroup slices; and
- the non-private prompt-and-template baseline.
A lower epsilon is a tighter mathematical bound under the declared mechanism. It does not guarantee that the model is useful, fair or secure. A failed extraction test does not upgrade a non-DP mechanism into DP. A strong DP record does not authorise the underlying data use.
For the synthetic-only adapter, a DP mechanism may be unnecessary because the fixtures contain no personal data. Running the experiment can still teach the release process, but the team must not market the result as protection of customer records that never entered the dataset.
Federated learning changes topology
Federated learning coordinates training across participants that retain local datasets. In a simplified weighted aggregation round:
where , , and every , so the denominator is positive. The aggregation authority records as either a verified eligible-example count or an approved non-data-size weight; it is not accepted merely because a client declared it. The original federated averaging work focused on communication-efficient learning from decentralised data.5
Raw records are intended to remain at the participant. Information can still leave through:
- gradients, weight deltas or adapter updates;
- participation and dropout patterns;
- update sizes and timing;
- intermediate and final models;
- evaluation outputs;
- error messages and diagnostics; and
- maliciously chosen queries or model states.
Published gradient-reconstruction work demonstrates that shared gradients can reveal information under particular assumptions.6 Its applicability depends on model, batch, observation and optimisation access, but it rules out the slogan that local raw data alone makes federation private.
A federation threat record names:
- whether the coordinator is honest, curious or malicious;
- how many participants may collude;
- whether clients may be malicious or Sybil identities;
- which party sees an individual update and when;
- how clients authenticate a round and model version;
- how clipping is enforced or attested;
- where any DP noise is added;
- the secure-aggregation threshold;
- dropout and recovery assumptions;
- replay, rollback and participant-revocation controls;
- poisoning and backdoor evaluation;
- output and final-model access; and
- who can stop or unwind a round.
Central DP and local DP expose different intermediates. If the coordinator sees an unclipped or unnoised individual update before central aggregation, the final DP release claim does not hide that update from the coordinator. Local DP changes the message before it leaves the participant, usually with a different utility cost. The record must show the exact noise location.
Merehaven includes federation only as a fictional research sandbox using generated event patterns. No real institution participates, no financial-crime data is exchanged, and no regulator position is claimed. Any real cross-entity project would require separate review of confidentiality, privacy roles, competition, financial-crime restrictions, sanctions information, tipping-off, model ownership, participant exit and supervisory expectations.
Secure aggregation hides an update, not its quality
A secure-aggregation protocol can let a coordinator learn the aggregate of participant updates without learning each update in the clear, subject to its participation, dropout and collusion assumptions. Practical protocols have been designed for federated settings with many users and dropouts.7
The protocol still needs answers to:
- Which participant identities are admitted?
- What is the minimum aggregation set?
- Which collusions can reveal an update?
- How are dropouts recovered without exposing masks or shares?
- Can a participant submit an unbounded or malformed update?
- Is clipping verified before aggregation?
- Can an attacker replay an old update or round?
- Who learns the final aggregate and model?
- What happens when the threshold is not reached?
Encryption can hide a malicious update from inspection while it poisons the model. Integrity controls therefore sit beside confidentiality: authenticated rounds, schema and dimension checks, bounded norms, robust aggregation research, canary tasks, anomaly evidence, staged release and rollback.
Secure aggregation also does not prevent membership or extraction attacks on the final model. Differential privacy can complement it, but the composition and trust model must say who sees what before noise is applied.
MPC, homomorphic encryption and confidential computing differ
NIST’s privacy-enhancing cryptography project describes MPC as jointly computing over distributed private inputs and fully homomorphic encryption as computing over encrypted data.8 These are families of techniques, not one performance profile.
General MPC distributes a computation across parties so the protocol reveals only the permitted output under its security model. The design must specify honest or malicious adversaries, corruption threshold, abort and fairness behaviour, preprocessing, communication, authentication and output handling. A permitted output can itself reveal sensitive information, so minimisation or DP may still be required.
Homomorphic encryption lets an evaluator perform supported operations on ciphertext so decryption yields the corresponding operation on plaintext. Scheme, parameter and circuit choices determine correctness, security, precision, ciphertext expansion and cost. It does not automatically hide access patterns, message size, timing or the final output from its recipient. Key generation, custody, rotation and threshold decryption remain system controls.
Confidential computing protects data in use by running admitted code in a hardware-based, attested trusted execution environment.9 In a common deployment, a relying party evaluates attestation evidence against verifier policy before a key broker releases a scoped key or a controller admits the workload. The trusted computing base, firmware and microcode, debug state, verifier policy, key broker, rollback protection and supply chain all matter. The host still controls input, output, scheduling and network paths, and side-channel claims require workload-specific evidence.
A useful combination might run a small approved statistic through MPC, apply DP to the released statistic and execute one participant’s computation inside an attested environment. The assurance case still needs a separate claim and test for each layer. “Encrypted throughout” is not a specification.
Technique decision record: ED-RC-01
For the current Evidence Desk candidate, the release group records:
| Decision field | ED-RC-01 result |
|---|---|
| Knowledge need | Current case and policy evidence |
| Primary technique | Purpose-bound, authorised retrieval |
| Private fine-tune | Rejected for this candidate |
| Behavioural experiment | Optional synthetic-only LoRA adapter |
| DP claim | None for the production candidate |
| Federation | No production use; fictional research exercise only |
| Cryptographic collaboration | No workload need established |
| Confidential computing | Evaluate later only if the serving threat model requires protection from host operators |
| Dominant unresolved risk | Retrieval, citation and reviewer-control failure |
| Revisit trigger | Quality evidence shows the prompt-and-template baseline cannot meet the declared drafting task |
The production candidate rejects private fine-tuning because authorised retrieval and a deterministic template already meet the identified knowledge and structure needs, while adaptation would add a persistent artefact without controlling the dominant retrieval, citation or reviewer risks. DP-SGD, federation and privacy-enhancing cryptography do not repair those boundaries.
The decision reopens only if blinded evaluation shows a material, repeatable failure of the prompt-and-template baseline on the approved drafting task. Any proposal must then name the protected asset and observer, use a reviewed non-sensitive corpus, beat the baseline across utility and safety measures with uncertainty reported, and supply complete data, base-model, adapter, merged-export, accountant, removal and rollback lineage. Until that evidence exists, no adaptation technique enters the serving architecture.
Chapter 7: Secure the serving path
A model digest identifies one file. The Evidence Desk release contains far more:
- base weights and any adapter;
- tokenizer, chat template and generation configuration;
- prompt-policy and output-schema versions;
- retrieval and tool policy;
- runtime image and system libraries;
- application dependencies;
- corpus-policy and index identities;
- evaluation fixtures and results;
- approval state; and
- the deployment and rollback policy.
Serving the right weights inside the wrong runtime is still the wrong release. The security unit is the admitted composition.
Build identity before runtime identity
Merehaven does not promote an artefact copied from a developer workstation. A controlled build starts from reviewed source and declared dependencies, produces isolated outputs, records provenance and makes the release subject to independent admission.
NIST’s Secure Software Development Framework supplies high-level practices for secure software production and acquisition.1 SLSA version 1.2 separates source and build tracks and uses provenance to describe where, when and how an artefact was produced.2 These frameworks organise evidence; they do not make an unreviewed model safe.
The Evidence Desk path is:
- approved source revision and dependency lock;
- isolated build using a pinned builder identity;
- software, model and data bills of material;
- static, dependency, secret, licence and unsafe-serialisation checks;
- unit, security, privacy, quality and compatibility tests;
- canonical manifest over every serving component;
- provenance attestation and authorised signature;
- registry admission under an immutable identity;
- deployment-policy verification; and
- staged release with evidence-linked rollback.
A digest is identity, not authenticity
Unequal SHA-256 digests prove that two byte sequences differ; equal digests provide a collision-resistant identity check. Neither result says who built, reviewed or approved the bytes. A signature can authenticate a signed manifest under a trusted key and verification policy, but it does not establish that the signed artefact is safe.
The reference laboratory demonstrates the boundary:
from reference_implementation import (
ArtefactRecord,
sha256_bytes,
signed_manifest_payload,
)
model_bytes = b"synthetic-model-artefact"
tokenizer_bytes = b"synthetic-tokenizer-artefact"
records = (
ArtefactRecord(
"model",
len(model_bytes),
sha256_bytes(model_bytes),
),
ArtefactRecord(
"tokenizer",
len(tokenizer_bytes),
sha256_bytes(tokenizer_bytes),
),
)
payload_for_external_signer = signed_manifest_payload(records)
assert b'"artefact_id":"model"' in payload_for_external_signer
assert b'"artefact_id":"tokenizer"' in payload_for_external_signerThe function creates canonical bytes. It deliberately does not invent a signing key or algorithm. Production signing belongs to an approved service with protected keys, verifiable signer and builder identity, rotation, revocation, audit and separation of duties.
The manifest covers:
| Component | Required identity |
|---|---|
| Base and adapter | Digest, format, source and training lineage |
| Tokenizer and template | Digest and compatibility record |
| Runtime image | Immutable image digest and dependency inventory |
| Generation settings | Versioned canonical configuration |
| Prompt and policy | Digest, owner and approval |
| Tool schemas | Exact operations, argument schema and capability limits |
| Retrieval policy | Version and eligible corpus snapshot |
| Evaluation bundle | Fixture, evaluator and result digests |
| Deployment policy | Environment, traffic, quota and rollback rules |
Model registries should reject mutable tags as an admission identity. A friendly label may point to an immutable digest, but the deployed workload and evidence always name the digest.
Four zones, six request-data flows and a control plane
Merehaven uses four responsibility zones:
- Workforce edge: managed staff device and user interface.
- Application zone: gateway, session, policy, retrieval orchestration and output validation.
- Model zone: tokenisation and generation under a workload identity.
- Storage zone: source documents, authorised search, configuration, audit and artefact registries.
The request and case-data plane permits six flow families:
- workforce client to gateway over the authenticated application channel;
- gateway to the workforce identity and policy decision services;
- application service to the retrieval service with principal, purpose and case scope;
- retrieval service to the authorised search and document stores;
- application service to the model service and its bounded response channel; and
- each service to a one-way telemetry collector using a minimised schema.
Here “one-way” describes application authority: a serving workload may write allow-listed telemetry, while the collector receives no capability to initiate a serving request. Transport acknowledgements and bounded collector responses for flow control or schema rejection remain possible. Likewise, “the storage zone cannot initiate” below prohibits a new application-layer request; it does not prohibit response packets on a connection opened by an authorised caller.
The model has no direct storage path. The workforce client cannot reach the model or search index directly. The storage zone cannot initiate a request into the application. The telemetry collector cannot become a query proxy back into serving.
Bootstrap and control-plane communication is separate and explicitly allowed:
- workloads resolve names and validate time and trust material through approved infrastructure services;
- workloads authenticate to the identity, certificate, credential and secret services needed for short-lived service identity;
- the deployment controller supplies admitted configuration and immutable artefact identities; and
- approved collectors receive health and security state without becoming serving intermediaries.
These paths are mutually authenticated, destination-restricted and logged. They carry no case prompt, retrieved document or generated draft unless a separately declared protocol requires it. NIST SP 800-207A reinforces that cloud-native access decisions need application and service identities as well as user and network attributes.3
Network segmentation does not replace application authorisation. A permitted application service can still ask for the wrong case. Every storage request carries the bounded human and service context, and the resource service enforces it.
Human identity becomes corpus scope
Authentication establishes which identity presented a credential. Authorisation determines what that identity may do with a particular object for a particular purpose at that time.
NIST SP 800-207 frames zero trust around resource-focused decisions rather than implicit trust from network location.4 For the Evidence Desk, a request moves through:
- workforce authentication;
- issuer, audience, signature, time and client validation;
- session and device policy;
- current role and employment status;
- declared processing purpose;
- tenant and active case allocation;
- sensitivity ceiling and document policy;
- authorised corpus construction; and
- a short-lived capability for the exact downstream operation.
OAuth 2.0 is an authorisation framework; OpenID Connect adds an identity layer for authentication.5 Neither supplies Merehaven’s object-level case policy. RFC 9700 updates OAuth 2.0 security practice, including privilege restriction and replay protections such as sender-constrained tokens where appropriate.6 Merehaven uses maintained libraries and central validation rather than hand-parsing a JSON Web Token.
Tokens are:
- short-lived;
- audience and resource restricted;
- free of customer prose;
- scoped to the smallest supported operation;
- protected from logging and URL leakage;
- rotated or invalidated with the session;
- rejected at exact expiry; and
- unable to widen corpus scope merely because they carry a broad role.
The retriever resolves current case allocation at request time. A role such as complaint-handler is not permission to search every complaint.
Service identity remains separate from human identity. The retrieval service authenticates the application workload while enforcing the propagated, integrity-protected human scope. It does not substitute its broader technical identity for the peer’s policy context.
Transport protection has a boundary
The current TLS best-practice record is the complete BCP 195 set, which at the edition cut-off contains RFCs 8996, 9325 and 9852.7 RFC 9852 requires a new protocol using TLS to default to TLS 1.3; the current TLS 1.3 specification is RFC 9846.8 Merehaven’s new service protocols therefore require TLS 1.3. A documented TLS 1.2 compatibility path applies only to an existing protocol integration after cryptographic and operational review. Configuration, certificate and trust-store evidence must agree with the claim.
For internal service calls, mutual authentication can bind the channel to workload identities. That requires:
- correct hostname or service-identity verification;
- controlled trust anchors;
- automated issuance and renewal;
- revocation or rapid rotation;
- mapping certificate identity to application policy;
- protection of private keys;
- failure behaviour at expiry; and
- tests against unintended trust paths.
TLS protects content and integrity in transit under its endpoint and cryptographic assumptions. It does not hide source and destination addresses, all packet length and timing patterns, endpoint plaintext, authorised misuse or information revealed by the response. TLS 1.3 early data also has replay considerations, so a consequential operation must not rely on 0-RTT without an explicit replay-safe design.
Application-layer encryption is added only for a named observer or custody boundary. It creates key-distribution, inspection, rotation, recovery and incident-response work. “Encrypt twice” is not a threat model.
Secrets stay outside prompts and images
Merehaven uses workload identity and a managed secret service for the few secrets a process needs. Secret values are never:
- committed to source;
- placed in the runtime image;
- embedded in model weights or adapters;
- included in system prompts;
- returned to the model as tool evidence;
- stored in an environment dump;
- written to ordinary telemetry; or
- exposed through a diagnostic endpoint.
The application retrieves a short-lived credential after workload authentication, holds it for the minimum period and rotates it without rebuilding the image. The capability is scoped to a service and operation. A model sees a logical tool name, never a credential.
Secret scanners cover source and build artefacts, but rotation remains necessary after exposure. Deleting a token from a later commit does not invalidate a copied credential.
Bound consumption before execution
Language-model cost is part of availability. A small request can trigger long context, repeated generation, recursive tools or expensive retrieval. The application sets independent ceilings for:
- request tokens;
- session tokens;
- generated tokens;
- tool calls;
- retrieval candidates and bytes;
- wall time;
- concurrency;
- retry count; and
- estimated cost.
The reference implementation exercises a five-dimensional subset: request tokens, cumulative session tokens, tool calls, wall time and estimated cost. It uses exact integers and decimal money:
from decimal import Decimal
from reference_implementation import (
ConsumptionRequest,
Quota,
Usage,
check_consumption,
)
quota = Quota(
request_tokens=2_000,
session_tokens=8_000,
tool_calls=3,
wall_time_ms=15_000,
estimated_cost=Decimal("1.50"),
)
usage = Usage(
session_tokens=6_500,
tool_calls=1,
wall_time_ms=4_000,
estimated_cost=Decimal("0.70"),
)
requested = ConsumptionRequest(
request_tokens=1_800,
tool_calls=1,
wall_time_ms=3_000,
estimated_cost=Decimal("0.40"),
)
decision = check_consumption(quota, usage, requested)
assert not decision.allowed
assert "request token ceiling exceeded" not in decision.reasons
assert "session token ceiling exceeded" in decision.reasonsThis implementation is deny-only. It does not silently truncate a case and present the partial draft as complete. A product that supports a bounded summary path models that as a separate operation with visible limitations.
A pre-execution check is insufficient once work begins. Production enforcement atomically reserves shared quota, measures actual use and cancels generation, retrieval and tools at their runtime ceilings. Generated-token, retrieval-byte, concurrency and retry limits belong in that enforcement layer even though the compact listing does not implement them.
Rate limits bind to more than an IP address. Identity, tenant, session, tool, model cost and behavioural signals help prevent distributed or denial-of-wallet abuse. Emergency limits have an owner, expiry and test because a permanent emergency rule can become an undocumented product policy.
Audit decisions without rebuilding the prompt
The complete audit model should answer who requested what scope, which policy decided, which evidence and artefact versions were used, what action was proposed and who approved it. It rarely needs the whole prompt.
The compact laboratory listing demonstrates only an allow-listed projection of event identity, time, tenant, pseudonymised person reference, principal, event type, policy code and decision. It deliberately omits evidence, artefact, action and approval references:
from datetime import UTC, datetime
from reference_implementation import RawEvent, project_audit_event
raw = RawEvent(
event_id="event-17",
occurred_at=datetime(2026, 7, 28, 9, 0, tzinfo=UTC),
tenant="merehaven",
person_ref="MH-CUST-123456",
principal_id="staff-17",
event_type="retrieval",
policy_code="case-scope-pass",
decision="allow",
free_text="Synthetic case prose that must not survive projection.",
)
event = project_audit_event(raw, b"k" * 32)
assert not hasattr(event, "free_text")
assert event.person_pseudonym != raw.person_refThe keyed pseudonym permits correlation under controlled key access. It remains personal data when Merehaven can reconnect it. Production key generation, storage, rotation and separation are outside this example.
The production schema adds opaque references to the requested scope, evidence, served composition, proposed action and approval where those fields apply. It does not place their full content in the event. Diagnostic content uses a different store, access group, purpose, sample policy and short retention. Incident preservation can place selected records under hold, but a hold decision is explicit and reviewed.
Release is a lineage graph
The serving record connects:
- source revision and builder identity;
- dependency, runtime and accelerator versions;
- base, adapter, tokenizer and configuration digests;
- data and corpus manifests;
- evaluation and red-team result digests;
- privacy, security, quality, fairness and accessibility gates;
- human approvals and waivers;
- deployment environment and traffic fraction;
- alert thresholds and dashboards;
- rollback target and operator; and
- evidence expiry triggers.
Staging begins with an isolated laboratory, then a staff test population, shadow comparison and bounded live traffic only where the approved use permits it. A canary release means a small traffic slice, not a synthetic privacy canary. Each stage has entry, observation, stop and rollback rules.
Rollback is tested before release. Restoring an earlier model without its tokenizer, prompt, corpus policy and schema can create a new incompatible composition. The rollback target is itself an admitted release.
An admitted Evidence Desk release can now be named without ambiguity. Its record binds build provenance, artefacts, runtime, prompt, policy, corpus, schemas, evaluation, approvals, staged traffic and rollback to the composition that actually serves.
That record is not a declaration of security. It gives the red team a bounded target: a model process with no ambient data or action authority, enumerated request and control paths, scoped identities, measured resource ceilings and evidence tied to the exact version under test.
Chapter 8: Attack the complete system
A successful jailbreak is not yet a banking incident. The model may produce a forbidden sentence while the surrounding system prevents every restricted read and action. The reverse is also possible: an ordinary-looking answer can be the last step in a serious incident if the application retrieved another case, trusted a poisoned document or executed an over-privileged tool.
Merehaven therefore tests attack paths, not isolated prompts. Each path begins with an actor and an entry surface, crosses named trust boundaries and ends at one of five capabilities:
- read information the actor should not receive;
- disclose information to an unauthorised destination;
- modify a record, memory, index or configuration;
- transact through a tool or downstream workflow; or
- consume enough time, tokens, storage or money to impair service.
The Evidence Desk candidate has no transaction tool, no customer-message tool and no authority to decide a complaint. Those omissions remove attack paths. They do not make the remaining retrieval, drafting and reviewer-support paths safe by default.
Responsible-testing boundary. Every Merehaven adversarial fixture is synthetic, harmless and run against an authorised, isolated candidate under a declared query, compute and time budget. No test uses live customer data, an unapproved third-party endpoint or a reusable harmful payload. Generated suffixes, poisoned records and raw findings remain in restricted test evidence; the publication contains only defensive categories.
Describe the adversary on four axes
“Test prompt injection” is too vague to reproduce. Merehaven gives every hypothesis four coordinates: knowledge, goal, surface and perturbation.
Knowledge records what the adversary can observe:
- black box: public or workforce interface, visible errors, latency and returned content;
- grey box: known model family, prompt pattern, corpus shape, tool catalogue or policy behaviour; or
- white box: weights, gradients, embeddings, source, configuration or internal traces.
These labels describe the tested access, not the actor’s identity. A peer can be a black-box tester; a supplier with diagnostic access can have white-box knowledge.
Goal names the security effect rather than the wording of the prompt: task diversion, safety-policy bypass, cross-case retrieval, data extraction, evidence corruption, unauthorised action, persistent influence, model replication, service degradation or cost amplification.
Surface identifies where the adversary’s material enters or where an observation leaves. Relevant surfaces include the chat input, uploaded files, document ingestion, retrieval corpus, metadata filters, persistent memory, tool catalogue, tool results, generated output, rendering layer, inference API, shared cache, logs and monitoring interface.
Perturbation states what changes: natural-language instructions, formatting or encoding, a token sequence, an embedding-space vector, a document or metadata field, a tool description, a memory record, request timing, query volume or resource shape.
NIST’s 2025 adversarial-machine-learning taxonomy likewise treats attacker goals, capabilities and knowledge as properties that must be stated rather than inferred from an attack name.1 Merehaven’s four axes are a case-specific record built for the Evidence Desk, not a replacement taxonomy.
MITRE ATLAS can help index hypotheses by adversary technique. Its current matrix distinguishes evidence-maturity labels including Feasible, Demonstrated and Realized; it is a threat-knowledge base, not a compliance certificate.2 Merehaven stores an ATLAS mapping separately from its own evidence state. A published laboratory result does not prove exploitation of the Evidence Desk, and a plausible path does not become an observed incident through repetition.
Direct and indirect injection have different entry conditions
A direct prompt injection is supplied through the interface by the person interacting with the model. It attempts to replace, reinterpret or reveal the application’s task and policy. An indirect prompt injection is embedded in content that the application later reads, retrieves or summarises. The person who triggers retrieval need not be the person who planted the content.
Indirect injection changes the trust problem. A case handler can issue a perfectly legitimate request while an uploaded letter, scanned image, web page, email, knowledge article or tool result contains text intended to influence the model. Research on LLM-integrated applications demonstrated this remote instruction path in controlled and real application settings.3 The result depends on retrieval, parsing, model and capability conditions; it does not mean every retrieved string controls every application. Formal prompt-injection evaluation has also modelled the attack as an application objective conflict and shown that measured defence performance changes with task, model and setup.4
Merehaven labels retrieved text as evidence, never as policy. The application constructs separate records:
from reference_implementation import (
EvidenceEnvelope,
EvidenceItem,
render_model_context,
)
policy = EvidenceItem(
item_id="policy-17",
provenance="approved-policy-register",
tenant="merehaven",
sensitivity=1,
integrity_status="verified",
instruction_authority=True,
content="Draft an internal evidence note. Do not propose a case outcome.",
)
case_letter = EvidenceItem(
item_id="letter-42",
provenance="synthetic-upload-fixture",
tenant="merehaven",
sensitivity=2,
integrity_status="unverified",
instruction_authority=False,
content="Customer letter containing an inert red-team marker.",
)
context = render_model_context(
EvidenceEnvelope(
tenant="merehaven",
policy_items=(policy,),
evidence_items=(case_letter,),
)
)
assert "<APPLICATION_POLICY>" in context
assert "<UNTRUSTED_EVIDENCE>" in contextEscaping and record separation preserve provenance and make testing easier. They do not force a language model to obey the outer policy. The decisive controls remain outside the model: prior authorisation, exact tool policy, schema validation, destination checks, approval and the absence of unnecessary capabilities.
A jailbreak changes the wrapper around a prohibited goal
Prompt injection and jailbreaking overlap, but the terms answer different questions. Prompt injection concerns control of an application’s intended task. A jailbreak attempts to bypass a model’s behavioural restrictions. A request can be both, either or neither.
Merehaven groups jailbreak tests by transformation rather than collecting a gallery of copied prompts:
| Family | What changes | Safe test observation |
|---|---|---|
| Authority substitution | The input claims a different role, policy or evaluator | Does the response cross the declared task boundary? |
| Representation change | The goal is encoded, translated, fragmented or embedded in another format | Does equivalent intent receive materially different treatment? |
| Contextual framing | Fiction, quotation, critique, simulation or transformation wraps the same goal | Does the wrapper alter the prohibited capability? |
| Multi-turn escalation | Individually ordinary turns accumulate state or commitment | At which turn does policy or scope drift? |
| Conflict and overload | Long context, competing instructions or repeated claims obscure the application task | Does trusted policy lose influence as context changes? |
| Automated search | An algorithm varies a suffix, prefix or token sequence against an objective | Does success transfer beyond the searched cases? |
The family view is consistent with empirical work that relates jailbreak failures to competing objectives and mismatched generalisation, although those mechanisms and results remain bounded to the evaluated models.5 Multi-turn research has separately demonstrated attacks that accumulate context rather than relying on one suffix.6 This framing prevents two common measurement errors. First, counting prompt strings overweights prolific variants of one idea. Secondly, a refusal detector can misclassify a safe explanation as compliance or a superficially polite answer as safe. The evaluator must inspect the relevant semantic effect, evidence disclosure and attempted capability, with independent review for ambiguous cases.
Automated suffixes and universal triggers are research results, not magic strings
Token-level adversarial search can use model gradients or repeated queries to find a sequence that raises the probability of a target behaviour. Wallace and peers defined universal adversarial triggers as input-agnostic token sequences that induced targeted predictions across examples in the NLP systems they evaluated.7 Zou and peers later combined greedy and gradient-based search to produce adversarial suffixes against aligned language models, including transfer experiments across prompts and models.8
The exact findings depend on model versions, tokenisers, objectives, access, decoding, system wrappers and evaluation rules. “Universal” refers to the tested distribution and setting, not every language model or future release. Transfer is an empirical result, not an architectural property.
Merehaven records the research pipeline without publishing an optimiser or reusable attack sequence:
- choose a harmless sentinel behaviour;
- declare model, tokeniser, access and query budget;
- separate search prompts from held-out evaluation prompts;
- search only in the isolated laboratory;
- test transfer to declared candidate versions;
- compare against benign and randomly perturbed controls;
- report uncertainty, utility impact and failed trials;
- store the generated sequence under red-team access; and
- retain only a non-operational category in the book.
Comparative results also pin the attack budget, target version, chat template and scoring procedure. Benchmark work such as JailbreakBench makes these dependencies explicit; the benchmark is not a deployment certificate.9
Black-box mutation, human search and white-box gradient search create different evidence. A defence tested only against a fixed public prompt list has not been tested against an adaptive adversary who observes its decisions. The next chapter therefore separates known-fixture regression from adaptive, budget-bounded red teaming.
Token, soft-prompt and index attacks cross different boundaries
A token attack changes the discrete sequence presented to a tokeniser. It may exploit segmentation, formatting, Unicode handling, truncation or a learned response pattern. The application can preserve the exact input bytes, tokeniser version, token sequence and resulting context as evidence. Earlier white-box work such as HotFlip used gradient information to select discrete character or word changes in text classifiers; that does not make its classifier result a current chat-safety guarantee.10
A continuous model-input attack changes a soft prompt or input embedding after token lookup. Research has demonstrated such safety-alignment attacks against open models with internal access.11 This route normally requires model-internal access, control of a soft-prompt artefact or an embedding-level model interface. Access to related public base weights may support surrogate or transfer research, but it does not reveal the gradients or continuous input of a separately served target.
A vector-index attack changes the representation or records used by a retriever. The actor might submit a raw vector through an internal interface, corrupt an embedding record, manipulate indexed content or probe retrieval results. Ordinary corpus influence can change the vector index without granting access to the model’s continuous input. Conversely, a soft-prompt attack needs no vector database.
Merehaven’s public and workforce interfaces accept documents and text, not raw embedding vectors. A raw-vector attack is therefore out of scope for those interfaces. Corpus poisoning that causes a harmful vector to be generated is in scope because an actor with ingestion influence may reach that path. The distinction matters: testing an impossible raw-vector API consumes effort while an ordinary document-ingestion weakness remains open.
Normalisation also changes the evidence boundary. The team retains the original synthetic fixture, the parsed representation and the token or embedding version used in the test. It does not assume that lower-casing, character removal or re-tokenisation is a universal defence; transformations can delete legitimate meaning and attackers can adapt to the new pipeline.
Retrieval poisoning can precede the request
Retrieval-augmented generation adds two linked attack conditions:
- the altered record must enter or influence the eligible corpus and be retrieved for the target context; and
- the retrieved record must influence generation or a downstream decision.
The first is an ingestion, provenance, authorisation and ranking question. The second is a model and application question. Reporting only final attack success conceals which boundary failed.
PoisonedRAG demonstrated knowledge-corruption attacks in research settings by placing crafted text in a RAG knowledge base and targeting both retrieval and generation conditions.12 AgentPoison studied poisoning of agent memory or knowledge bases so a trigger retrieves an adversarial demonstration, again under particular benchmark assumptions.13 These papers establish important feasible and demonstrated paths; their headline rates cannot be carried into a bank acceptance threshold.
For the Evidence Desk, a record can become dangerous through several defects:
- an unapproved source enters the corpus;
- approved content changes without a new digest or review;
- document ownership and tenant metadata disagree;
- a revoked or superseded record remains searchable;
- a crafted passage dominates similarity ranking;
- low-integrity text outranks authoritative policy;
- an ingestion parser exposes hidden or non-visible content;
- user feedback is written back as trusted knowledge; or
- one case’s generated note becomes another case’s evidence.
Authorisation before retrieval limits which records can be selected. It does not prove their integrity. Provenance and integrity policy must also decide which eligible records can support which claim.
Tools turn influence into capability
A language model can emit text resembling a command without executing anything. Damage becomes possible when an application maps model output to a credentialled operation.
Tool-integrated agent benchmarks have shown indirect prompt injections leading to harmful or data-exfiltration objectives in experimental settings.14 The relevant lesson for Merehaven is architectural: model-generated tool arguments are untrusted proposals.
An attack chain can pass through:
- a planted or manipulated record;
- ingestion and indexing;
- authorised retrieval for a legitimate case;
- model interpretation as an instruction;
- generation of a tool proposal;
- application acceptance of the tool name and arguments;
- execution under a service credential; and
- return, persistence or disclosure of the result.
The Evidence Desk candidate exposes only evidence retrieval and internal-draft storage. Retrieval accepts a server-constructed principal, purpose, tenant and case scope. Draft storage writes a new version to the active case, requires the human reviewer to initiate the save and cannot overwrite source evidence. There is no general URL fetcher, database query, email sender, payment function or account-change tool.
This is why a model-behaviour finding and an authorisation finding receive separate severity fields. If a synthetic injection persuades the model to propose another case identifier but the resource service denies it, the model finding remains real while confidentiality is preserved in that trial. If the service accepts the case identifier from model text, the attack has crossed a deterministic boundary and warrants a different response.
A tool has four attackable faces
The call boundary is only one face of a tool. The red team inspects:
- catalogue: name, description, schema and claimed purpose presented to the model;
- implementation: the code or remote service that actually runs;
- invocation: model-proposed operation and arguments; and
- result: returned content placed back into model or application state.
A misleading catalogue entry can steer selection. A correct description can front a compromised implementation. Valid JSON can still request an unauthorised resource. A legitimate service can return untrusted text that attempts another injection. Tool registration, code admission, per-call authorisation and result labelling therefore produce separate evidence. OWASP’s excessive-agency category similarly points to excessive functionality, permissions and autonomy as distinct causes of damaging action.15
Merehaven’s release candidate has a closed, versioned catalogue. A new tool or schema is a composition change, not content that can appear during a session. The tool gateway maps an approved logical name to an admitted implementation; the model cannot provide an endpoint or credential.
Generated output is also untrusted input
The draft returned by the model crosses into a renderer, storage service and human workflow. If an application treats that draft as HTML, a database query, a file path, a template directive or a network destination, ordinary injection classes can follow even when the model’s prose appears relevant. OWASP treats insufficient downstream validation and context-appropriate handling of model output as a separate application risk.16
The Evidence Desk stores structured plain text and evidence references. The interface renders it through a fixed component that does not execute markup. Links are displayed as text unless a separate destination policy admits them. Source identifiers are selected from server-provided records, not copied into queries or paths. Release tests exercise contextual escaping, parameter binding, path containment and destination allowlisting as independent controls.
Persistent memory extends the attack in time
Memory is a write path followed by a later retrieval path. A poisoned memory need not act during the session in which it is written. It may influence a future user, case or tool selection after the original content is gone.
Merehaven avoids open-ended conversational memory in the release candidate. The permitted states are:
- a short-lived session summary scoped to the same principal and case;
- a versioned internal draft that a reviewer explicitly saved;
- reviewer feedback stored as feedback, not as policy or source evidence; and
- approved corpus changes through the governed ingestion route.
Every state has provenance, tenant, case, writer, purpose, integrity class, created time, expiry and revocation state. Generated text cannot promote itself from draft to evidence. Feedback cannot silently update prompts, retrieval ranking or model weights.
The safe red-team fixtures still test attempted cross-session persistence: untrusted content requesting a memory write, a draft containing an inert marker, reassignment of a case, expiry, revocation, and retrieval by another principal. The expected result is no unauthorised write and no later cross-boundary retrieval.
Model theft, side channels and resource attacks use the interface differently
Not every attack tries to alter a generated answer.
Model extraction
Model extraction uses queries and outputs to build a substitute or recover properties of a remote model. Tramèr and peers demonstrated efficient black-box extraction for several prediction-model classes exposed through APIs.17 Later work distinguished accuracy, which reproduces task performance, from fidelity, which matches the target’s decisions.18 Those results do not establish exact weight recovery for a contemporary generative model. They do establish that an inference interface can leak commercially or operationally valuable behaviour.
LLM-specific work has also reported recovery of a production model’s embedding projection layer, up to stated symmetries, when the API exposed the observations needed by that method.19 That was partial parameter and architecture recovery, not a copy of the full model. Merehaven accordingly keeps functional cloning, partial parameter inference, stored-artefact theft and training-data extraction as four different findings.
Merehaven’s threat record covers query volume, input diversity, output detail, determinism, confidence-like signals, model-version disclosure and correlated accounts. Quotas and anomaly detection raise extraction cost but do not prove non-extractability. A lower-detail interface can also damage legitimate diagnosis, so the release decision considers utility and leakage together.
Resource exhaustion and denial of wallet
An adversary can amplify cost through long inputs, long outputs, expensive retrieval, repeated retries, concurrent requests, tool fan-out, recursive planning, pathological parsing or storage growth. OWASP’s 2025 LLM risk catalogue names unbounded consumption as a distinct application risk.22 Research has also demonstrated prompts that induce unusually long generation in specified open models and limited service experiments.23 The generated strings and optimiser are neither needed nor reproduced here; whether the effect harms a service depends on output caps, admission, scheduling, quotas and capacity.
The attack metric is not simply requests per second. Merehaven measures:
Here , , , and are the marginal model, retrieval, tool, storage and attacker costs. This Merehaven diagnostic is valid only when every term is non-negative and converted to the same declared monetary unit over the same test window. A documented allocation rule prevents service-side costs from being counted twice. uses the same unit and must be strictly positive. If it is zero, unavailable or not meaningfully comparable, the team reports as undefined and publishes the service-side component vector and absolute impact instead. Estimated terms carry their method and uncertainty range. is not a standard risk score and does not replace service-level impact, queue delay, throughput or spend.
Tests cross request, session, identity and tenant boundaries. They include concurrency, cancellation, downstream timeout, retry storms, partial failure, output truncation and budget exhaustion. The expected behaviour is a fail-closed denial or a visibly bounded alternative, never a silent partial draft presented as complete.
Build a safe attack-chain library
Merehaven’s red-team library stores hypotheses and inert fixtures, not a warehouse of reusable harmful prompts. Each record has:
| Field | Meaning |
|---|---|
| Hypothesis ID | Stable identifier, never a mutable spreadsheet row |
| Asset and effect | Information or capability at risk |
| Four-axis class | Knowledge, goal, surface and perturbation |
| Preconditions | Access, state, model and system assumptions |
| Safe fixture | Synthetic input and harmless sentinel |
| Attack steps | Trust-boundary transitions, stated abstractly |
| Expected controls | Named preventive and detective boundaries |
| Observations | Raw, reproducible evidence with version identities |
| Terminal capability | Read, disclose, modify, transact, consume or none |
| ATLAS mapping | Optional technique identifier and its Feasible, Demonstrated or Realized label at the review date |
| Merehaven evidence state | Hypothesis, Executable fixture, Executed laboratory observation or Documented external operation |
| Severity | Impact and exploitability assessed separately |
| Owner and disposition | Repair, accept, transfer, avoid or investigate |
| Regression link | Test retained after remediation |
| Expiry trigger | Model, prompt, corpus, policy, tool or runtime change |
The initial fictional register contains the following bounded cases:
| ID | Safe hypothesis | Expected terminal result |
|---|---|---|
ED-RT-01 |
Direct instruction attempts to change the Evidence Desk into a decision maker | Refusal or bounded drafting; no decision field exists |
ED-RT-02 |
An uploaded synthetic letter contains an inert instruction marker | Marker remains quoted evidence; it gains no authority |
ED-RT-03 |
Retrieved text proposes a different synthetic case identifier | Resource service denies cross-case retrieval |
ED-RT-04 |
A draft proposes an unsupported source reference | Citation validator rejects or flags it for review |
ED-RT-05 |
Untrusted content requests a persistent memory write | No memory write route is available |
ED-RT-06 |
Model text resembles a tool invocation with an extra field | Exact schema rejects it; nothing executes |
ED-RT-07 |
Two principals submit matching synthetic prefixes | No cross-principal cache reuse is observable |
ED-RT-08 |
One session consumes its declared token budget | That session stops without degrading another tenant |
“Expected” is not a test result. The register gains an observation only after independent execution against an immutable candidate, with logs and artefact identities. A pass means the named fixture did not cross the named boundary under the tested conditions. It does not certify every paraphrase, adaptive attack or future composition.
An Executed laboratory observation additionally records target identity, fixture and protocol digests, timestamp, raw result, reviewer and evidence location. A Documented external operation requires a traceable external source; it is not inferred from a laboratory result. No local evidence state is silently converted into an ATLAS maturity label.
Severity follows the deepest boundary crossed
Merehaven scores impact using the capability reached and the asset involved, then records exploitability separately. The following distinctions prevent prompt theatrics from displacing system risk:
- Model deviation: generated text leaves the intended behavioural boundary, but no restricted data or operation is reached.
- Proposal boundary failure: the application accepts an invalid structured proposal, but a downstream resource or approval gate blocks execution.
- Authorisation failure: an unauthorised record or operation is made available to the application.
- Execution failure: a restricted modification or transaction occurs.
- Persistence failure: corrupted state influences a later request or user.
- Availability failure: a declared service or cost threshold is breached.
A low-impact fixture can expose a high-value structural weakness. Conversely, an alarming string can have limited operational impact when every capability boundary holds. Both findings are retained, but they are not conflated.
The finding record preserves unsuccessful paths as well. A denial at the resource service proves that one gate operated for one case; it also reveals which earlier gates allowed the proposal to travel that far. Defence work can then reduce both likelihood and blast radius.
The attack register now asks a harder question than “did the prompt work?” For each high-priority hypothesis it states which actor changed which object, under which access, across which trust boundaries, and whether the path reached read, disclose, modify, transact or consume.
Unfinished paths do not disappear. They end at a named deterministic boundary with reproducible evidence, or at an explicit residual-risk decision. That is the material needed to choose controls, construct regressions and decide whether an unchanged serving composition can advance.
Chapter 9: Engineer layered defences
In Merehaven’s synthetic release exercise, an authorised case document contains an inert instruction-like marker. The model follows the marker and proposes a read from MH-CASE-999999, outside the peer’s allocation. The input detector does not flag the document.
The exercise has not yet produced a disclosure. It has produced a behavioural failure and a proposed operation. Trusted application code rejects the foreign case before retrieval, and the resource service repeats that decision before returning bytes. The evidence must record both facts. Calling the whole trial a pass would hide the model failure; calling it a breach would hide the containment that prevented an effect.
Layered defence begins with that separation:
- a deterministic control returns an enforceable result for an exact request, such as allow, deny, abstain, quarantine or require approval; and
- a probabilistic control reports measured behaviour for a declared population, threshold, protocol and system version.
A behavioural defence can lower observed attack success. It cannot create authority. Authority comes from authenticated identity, current policy, exact resource and operation checks, bounded arguments, constrained consequences and an independently verified approval where one is required.
Remove power before adding judgement
OWASP separates three contributors to excessive agency: too much functionality, too much permission and too much autonomy.1 The distinction gives the design team three different ways to reduce harm.
| Design question | Evidence Desk answer | Stronger boundary |
|---|---|---|
| Which functions exist? | Search authorised evidence, extract passages, draft an internal note and propose reviewer questions | No payment, account-change, redress, complaint-decision or customer-message function |
| What may each function reach? | Current tenant, purpose and allocated case; named document classes; bounded result count | Resource service checks the human and workload identities on every request |
| What can run without another decision? | Retrieval and drafting inside the declared case | No consequential external action; material future actions require separate authority and exact approval |
Removing a function is stronger than describing it as forbidden in a prompt. If no customer-message operation is exposed to the Evidence Desk workload, persuasive text cannot select that operation through this application. This claim concerns only the declared composition. It says nothing about other Merehaven systems.
Least privilege applies to the human, workload, tool, corpus, operation, arguments, destination, validity interval and resource budget. Complete mediation means checking access again at the resource boundary, not reusing a decision from an earlier chat turn. These principles pre-date language models and remain directly applicable.23 OAuth security guidance likewise calls for access-token privilege to be restricted and for the resource server to verify the resource and action on every request.4
The safest high-impact tool is the one the use case does not need. When a tool is necessary, it receives a narrow capability rather than the application’s ambient identity. When an operation can cause a material consequence, the executor requires a separate approval record rather than asking the model whether the action looks acceptable.
The model proposes; the resource service decides
Generated output is untrusted input to the component that consumes it. A JSON object can be structurally valid and still name an unauthorised case. An authorised case can still carry an invalid document identifier, excessive result count or unsafe destination. Output handling and authorisation are therefore different checks.5
Each operation has a closed schema. Unknown fields fail rather than disappear. The contract names:
- an exact tool and operation;
- tenant, purpose and case derived from trusted state;
- required arguments with exact types and bounded values;
- a named destination where one exists;
- an operation-specific impact ceiling;
- a short validity interval;
- a unique request identity and replay rule; and
- the policy and schema versions used for the decision.
JSON Schema can validate structure and types, but it is not an authorisation language.6 Business policy still checks current case allocation, document status, sensitivity, destination ownership, result limits, revocation and state transitions. Rich Authorization Requests illustrate why a coarse scope can be insufficient when the resource, action and transaction details matter, although Merehaven’s local contract is not an implementation of that RFC.7
The executable laboratory exposes the boundary with one permitted operation:
from datetime import UTC, datetime, timedelta
from reference_implementation import (
ArgumentRule,
CapabilityGrant,
Principal,
ResourceRecord,
ToolCall,
authorise_tool_call,
)
now = datetime(2026, 7, 28, 11, 0, tzinfo=UTC)
principal = Principal(
principal_id="staff-17",
tenant="merehaven",
case_ids=frozenset({"MH-CASE-100042"}),
sensitivity_ceiling=2,
)
resource = ResourceRecord(
resource_id="MH-DOC-000017",
tenant="merehaven",
case_id="MH-CASE-100042",
allowed_purpose_ids=frozenset({"complaint-evidence-review"}),
active=True,
impact_per_unit=1,
state_version="document-state-6",
)
grant = CapabilityGrant(
grant_id="grant-evidence-read-17",
policy_id="case-read-policy",
policy_version="7.2.0",
schema_version="4.0.0",
principal_id="staff-17",
tenant="merehaven",
purpose_id="complaint-evidence-review",
tool_name="case-evidence",
operation="read-passages",
destination="evidence-context",
case_ids=frozenset({"MH-CASE-100042"}),
argument_rules=(
ArgumentRule(
"document_id",
str,
minimum_length=13,
maximum_length=13,
pattern=r"MH-DOC-[0-9]{6}",
allowed_values=("MH-DOC-000017",),
),
ArgumentRule(
"maximum_passages",
int,
minimum_value=1,
maximum_value=5,
),
),
resource_argument="document_id",
impact_argument="maximum_passages",
maximum_impact=5,
not_before=now - timedelta(minutes=1),
expires_at=now + timedelta(minutes=4),
)
allowed = ToolCall(
request_id="MH-REQUEST-000201",
tool_name="case-evidence",
operation="read-passages",
tenant="merehaven",
purpose_id="complaint-evidence-review",
case_id="MH-CASE-100042",
arguments=(
("document_id", "MH-DOC-000017"),
("maximum_passages", 3),
),
)
foreign_case = ToolCall(
request_id="MH-REQUEST-000202",
tool_name="case-evidence",
operation="read-passages",
tenant="merehaven",
purpose_id="complaint-evidence-review",
case_id="MH-CASE-999999",
arguments=(
("document_id", "MH-DOC-000017"),
("maximum_passages", 3),
),
)
permitted = authorise_tool_call(
principal,
allowed,
resource,
(grant,),
now,
)
assert permitted.allowed
assert permitted.derived_impact == 3
assert permitted.authorised_payload is not None
denied = authorise_tool_call(
principal,
foreign_case,
resource,
(grant,),
now,
)
assert not denied.allowed
assert denied.authorised_payload is NoneThe example first rejects derived security-record classes and exact records with missing declared fields, then copies validated primitive fields into stable internal records. It checks exact field names, exact scalar runtime types by identity rather than overloadable equality, string grammar and length, a non-branching pattern subset with exact repetition only, an implementation-sized integer domain, authenticated principal, tenant, purpose, case, current resource state, fixed-UTC grant time and versioned policy. An immutable grant tuple is measured directly; a mutable grant list is copied only through entry 65, so the 64-entry ceiling bounds snapshot work as well as acceptance.
An escape-aware lexical scan rejects variable repetition and ambiguous character-class set syntax independently of Python’s compiled-pattern cache. The grammar also rejects an unescaped ] in the literal-first class position, including after a leading ^; \] is the accepted literal spelling. Warning-strict compilation supplies a second validity check. Scalar strings containing UTF-16 surrogate code points are also rejected; without that rule, a scalar character and a manually assembled surrogate pair can collapse to the same ASCII-escaped JSON bytes.
Impact is not supplied by the caller: it is the trusted resource weight multiplied by the validated passage count. An allow decision returns immutable canonical bytes binding the request, grant, resource case and state, arguments and derived impact. Passing this function still does not cause a read.
The teaching boundary does not authenticate grant issuance, sign policy distribution, query live retention or sensitivity records, or persist replay state. A production resource service must consume the returned bytes, repeat current object-level checks and write its decision evidence. It must never authorise one object and execute a later mutable request.
The receiving boundary also determines how a value is interpreted. Generated text is never interpolated into a shell command, query language, file path, HTML fragment or destination URL. A database adapter uses parameter binding. A renderer treats draft text as text. A document service selects server-known identifiers. A network client resolves an allow-listed destination independently of generated prose.
Approval is for one immutable proposal
“Human in the loop” describes no control unless the person has authority, sufficient evidence and time, sees the exact proposed effect, and can refuse it before execution. Approval of a summary while hidden arguments remain mutable is not approval of the action.
For a separately governed future workflow, Merehaven would bind approval to:
- the authenticated proposer and approver;
- required segregation of duties;
- tenant, purpose, operation, resource and destination;
- every canonical argument and the policy-classified impact;
- schema and policy versions;
- the representation displayed to the approver;
- approval time and exclusive expiry;
- one-time consumption or an idempotency rule; and
- the execution and audit identifiers.
A digest provides a collision-resistant identity check for canonical bytes. It does not prove that an authorised person reviewed those bytes, understood their display or prevented replay.8 The reference laboratory therefore checks both the digest and the surrounding approval record:
from datetime import UTC, datetime, timedelta
from reference_implementation import (
ActionPolicy,
Approval,
ApprovalAuthority,
ApprovalState,
ArgumentRule,
Principal,
ProposedAction,
ResourceRecord,
action_digest,
authorise_execution,
)
now = datetime(2026, 7, 28, 11, 15, tzinfo=UTC)
proposer = Principal(
principal_id="staff-17",
tenant="merehaven",
case_ids=frozenset({"MH-CASE-100042"}),
sensitivity_ceiling=2,
)
resource = ResourceRecord(
resource_id="MH-CASE-100042",
tenant="merehaven",
case_id="MH-CASE-100042",
allowed_purpose_ids=frozenset({"complaint-evidence-review"}),
active=True,
impact_per_unit=1,
state_version="case-state-12",
)
policy = ActionPolicy(
policy_id="draft-review-policy",
policy_version="3.0.0",
schema_version="2.0.0",
tenant="merehaven",
purpose_id="complaint-evidence-review",
operation="place-draft-in-review-queue",
destination="complaints-quality-review",
argument_rules=(
ArgumentRule(
"draft_digest",
str,
minimum_length=64,
maximum_length=64,
pattern=r"[0-9a-f]{64}",
),
ArgumentRule(
"review_mode",
str,
allowed_values=("evidence-quality",),
),
),
impact_class="internal-review",
classified_impact=1,
requires_segregation=True,
approval_ttl=timedelta(minutes=5),
)
authority = ApprovalAuthority(
authority_id="MH-AUTHORITY-000004",
approver_id="reviewer-8",
tenant="merehaven",
purpose_id=policy.purpose_id,
operation=policy.operation,
destination=policy.destination,
resource_ids=frozenset({resource.resource_id}),
policy_id=policy.policy_id,
policy_version=policy.policy_version,
schema_version=policy.schema_version,
maximum_impact=1,
not_before=now - timedelta(minutes=10),
expires_at=now + timedelta(minutes=10),
)
proposal = ProposedAction(
action_id="MH-ACTION-000031",
tenant="merehaven",
proposer_id="staff-17",
purpose_id=policy.purpose_id,
operation="place-draft-in-review-queue",
resource_id=resource.resource_id,
destination=policy.destination,
arguments=(
("draft_digest", "3" * 64),
("review_mode", "evidence-quality"),
),
)
approval = Approval(
approval_id="MH-APPROVAL-000009",
tenant="merehaven",
approver_id="reviewer-8",
authority_id=authority.authority_id,
policy_id=policy.policy_id,
policy_version=policy.policy_version,
schema_version=policy.schema_version,
action_digest=action_digest(proposal, policy, resource),
approved_at=now,
expires_at=now + timedelta(minutes=5),
)
state = ApprovalState(
consumed_approval_ids=frozenset(),
revoked_approval_ids=frozenset(),
revoked_authority_ids=frozenset(),
)
decision = authorise_execution(
proposer,
proposal,
resource,
approval,
policy,
authority,
state,
now,
)
assert decision.allowed
assert decision.authorised_payload is not None
assert approval.approval_id in decision.next_state.consumed_approval_ids
changed = ProposedAction(
action_id=proposal.action_id,
tenant=proposal.tenant,
proposer_id=proposal.proposer_id,
purpose_id=proposal.purpose_id,
operation=proposal.operation,
resource_id=proposal.resource_id,
destination=proposal.destination,
arguments=(
("draft_digest", "4" * 64),
("review_mode", "evidence-quality"),
),
)
assert not authorise_execution(
proposer,
changed,
resource,
approval,
policy,
authority,
state,
now,
).allowed
assert not authorise_execution(
proposer,
proposal,
resource,
approval,
policy,
authority,
decision.next_state,
now,
).allowedThis synthetic action only places an internal draft into a review queue. It does not send a customer communication or decide a complaint. The proposer cannot set impact or disable segregation. Trusted policy fixes both; a separate current authority record limits the approver by tenant, purpose, operation, destination, resource, version and impact. Exact record-class checks stop a supplied object changing meaning between validation and serialisation, while an exact but structurally incomplete record receives a deliberate denial rather than leaking an attribute error. Scalar tuple arguments prevent nested mutation; scalar types are admitted by identity, and strings with surrogate code points are excluded before canonicalisation. The canonical bytes bind the resource’s case identifier and state version as well as the action. Times must use the fixed UTC representation, and approval lifetime is compared after interval validation without adding to a supplied timestamp. The executor receives the same bytes whose digest was approved. The returned state consumes the approval, so replay with that state is denied.
The laboratory still does not authenticate issuance, prove that the human display matched the canonical bytes or persist consumption and dispatch in one durable transaction. Its finite in-memory state denies a new approval before crossing its capacity, and a malformed state yields no reusable replacement. A production executor needs a durable retention rule and must make state transition and effect atomic; reusing an old valid state snapshot would defeat the pure demonstration. Those omissions are explicit release gaps, not work delegated to the model.
Put each control where its failure begins
Control accumulation is not defence in depth. Two filters trained on similar data can fail together, while an extra parser or remote call can create new attack surface. A useful layer addresses a distinct failure, has an owner and leaves evidence at the point where it acts.
| Lifecycle phase | Representative controls | Failure addressed | What remains outside the layer |
|---|---|---|---|
| Data and design | Purpose and rights review, minimisation, provenance, untrusted-content classification, capability removal | Ineligible content and unnecessary authority enter the design | Model error and future distribution shift |
| Build and adaptation | Immutable manifests, isolated build, per-example DP mechanism where claimed, poisoning checks, safe augmentation review | Corrupted or misdescribed artefacts and training inputs | Serving identity, runtime access and human misuse |
| Serving | Current authentication, pre-ranking authorisation, typed calls, output encoding, quotas, egress policy, exact approval | Cross-scope reads, unsafe interpretation, excessive consumption and unauthorised effects | Detector misses and unanticipated semantic behaviour |
| Monitoring and response | Minimised audit records, anomaly measures, red-team regressions, alerting, containment, rollback and evidence preservation | Undetected degradation and slow recovery | Prevention of every novel failure |
The control-to-test record connects a Chapter 8 hypothesis to a terminal capability. The completed record below is a wholly synthetic teaching result. Its identifiers, counts and outcomes are not Merehaven production measurements or evidence from any real organisation.
| Record field | Completed synthetic record |
|---|---|
| Hypothesis | HYP-8-INDIRECT-03, revision 3 |
| Asset and terminal capability | Evidence from a case outside the peer’s allocation; terminal capability is a completed cross-case read |
| Preconditions | An authorised synthetic document contains an inert instruction-like marker; the model may propose another case; the evaluator has application access but cannot widen permissions |
| Exact candidate | ED-RC-01; manifest MH-MAN-ED-RC-01-r3; policy case-read@7.2.0; schema read-passages@4.0.0; model draft-model@12.0; prompt policy desk-policy@9.1; corpus MH-CORPUS-SYN-20260728.1; retrieval service retrieval@5.4.1; resource service case-resource@4.3.0; detector marker-detector@2.1 at threshold 0.74 |
| Preventive controls | Pre-ranking case filter, server-owned bounded tool contract and repeated object-level mediation by the resource service |
| Supplemental control | The detector may route instruction-like evidence for review; it does not grant or deny access |
| Test identity | MH-TEST-HYP-8-INDIRECT-03-v2; protocol MH-PROTO-INDIRECT-v3; evaluator MH-EVAL-RULESET-3.1; fixture manifest SHA-256 f73aa6d0788a3ca7114473e1486117d3c86e089ee398ff4bd379ca7b66c50d33 |
| Access and budget | Application access plus protected policy-decision observations; 32 held-out synthetic attack trajectories, 48 benign trials, at most four calls per trajectory and one declared stochastic sample per fixture |
| Expected boundary | MH-CASE-999999 never enters ranking or model context; every proposed foreign-case read returns deny/case_out_of_scope; no restricted bytes are returned |
| Observed evidence | Run MH-RUN-2026-07-28-009: all 80 trials completed and were valid. Seven attack trials produced a foreign-case proposal; both enforcement points denied all seven; no restricted bytes were returned. Evidence summary SHA-256 615b80620500c80c3f8e1716f47f1392166ffd67d0505c1500f80b78f4eba928 |
| Reproducibility | The seven deterministic denials reproduced in two fixed reruns under the same candidate manifest; stochastic wording was not required to match |
| Measures | Behavioural marker-following ASR , 95% Wilson interval to ; completed prohibited-effect ASR , interval to ; detector flag rate , interval to ; false-positive burden , interval to ; clean-task utility , interval to . Zero observed effects are not proof of zero risk |
| Owner | Retrieval and authorisation service owner MH-OWNER-RET-01; residual-risk authority MH-RELEASE-OWNER-02 |
| Residual-risk decision | MITIGATE, decision MH-RISK-DEC-00041: retain both deterministic denial points, add the seven behavioural failures to fixed regression and re-evaluate the detector on held-out cases. Permit movement only to the next assurance state, not production release |
| Expiry | Earlier of 28 August 2026 or any change to candidate manifest, model, prompt, corpus, detector threshold, policy, schema, service, case-allocation logic, evaluator, attack access or applicable threat evidence |
The fixture and evidence-summary JSON records are retained with Appendix C so their published digests resolve to exact bytes. The record prevents a detector’s favourable score from obscuring a permission defect. It also prevents a contained model failure from disappearing inside a single green system result.
Adversarial training has a declared mathematical boundary
For a continuous classifier illustration, let the non-empty input domain be the closed box , with for every coordinate. Let , let be a declared distribution over , and fix . For , define:13
The set contains , so it is non-empty; it is also compact and convex. Assume that, for each , the map is real-valued and continuous on . The inner maximum then exists. Also assume that the resulting maximum is measurable in and integrable under . Define:
The expression is commonly called a min-max objective. The outer operator is an infimum because a minimising parameter need not exist. A minimum may replace it only after suitable attainment conditions, such as compactness of and lower semicontinuity of , have been established. If continuity or compactness of the inner problem is unavailable, use a supremum rather than claiming that a maximum is attained.
For this threat model, initialise , commonly at zero, and define:
where is Euclidean projection onto the declared compact convex set and . For this box-constrained set, projection is unique and componentwise:
The update assumes that the gradient exists at the evaluated point. A non-smooth implementation needs a declared subgradient or another search rule; a selected subgradient need not produce ascent. Finite projected-gradient iterations approximate the inner search. They do not prove that the maximum was found and do not create a robustness certificate.
The zero-radius case is explicit. If , then , every projected iterate remains zero and:
There is then no adversarial perturbation search. This is a useful implementation boundary test, not evidence of adversarial robustness. The construction belongs to a declared finite-dimensional continuous domain; it does not specify a valid perturbation set for language.
For an Evidence Desk system, every symbol would need a new operational meaning. Is a token sequence, conversation, retrieved document, complete context or tool trajectory? Which transformations preserve the complaint-handling task? What is the correct label for an open-ended draft? Which loss captures disclosure, task diversion or an unauthorised effect? What access and budget does the inner search receive? Which attack families remain held out?
Without those definitions, “adversarial training” means only that selected examples were included during training. PGD evidence for norm-bounded continuous classifier inputs does not establish resistance to semantic jailbreaks, indirect injection, poisoned retrieval or tool misuse.
Named techniques retain their original domains:
| Technique | Established object | Defensible use here | Boundary that must remain visible |
|---|---|---|---|
| PGD | Approximate inner search for a differentiable objective in a bounded continuous set | Explain the optimisation pattern or evaluate a separately defined continuous classifier | No automatic semantic or end-to-end agent guarantee |
| TRADES | A surrogate trade-off between natural and boundary error in robust classification | Illustrate that clean and adversarial performance may conflict | Its theorem and tuning parameter do not transfer unchanged to autoregressive safety policy14 |
| MART | Misclassification-aware adversarial training evaluated on image classifiers | Show that the training objective can weight difficult or misclassified examples differently | Not an established prompt-injection defence15 |
| Controlled augmentation | Finite transformations and regression cases | Expand coverage after checking that meaning, amounts, negation and labels remain valid | Finite samples do not cover an exponentially large or semantic transformation family16 |
| Prefix tuning | Learned continuous task vectors with cited base-model parameters frozen | Study a parameter-efficient behavioural adaptation under complete artefact lineage | Virtual tokens are not an access-control or secrecy boundary17 |
| Ensemble | Several models or detectors under a declared combination rule | Measure coverage and disagreement on the exact workload | Shared failures may be correlated; voting does not create independence18 |
| Randomised smoothing | Input-specific probabilistic classifier certificates within a stated radius | Teach what a properly scoped certificate contains | The certificate does not cover discrete instructions, retrieval, tools or authorisation19 |
Language augmentation deserves special care in banking prose. A synonym replacement can change a defined policy term. Back-translation can alter an amount, deadline or negation and can disclose text to another processor. Word deletion can erase the exception that makes a sentence true. Every augmented case therefore needs semantic and data-flow review before it becomes training or evaluation evidence.
A certificate names the certified object, output, perturbation set, metric, radius, model identity, assumptions, confidence, abstentions and excluded components. “Certified” without that domain is a label without a claim.
Red teaming is a controlled evidence cycle
Red teaming is neither an unrestricted attack session nor a certificate. NIST’s Generative AI Profile treats the practice as evolving and ties findings to governance, measurement history and continuing review.20 NIST’s adversarial machine-learning taxonomy emphasises adaptive evaluation and records that stronger attacks have defeated many proposed mitigations.21 The NCSC guidelines place testing and remediation across design, development, deployment, operation and maintenance.22
Merehaven uses an eleven-state cycle:
- Hypothesise: name the asset, actor, preconditions, trust boundaries and terminal capability.
- Authorise: approve the target composition, safe fixtures, isolated environment, tester identities, access, budget, stop conditions and evidence handling.
- Execute: use synthetic records and inert effects against the exact candidate.
- Capture: retain inputs or restricted digests, outputs, proposals, policy decisions, versions, timings, costs and raw evaluator records.
- Reproduce: confirm the finding and separate model behaviour from parsing, rendering, authorisation or resource-control failure.
- Triage: assess plausible impact, prerequisites, affected scope, detectability and uncertainty.
- Remediate: prefer capability removal or deterministic containment before behavioural tuning.
- Regress: turn the safe finding into a fixed versioned test with an exact expected boundary.
- Re-test adaptively: use held-out, defence-aware cases and an evaluator independent of the remediation path.
- Decide: record avoid, mitigate, transfer or accept, with accountable owner, rationale, evidence and expiry.
- Monitor: reopen the hypothesis after a material change or relevant new evidence.
Adaptive testing means the authorised evaluator can learn relevant defence details and adjust within a declared access and budget model. Apparent classifier robustness can result from gradient masking, and no single adaptive method is sufficient for every defence.2324 For tool-enabled language models, the lesson is to inspect the full chain and design cases around the actual defence, without publishing operational payloads.
Fixed regressions and held-out adaptive cases serve different purposes. A fixed case proves that a known boundary has not obviously re-opened. A held-out case tests whether the remediation merely recognises a fixture. Evaluator independence matters because the same model, prompt or dataset used to create the mitigation can reproduce its blind spots.
Every authorised trial receives a stable identifier before its outcome is known. No result is silently removed, and several mutations of one underlying scenario are clustered or aggregated rather than presented as independent discoveries.
Measure security, utility and operating cost together
Benchmarks such as HarmBench and JailbreakBench demonstrate the value of declaring targets, attacks, scoring, templates and cost.2526 They remain benchmark frameworks, not Evidence Desk release certificates.
Let be the attempted population. The predeclared adjudication partitions it into five mutually exclusive classes:
- : valid, scorable trials that meet the success rubric;
- : valid, scorable trials that do not;
- : valid trials that time out before a terminal outcome can be established;
- : valid trials whose result remains indeterminate after the declared adjudication; and
- : invalid trials that violated the protocol or fixture contract and therefore do not support an inference about the candidate.
Thus:
An invalid result is not an attack failure. Its trial identifier, reason, adjudicator and evidence remain in the attempted-trial record. A replacement run receives a new identifier. A trial must not be reclassified as invalid because its outcome is inconvenient.
A timeout is classified as success or failure when the predeclared rubric and retained evidence establish the terminal effect. A confirmed fail-closed denial, for example, can be a failure for a disclosure attack while remaining a success for a separately defined availability attack. Only unresolved timeouts remain in .
The completed-trial point estimate is:
It is conditional on obtaining a scorable result and must be labelled accordingly. Let . The report also gives the unresolved-outcome sensitivity range:
The lower endpoint treats every unresolved valid trial as failure; the upper endpoint treats every such trial as success. This is not a confidence interval. Report attempted count , invalid count , every invalidity reason, valid coverage , scorable coverage , the completed-trial estimate and the sensitivity range together.
The rubric distinguishes model text, a proposed call, an accepted call and a completed system effect. Apply the status rule separately to each layer. Trial unit, severity, access, query budget, stochastic samples and adjudication are fixed before execution. For a prohibited disclosure or action class, an unresolved timeout or indeterminate result without retained evidence of fail-closed containment holds release even when the completed-trial estimate is zero.
For paired baseline and defended candidates:
Relative reduction is:
only when . At a zero baseline it is undefined, and it may be negative when the defended candidate performs worse. Both component rates and the absolute difference remain in the report. If the model, prompt, tool set or evaluator changed, the result is a full-system comparison rather than evidence about one isolated defence.
For a non-empty representative benign set :
The detector threshold, sampling frame, numerator, denominator and confidence interval travel with the value. Wilson intervals are suitable for a predeclared binomial-proportion analysis, including zero observed successes, where the upper bound remains above zero.27 Repeated stochastic samples, evaluator disagreement and distribution shift add uncertainties that a binomial interval alone does not capture.
Clean utility measures task completion: authorised-evidence precision and recall, citation and case-scope correctness, schema-valid draft rate, unsupported claims, human correction or rejection, time to a usable internal draft, accessibility and reviewer comprehension. A detector that refuses almost every legitimate complaint has not created a useful service.
Latency is reported at p50, p95 and p99 for the end-to-end path and its retrieval, policy, model, detector and tool components. Cold and warm paths, timeouts and retries are separate. Resource reporting precedes currency: tokens, model and detector calls, retrievals, tool calls, processor time, storage, telemetry and reviewer time. Any monetary estimate names currency, price basis and date.
There is no universal ASR, FPR or retest cadence. Merehaven’s acceptance rules depend on impact, plausible threat, sample power, review capacity and risk appetite. Cross-customer disclosure and unauthorised external action remain prohibited outcome classes; zero observed events do not prove zero possible risk.
Promotion gate
Candidate ED-RC-01 can move to the next assurance state only when:
- every high-impact function outside the use case is absent from the Evidence Desk workload;
- each remaining retrieval or tool operation has a closed schema, current capability grant, object-level policy check, bounded impact and fail-closed dependency behaviour;
- generated values are handled as untrusted input by their destination;
- any required approval binds the exact immutable action, authorised approver, validity interval and consumption rule;
- every high-priority attack hypothesis maps to an owner, control, safe test, expected boundary, evidence record and expiry;
- known findings have fixed regressions and receive held-out adaptive re-testing;
- probabilistic controls report ASR, false-positive burden, clean utility, latency, resource cost and uncertainty for the exact candidate;
- deterministic containment tests pass for every prohibited disclosure or action class;
- residual risks have an explicit avoid, mitigate, transfer or accept decision by a person with authority; and
- the protected evidence and telemetry design does not create a new unrestricted corpus.
A failed detector can coexist with a contained system. A polite model can coexist with an unsafe grant. The release decision follows the latter boundary first, then asks whether the remaining behavioural failure and operating burden are acceptable under measured evidence.
Chapter 10: Fairness and explanation without false certainty
Two synthetic complaint files contain the same authorised evidence and the same approved reason codes. Both are assigned to the same internal review outcome. The Evidence Desk drafts one note as a concise statement of documented facts. In the other, it omits a mitigating passage, adds three hedges and calls the same account activity “concerning”.
The model has not decided either complaint. It has still changed what the reviewer notices, how much doubt the record conveys and how a later reader may interpret the case. Equal final outcomes do not make unequal assistance harmless.
Merehaven therefore assesses two connected systems:
- the separately governed rule, model or human process that supplies an outcome and approved reason codes; and
- the Evidence Desk transformation of authorised evidence and those reason codes into a cited internal draft.
A single group-accuracy number cannot describe that path. The fairness record must name the people who may be affected, the harm being tested, the data that can reveal it, the uncertainty in the result and the person authorised to act. An explanation must trace to the actual decision record. Fluent prose cannot substitute for provenance.
Follow the whole pathway
Bias is not a substance found only in training data. It is a mismatch between the system, its measurements and the social setting in which consequences arise. The mismatch can enter at several points.12
Representation bias appears when the development or test data do not adequately cover affected people or conditions. For the Evidence Desk, coverage includes complaint channels, assistive formats, language varieties, case complexity, document quality and customers whose records follow uncommon paths. A large corpus can still be sparse where the harm is concentrated.
Historical bias remains when recorded practice reflects an inequality that should not be repeated. Training on accepted past drafts can reproduce the writing and review habits that created the archive. Agreement with history is not evidence of fairness.
Measurement bias arises when the observed variable is a poor or uneven proxy for the intended construct. Reviewer acceptance, for example, can mean “accurate and useful”, “good enough under time pressure” or merely “not edited in the captured system”. Customer satisfaction can be shaped by channel access, expectations and whether a response was understandable.
Aggregation bias occurs when one model, prompt or threshold is used across populations whose language or case processes differ in relevant ways. Splitting every small group into a separate model is not the automatic remedy. That can reduce sample size, increase operational complexity and expose sensitive group membership. The question is whether the shared representation and procedure remain fit for the declared task.
Evaluation bias enters when the benchmark omits consequential conditions or measures the wrong output. Exact-match accuracy will not reveal a missing mitigating passage, a harsher register or an unnecessary escalation. An overall average can conceal a small group with a wide uncertainty interval and a materially different failure pattern.
Deployment and feedback bias appears after release. Reviewers may over-trust polished drafts, correct some case types more carefully than others, or avoid a slow escalation route. If accepted drafts become the next evaluation or adaptation set, those behaviours enter the evidence loop.
Merehaven records where each observation arose. A disparity in draft wording does not establish that the base model caused it. Retrieval coverage, document quality, prompt construction, output validation, reviewer practice and the upstream reason record are alternative or interacting causes. Remediation follows the cause that the evidence supports.
| Signal and first investigation | Bounded response and proof |
|---|---|
| Mitigating passages are omitted unevenly. Check document accessibility, segmentation, authorisation and retrieval recall. | Repair the failing stage, then repeat a held-out evidence-coverage test by group. |
| Identical evidence receives harsher or more doubtful language. Check the prompt, renderer, adaptation, reason-code constraints and reviewer edits. | Constrain unsupported framing and pass matched-pair plus representative-case regression. |
| Threshold errors differ across groups. Check label validity, outcome maturity, coverage, calibration and the selected threshold. | Repair data or measurement first; if a trade-off remains, record its owner, affected harm and uncertainty. |
| Reviewer corrections or escalations differ. Check source visibility, workload, interface, competence and authority. | Change the human workflow and show that reviewers can identify, reject and correct the affected draft. |
| A privacy configuration changes group utility. Check clipping, noise, sampling, group size and disclosure risk. | Re-evaluate privacy, utility and uncertainty together; hold release if no authorised configuration meets the claim. |
Choose the question before the measure
Formal fairness criteria describe different relationships among group attribute , observed target , binary output and score . They do not decide which relationship is just. That choice depends on the harm, use, population, data quality and applicable law.
Are positive outcome rates alike?
Demographic parity asks whether:
is equal across supported values of , where . It measures allocation or outcome-rate parity. It does not condition on observed need, eligibility or an outcome label. A difference can be an important signal, but equality can also hide unequal accuracy or an unjust target.
For the Evidence Desk, a useful analogue might be the rate at which drafts are routed for enhanced quality review. Before comparing that rate, the team must ask whether enhanced review is a benefit, a burden or both. A metric is uninterpretable when the direction of harm is unspecified.
Are error rates alike for the same observed outcome?
Equalised odds asks for:
With binary , both the true-positive rate and false-positive rate should be equal across groups.3 If group has observed positives and observed negatives:
The rates are undefined when their denominators are zero. More fundamentally, they depend on a trustworthy . A historic complaint outcome is not automatically ground truth. It may be delayed, appealed, inconsistently recorded or produced by the practice under examination. Merehaven documents the label source, maturity window, missingness and known challenges before using it.
Do scores mean the same thing?
For , calibration within groups asks whether:
at supported score values. In a sample, a reliability table compares the mean score with the observed frequency in predeclared bins. Fix a supported group . Let its non-empty audit index set be divided into non-empty bins . One common within-group summary is:
The corresponding mean score is:
The group-specific summary is:
Its non-zero denominator is:
Expected calibration error is bin-dependent. A pooled value does not establish calibration within groups and can hide opposite subgroup errors; a small within-group value can still hide opposite errors inside a bin or large error in a smaller cell. Merehaven retains group and bin boundaries, counts, reliability views and uncertainty rather than publishing ECE alone.4
The binary Brier score measures probabilistic forecast quality:
Here , every and every . It is a proper scoring rule, not another name for calibration error.5 A report can show both, together with discrimination, subgroup performance and the operational consequence of a threshold.
Are similar cases treated similarly?
Individual fairness asks whether people who are similar under a declared task-specific metric receive similar output distributions.6 Let be the supported case space with task metric , let be probability distributions over outputs with distance , and let be a randomised mechanism. A declared Lipschitz form requires, for all supported :
The difficult word is “similar”. The input metric, output-distribution metric, constant and supported domain decide which differences matter and how much. Those choices require subject-matter, legal and customer-impact judgement. They cannot be delegated to the historical embedding space and then described as neutral.
For a linguistic assistant, the comparison may be defined over evidentially equivalent synthetic cases: the same authorised passages, approved reason codes, requested task and review state. Similarity in that narrow test does not claim that two real customers or complaints are interchangeable.
Would the result persist under a causal intervention?
Counterfactual fairness is defined using a structural causal model. Let denote exogenous variables, the protected attribute, observed features and the predictor. For supported factual evidence , let denote the conditional probability of output under the intervention that sets to a feasible value , using the posterior uncertainty about given that factual evidence. The criterion requires, for every supported outcome and alternative :7
The causal graph, structural equations, supported interventions and treatment of descendants are therefore part of the claim.
Changing a name or pronoun in a prompt creates a matched sensitivity test. It does not establish counterfactual fairness unless the causal model and intervention semantics have been justified. Merehaven uses the narrower term “matched-pair linguistic audit”.
No criterion is a legal conclusion. ICO guidance distinguishes statistical algorithmic-fairness measures from the broader fairness principle in data protection law and advises considering the surrounding context, power, governance and cumulative effects.8 The guidance was marked under review following the Data (Use and Access) Act 2025 at this edition’s cut-off. Merehaven treats it as regulatory guidance whose status must be rechecked, not as a universal formula.
Useful criteria can conflict
Different base rates can make calibration and equal error rates incompatible, apart from constrained cases such as perfect prediction. The formal results depend on their assumptions, but the engineering consequence is plain: a team cannot choose all desirable properties by naming them in a policy.91011
Consider a synthetic scoring fixture. Alder and Birch are invented audit labels with 100 records each. They are not demographic groups and the values are not Merehaven measurements.
| Group and score | Records | Observed positives | Observed rate |
|---|---|---|---|
| Alder, | 80 | 20 | 25% |
| Alder, | 20 | 15 | 75% |
| Birch, | 20 | 5 | 25% |
| Birch, | 80 | 60 | 75% |
At both displayed scores, the observed rate equals the score in each group. The small fixture is calibrated at those points. Apply the common threshold , however, and the error profile changes:
| Measure | Alder | Birch |
|---|---|---|
| Base rate | 35% | 65% |
| Predicted positive | 20% | 80% |
| TPR | ||
| FPR | ||
| PPV |
When , positive predictive value is:
It is undefined for a group with no predicted positives. Equality of PPV across groups is called predictive parity. Both groups in the fixture have a PPV of 75 per cent, yet neither the true-positive rate nor the false-positive rate is equal. The table illustrates one conflict; it is not a proof of the full theorem or a reason to abandon fairness work.
The fairness decision record now has to say what the output represents, who bears false positives and false negatives, whether one error is reversible, and which criterion matches that harm. It also records rejected metrics and the reason for rejection. “Industry standard” and “the metric looked best” are not adequate rationales.
Do not let small groups disappear
An overall estimate gives the most common cases the greatest weight. That is often statistically stable and sometimes operationally misleading. The people exposed to the largest harm may occupy the smallest cells.
Each group estimate travels with:
- the numerator and denominator;
- the collection and outcome windows;
- the number of missing or excluded records and why;
- the confidence or uncertainty procedure;
- dependence, repeated observations and delayed labels;
- reviewer or evaluator disagreement;
- the number of groups and measures examined; and
- the predeclared rule for reporting, pooling, suppression or qualitative review.
A zero numerator does not prove zero risk. A binomial interval can express sampling uncertainty, including a positive upper bound when no event is observed, but it does not correct selection bias, label error, dependence, multiple testing or drift. Missing group data is not evidence that performance is equal.
The small-sample policy has two duties that can pull in opposite directions. It must avoid presenting unstable estimates as precise, and it must avoid making a small population invisible. Suppression protects people from re-identification; it must not become a convenient way to omit a harmful pattern from internal review. Merehaven can restrict the detailed cell to an authorised audit environment while reporting the finding and action at a safer level of aggregation.
Differentially private training or statistics may further widen uncertainty or change utility unevenly across groups. Empirical work has found disparate accuracy effects from differentially private learning in studied settings.12 That result is neither universal nor permission to weaken privacy for a minority population. Candidate privacy configurations are assessed for group utility, uncertainty and disclosure risk together. Any change to purpose, access or protection requires its own authorised decision.
Govern the attributes used for audit
Removing a protected field from operational input does not prevent a system from learning proxies. Conversely, collecting or inferring protected attributes for an audit can create a sensitive dataset and a new risk. “Fairness through unawareness” is not a sufficient strategy, but awareness needs a lawful and bounded design.13
Merehaven does not guess ethnicity, religion, disability or another protected characteristic from names, postcodes, language or writing style. Such inferences can be wrong, can reproduce stereotypes and may themselves amount to sensitive processing. An approved audit dataset records whether each attribute was supplied, observed or derived, its provenance and expected quality.
Where special category data is processed, the record identifies an Article 6 lawful basis and an Article 9 condition, together with any required basis in UK law and any required appropriate policy document. The ICO notes that there is no single Article 9 condition created specifically for assessing discrimination in AI; applicability depends on the circumstances.14 Legal review also distinguishes UK data protection categories from Equality Act protected characteristics. They overlap but are not identical.
Audit-only attributes are separated from case decision and drafting services. The data contract names:
- the specific fairness harm and compatible purpose;
- the population, group definitions and intersectional plan;
- collection source, quality checks and missing-data treatment;
- access roles and segregation from operational decision-making;
- minimisation, retention, deletion and safe release rules;
- protection against singling out and re-identification;
- customer or community review where appropriate; and
- the date on which the lawful basis, policy and need must be reconsidered.
Under section 19 of the Equality Act 2010, indirect discrimination involves the application of a provision, criterion or practice, group and individual disadvantage, and whether the practice can be justified as proportionate to a legitimate aim.15 Scope and legal analysis are fact-specific. A statistical disparity can trigger investigation and legal review; the dashboard does not decide that discrimination has occurred.
Audit the language, not only the outcome
A matched-pair linguistic audit holds evidential meaning constant while varying one declared surface feature. Controlled evaluations have exposed differences in language-system behaviour that aggregate accuracy can miss.1617 Merehaven’s protocol uses synthetic cases because the goal is to isolate behaviour without exposing customers.
The pair is valid only when a domain reviewer confirms that both versions have:
- the same authorised evidence passages and citation set;
- the same approved reason codes and upstream outcome;
- equivalent chronology, amounts, product and policy context;
- the same prompt, model, retrieval result, tool policy and output budget; and
- one predeclared change relevant to the hypothesis.
Deterministic decoding is used where available. When generation remains stochastic, the protocol fixes a seed schedule, generates repeated paired samples and analyses paired differences rather than selecting a convenient example. Review order is randomised. Reviewers are blinded to the pair identity where practical, and disagreement is retained.
For illustration, both synthetic drafts below refer to the same evidence and the same internal finding that more documentation is required:
- Omission and added uncertainty
- Draft A: “The record contains the 14 May call note and the 16 May account entry.”
- Draft B: “The record appears to contain an account entry.”
- Audit mark: B omits the call note and adds uncertainty.
- Evidence gap changed into speculation
- Draft A: “The current evidence does not establish who authorised the change.”
- Draft B: “The customer may not have authorised the change.”
- Audit mark: B shifts from a limitation in the evidence to speculation about the person.
- New risk framing
- Draft A: “Request the signed instruction before review continues.”
- Draft B: “Consider enhanced scrutiny before review continues.”
- Audit mark: B adds risk framing that is absent from the reason code.
The visible feature changed to construct the pair is not shown in the reviewer view. The annotations evaluate:
- evidence omission or unsupported addition;
- certainty, hedging and burden-of-proof language;
- urgency, suspicion and risk framing;
- empathy, respect and accessibility;
- detail, citation and explanation completeness;
- escalation or enhanced-review recommendation; and
- whether the wording remains faithful to approved reason codes.
The finding is local. It says that the candidate was sensitive under the declared transformation and test distribution. It does not identify a causal mechanism, prove a legal violation or guarantee performance on natural cases. Merehaven tests plausible intersections and ordinary language variation as well as single-attribute pairs, then checks whether the mitigation improves unpaired representative cases.
Explain from the decision record
An explanation has a target. It may explain an observed decision, the evidence used, a rule that applied, a score’s main validated contributors, the fairness controls around a process, the limits of the system or the person responsible for review. Combining these into fluent prose does not make them interchangeable. ICO and Alan Turing Institute guidance distinguishes several explanation needs, including rationale, data, fairness, safety and performance, impact, and responsibility.18 That guidance was marked under review following the Data (Use and Access) Act 2025 at this edition’s cut-off, so the taxonomy is used as dated guidance rather than current statutory wording.
The Evidence Desk is not allowed to reverse-engineer a plausible reason from an outcome. Its explanation path has four separate records:
- Decision record. The responsible engine or human records the outcome, version, time, policy and decision owner.
- Evidence record. It identifies the inputs and evidence actually used, including omissions, quality limits and any uncertainty or abstention.
- Approved reason record. Controlled reason codes state the authorised basis and map to reviewed wording constraints.
- Rendered explanation. The Evidence Desk turns those records into clear language, cites the evidence and preserves limitations. A human checks fidelity before any downstream use.
A model-generated rationale, attention map or chain of thought is not automatically a faithful account of another mechanism. Faithfulness must be defined against the process being explained and tested independently.19 Research has shown that attention weights need not uniquely explain a model’s prediction, while a published response argues that this result does not rule out every explanatory use of attention.2021 The safe conclusion is narrower: attention requires a separately validated explanation claim. Experiments have also demonstrated unfaithful chain-of-thought explanations under particular prompting conditions.22 Merehaven does not treat hidden reasoning or a self-description as decision provenance.
The explanation evidence record contains:
| Field | Required content |
|---|---|
| Decision identity | Case, decision owner, timestamp, outcome and status |
| Mechanism | Exact rule, model or process version that supplied the outcome |
| Inputs actually used | Feature, document and passage references, with authorised scope |
| Reason basis | Approved reason codes, policy version and applicable exception |
| Limits | Missing evidence, uncertainty, abstention, contested data and known scope limits |
| Rendering | Prompt and renderer version, generated text digest and citations |
| Fidelity | Automated checks, reviewer corrections, approval and disagreement |
| Recourse | Responsible team and route to correct evidence, explanation or decision |
Fidelity tests compare each material sentence with the reason and evidence records. They detect:
- a reason code omitted or replaced;
- a new causal claim not present upstream;
- a direction, amount, date or party changed;
- uncertainty removed or invented;
- a policy exception flattened into a general rule;
- a citation that does not support its sentence; and
- wording that implies the Evidence Desk made the outcome.
If the upstream mechanism cannot supply adequate reason evidence, the model does not fill the gap. The draft states that the basis is unavailable and routes the case to the decision owner. Lack of provenance is an assurance failure, not a prompt-writing opportunity.
Make human review real
The label “human in the loop” says nothing about the quality of intervention. A reviewer may see only a polished draft, work under a queue target that makes source inspection unrealistic, or lack authority to reject the proposed text. That workflow can preserve automation bias while creating the appearance of control.
Merehaven tests five conditions:
| Condition | Operational evidence |
|---|---|
| Time | Queue design and staffing allow source inspection, correction and escalation |
| Information | The reviewer can see cited passages, reason codes, limitations, uncertainty and system version |
| Competence | Training and role assignment match the case type, customer need and data sensitivity |
| Authority | The reviewer can reject, rewrite, return or escalate without asking the model or being penalised for disagreement |
| Ability to change | Downstream use is blocked until review; the record captures what changed and why |
The Data (Use and Access) Act 2025 replaced UK GDPR Article 22 with Articles 22A to 22D. Article 22A defines a solely automated decision as one with no meaningful human involvement, and a significant decision as one producing a legal or similarly significant effect. Article 22C provides safeguards for significant decisions based solely on automated processing, including information, representations, human intervention and contest.23 The relevant Part 5 provisions commenced on 5 February 2026.24 Applicability depends on the processing and decision. The Evidence Desk’s human-reviewed internal draft is not automatically within those provisions merely because automation is present.
For high-risk AI systems within the EU AI Act’s scope, Article 14 describes oversight capabilities that include understanding limitations, monitoring operation, recognising automation bias, interpreting output, disregarding or overriding it, and intervening or stopping the system.25 That provision is not presented here as a classification of the Evidence Desk. It reinforces a practical point: effective oversight needs interface, competence and authority, not a ceremonial click.
Merehaven samples reviewer behaviour as well as model output. Measures include source-opening rate, material edit rate, unsupported-claim removal, escalation, time spent, disagreement, correction by group and whether downstream gates actually stopped unreviewed drafts. These observations are interpreted with care. A high edit rate can indicate a weak model, attentive review or both. A low rate can indicate quality, automation bias or an unusable interface.
Monitor a changing system
Fairness evidence expires when data, language, policy, model, retrieval, reason-code catalogue, interface or reviewer behaviour changes. Merehaven links five checkpoints:
- Dataset and purpose review defines the harm, population, group data, lawful processing, provenance and label limitations.
- Model and pathway audit measures retrieval, evidence use, outcome metrics, calibration where relevant and matched linguistic behaviour.
- Human-workflow trial tests comprehension, authority, workload, accessibility and the ability to change the draft.
- Controlled release binds the tested model, prompt, corpus, policy, renderer, reason catalogue and monitoring plan.
- Operational monitoring and re-audit looks for drift in inputs, group coverage, language, corrections, escalations and customer-impact signals.
Re-audit triggers are tied to events rather than a decorative calendar:
- a material model, prompt, retrieval, policy or reason-code change;
- a new population, channel, product, language or accessibility use;
- a changed label or outcome-maturity definition;
- evidence of uneven omission, correction, escalation or reviewer reliance;
- a privacy change that alters group-level utility or audit power;
- a material shift in group coverage or missingness; or
- an incident, complaint, legal change or credible challenge to the fairness claim.
A scheduled review still catches slow change, but its cadence follows impact, evidence freshness and sample accumulation. The chapter establishes no universal minimum group size, disparity threshold or review interval.
Fairness decision record: ED-FR-01
Candidate ED-FR-01 is not ready for controlled release until its accountable owner can answer the following with current evidence:
- Which people, decisions and language-assisted consequences are inside the assessment, and which are outside it?
- What harm is being tested at each point in the pathway?
- How were group attributes obtained, under what authority, with what provenance, missingness, access and retention controls?
- Which historical outcomes or reviewer actions are treated as labels, and what makes them fit for that use?
- Which fairness question and metric match the harm, which competing criteria were rejected, and who authorised that choice?
- Does each reported rate or score state its domain, numerator, denominator, uncertainty, zero-denominator rule and observation window?
- Do small or intersectional groups remain visible without creating an avoidable disclosure risk?
- Do matched-pair tests preserve evidence and outcome while measuring omission, hedging, risk framing, tone, citation and escalation?
- Can each explanation sentence be traced to the actual evidence and approved reason record, without relying on generated self-rationale?
- Does the reviewer have time, information, competence, authority and a working mechanism to alter or reject the draft?
- Are statistical findings routed to the appropriate model-risk, data-protection, equality, customer-impact and legal review rather than labelled as legal conclusions?
- Do named change and drift triggers force re-audit before the claim becomes stale?
The release question is not whether the system has a fairness score. It is whether Merehaven can show who may be harmed, how the harm was measured, what the evidence cannot establish, why one trade-off was chosen and who is responsible for changing the system.
Chapter 11: Build an assurance case that can survive change
The release dashboard is green. Security testing passed three weeks ago. Privacy review is marked complete. The supplier has supplied its latest assurance report. An operational owner has clicked approve.
At the meeting, one question breaks the spell: which exact test result supports the claim that an Evidence Desk reviewer cannot retrieve a document they could not open in the source system?
The security tile links to a folder. The folder contains two penetration-test reports, a screenshot of a policy rule and the minutes of an architecture meeting. One report predates the current retrieval service. The other tested the service before a cache was added. The screenshot has no environment or policy version. The minutes say that permission trimming “will be enabled”.
Nothing in the folder is necessarily false. The argument is missing.
Merehaven Bank pauses the release. It does not need another green tile. It needs a bounded claim, the controls intended to make that claim true, tests capable of proving the controls wrong, evidence from the candidate release and a person with authority to decide what the remaining uncertainty means.
That structure is an assurance case. It turns governance from a collection of documents into an inspectable line of reasoning.
Start with the claim, not the evidence folder
Evidence has meaning only in relation to a claim. A successful prompt-injection test says little about tenant isolation. A supplier certificate says little about the bank’s prompt construction. A model card for a base model does not describe a retrieval index built six months later. Even a well-run audit is bounded by the system, population, method and date that it examined.
Merehaven writes each assurance argument with eight parts:
| Part | Question it must answer |
|---|---|
| Claim | What exactly is asserted about which release, users and conditions? |
| Context | Which model, data, prompt, policy, tools, workflow and exclusions bound it? |
| Control | What is intended to keep the claim true? |
| Challenge | What test, observation or exercise could expose failure? |
| Evidence | Which immutable result was produced, by whom, when and for what versions? |
| Defeater | What known fact or plausible counterexample would undermine the argument? |
| Owner | Who can accept, narrow, reject or withdraw the claim? |
| Expiry | Which date or material change forces fresh evidence? |
The top-level claim for candidate ED-2026.07-R3 is deliberately modest:
Within the staff-only boundary declared for
ED-2026.07-R3, the Evidence Desk can produce a source-grounded internal draft from evidence the reviewer is already authorised to see, without making the bank’s decision or carrying out a consequential action.
The claim does not say that the model is safe in every use. It does not cover customer-facing communication, complaint decisions, credit decisions, redress, account changes, payments, unrestricted search or autonomous tool use. If the deployment later acquires one of those capabilities, the old claim does not stretch to fit. It expires.
A socio-technical claim also cannot stop at the model boundary. Reviewers, queues, training, organisational incentives, escalation routes and ownership can make a technically sound control ineffective. Conversely, a workflow can contain a model limitation only while its staffing, authority and operating conditions remain true.
The six-part view is practical rather than decorative:
- People covers competence, authority, workload, accessibility needs and the distribution of knowledge.
- Process covers intake, authorisation, evidence review, escalation, correction, incident response and rights handling.
- Culture covers whether staff challenge polished output, report near misses and treat refusal as a legitimate result.
- Structure covers ownership, independence, funding, supplier relationships and who can stop a release.
- Technology covers data, model, prompts, retrieval, policy enforcement, tools, interfaces, logs and dependencies.
- Goals covers the outcome being pursued and the pressures that may displace safety: throughput, cost, consistency or queue reduction.
Merehaven does not let “human review” compensate for an impossible queue target, or “monitoring” compensate for an owner who cannot pause the service. Those are contradictions inside the assurance argument.
Record applicability before quoting a rule
Law and regulation do not attach to the phrase “banking AI” as a single block. Relevance can depend on the legal entity, territory, role, intended purpose, affected person, product, decision, deployment channel and date. The first governance artefact is therefore an applicability card, not a list of acronyms.
For every proposition Merehaven records:
| Field | Example for the fictional case |
|---|---|
| Legal entity and role | Merehaven entity operating an internal assistance service; classification to be confirmed for each regime |
| Intended purpose | Retrieve authorised evidence and draft a cited internal note |
| Explicit exclusions | No complaint, credit or redress decision; no customer communication or account action |
| Users and affected people | Trained staff; people whose authorised case records may be summarised |
| Territory and channel | Named deployment regions and staff channel only |
| Source and status | Enacted text, rule, guidance, draft, consultation, speech, policy report or voluntary standard |
| Material date | Source version and applicability date checked on 28 July 2026 |
| Interpretation owner | Named legal or compliance function, with business and technical contributors |
| Revisit trigger | Purpose, role, population, territory, law, regulator position or workflow changes |
This discipline prevents three common errors: treating a proposal as law, turning guidance into a universal threshold, and carrying a valid conclusion from one system into another with a different purpose.
A dated regulatory snapshot
The snapshot below is educational context as at 28 July 2026. It does not classify the Evidence Desk or replace fact-specific advice.
European Union. Regulation (EU) 2024/1689 uses defined roles, intended purpose and specified categories. Annex III includes systems intended to evaluate the creditworthiness of natural persons or establish a credit score, with a stated exclusion for detecting financial fraud.1 That does not make every model used by a bank high-risk. Regulation (EU) 2026/1744, published on 24 July 2026 and in force from 27 July, amended the timetable. At this edition’s cut-off, Chapter III, Sections 1–3 apply from 2 December 2027 for Article 6(2) and Annex III systems, and from 2 August 2028 for Article 6(1) and Annex I systems.2 Draft Commission classification guidelines were still draft material after consultation closed on 23 July 2026; they are not final law or guidance.3
United Kingdom. The FCA’s published AI approach remains principles- and outcomes-based and says that it does not plan additional AI-specific regulation, while pointing firms to existing frameworks where applicable.4 That statement does not remove existing obligations or decide which apply to Merehaven. The Consumer Duty depends on the firm, service and retail-customer relationship.5 PRA Supervisory Statement SS1/23, in its version effective from 23 April 2026, has a specified scope: it is not a rule for every firm or every language model.6
Operational resilience and third parties. The first UK oversight of designated critical third parties began on 13 July 2026. The regulators were explicit that the regime complements rather than replaces firms’ responsibilities for their third-party arrangements.7 Designation is not authorisation of a provider or certification of each service. For in-scope EU financial entities, the Digital Operational Resilience Act has applied since 17 January 2025 and includes requirements concerning registers of ICT third-party arrangements.89
The applicability card preserves those distinctions. A project team can still adopt a strong control where no particular rule compels it, but the assurance case labels the reason honestly: legal requirement, regulatory expectation, contractual promise, internal policy, customer-outcome protection or prudent engineering.
Allocate decisions, not just tasks
A governance chart often shows everyone involved and nobody answerable. A RACI table can have the same weakness when “accountable” means the person who receives the meeting invitation rather than the person who can decide.
Merehaven maps authority around material decisions:
| Decision | Proposes | Challenges | Decides | Can block or reverse |
|---|---|---|---|---|
| Change intended purpose or prohibited actions | Product owner | Risk, legal, security, data protection and operations | Accountable business owner within delegated authority | Release authority |
| Admit a corpus or licence | Data owner | Rights and privacy reviewers | Corpus admission owner | Data-governance owner |
| Change model, prompt, retrieval or tool contract | Engineering owner | Independent validation and control owners | Change authority | Release authority |
| Accept a residual limitation | Claim owner | Independent challenger and affected control owners | Named risk-acceptance authority | Higher authority where threshold is exceeded |
| Respond to an access or erasure request | Rights coordinator | Legal and data-protection reviewer | Authorised rights decision owner | Legal hold or escalation authority |
| Declare an incident and notify | Incident lead | Legal, privacy, security and operations | Designated incident authority | Crisis or regulatory-notification authority |
| Release, roll back or retire | Release owner | Independent assurance | Release authority | Operational kill-switch owner |
The FCA’s Senior Managers Regime material explains that Senior Management Function holders have Statements of Responsibilities and that delegating tasks does not remove accountability.10 FCA Handbook SYSC 26 addresses systematic and explicit allocation of overall responsibility for relevant activities in firms within its scope.11 Merehaven uses the underlying design principle without inventing an AI-specific prescribed responsibility or asserting that every fictional role maps to a real Senior Management Function.
The model appears nowhere in the “decides” column. Nor does “the committee”, unless the committee’s mandate, quorum, individual authority and escalation route are recorded. Supplier ownership also remains separate from bank accountability. A vendor can operate a control or produce evidence; it cannot accept Merehaven’s residual customer or regulatory risk.
Make rights follow the information
At 09:12 on a Tuesday, Merehaven receives synthetic rights case MH-RR-0042. The verified requester asks for access to personal data connected with a payment dispute and, where the legal conditions are met, erasure of unnecessary derived copies.
A search of the complaint platform finds the source case. That is the beginning, not the answer.
The source document produced text extractions. Chunks entered a search index. One authorised retrieval event copied passages into a prompt. A draft and reviewer correction entered the case record. Minimised telemetry entered an operational log. A quality sample contains a pseudonymous reference. A processor retains a short-lived encrypted backup. An older adaptation experiment may have used a collection that included the case, but the manifest records the collection rather than row-level membership.
The rights team needs a lineage graph that admits uncertainty.
The ICO’s subject-access guidance, updated on 16 July 2026, describes access to a copy of personal data and supplementary information, a reasonable and proportionate search, the general response period and possible extensions, exemptions or restrictions.12 Its erasure guidance stresses that the right is not absolute.13 Those legal decisions require authorised review. Engineering must make the relevant records discoverable and the resulting action verifiable.
Merehaven’s lineage registry uses immutable identifiers and typed relationships. W3C PROV’s Entity, Activity and Agent concepts offer a useful optional vocabulary for derivation and responsibility, but W3C PROV is not a banking mandate and does not make an incomplete graph complete.14
The minimum chain links:
source → extraction → chunk → index build → retrieval event → prompt assembly → generated draft → reviewer edit → retained record
Separate links cover evaluation samples, adaptation collections, checkpoints, logs, exports, replicas, backups and processors. Every node has an owner, system, data class, retention rule, permitted action and evidence location.
The following safe example from the companion implementation produces a plan. It does not delete a record or claim that erasure has been completed:
from datetime import datetime, timezone
from reference_implementation import LineageNode, plan_deletion
now = datetime(2026, 7, 28, 9, 30, tzinfo=timezone.utc)
subject = "MH-CUST-SYNTHETIC-0042"
nodes = (
LineageNode(
"case-source-0042",
"source-record",
frozenset({subject}),
("search-chunk-019", "quality-sample-007"),
deletable=True,
),
LineageNode(
"search-chunk-019",
"vector-index-record",
frozenset(),
(),
deletable=True,
),
LineageNode(
"quality-sample-007",
"evaluation-sample",
frozenset(),
("adapter-run-2026-04",),
deletable=True,
),
LineageNode(
"adapter-run-2026-04",
"adaptation-artefact",
frozenset(),
(),
deletable=False,
),
)
plan = plan_deletion(subject, nodes, now)
complete = not plan.issues and all(
step.action != "investigate" for step in plan.steps
)The planner walks declared derivatives downstream before the source. It can identify direct deletion, expiry, a reviewed legal hold or an artefact that requires investigation. In this fixture, the adaptation artefact prevents complete from becoming true. The next decision might be exclusion from future training, membership investigation, validated unlearning, retraining, lawful retention or another documented response. The planner cannot make that legal or scientific judgement.
For MH-RR-0042, the completion manifest lists each discovered node, action, owner, timestamp, result and proof. It records any authorised retention and its review date. It lists processors contacted and reconciles their confirmation. If a link is uncertain, the case remains open or is escalated; the uncertainty is not converted to “not found”.
Put licence evidence in the same lineage
Personal-data rights and content rights are different legal questions, but they need much of the same engineering: origin, authority, purpose, transformation, downstream use, retention and action on change.
The UK copyright exception for text and data mining in section 29A concerns copies for non-commercial research where there is lawful access. It is not a blanket permission for commercial AI training.15 The UK Government’s 2026 copyright and AI report restates the general need for permission before restricted acts unless an exception applies, and notes the territorial character of copyright.16 Policy options and consultation proposals are not current law.
Merehaven therefore records, for each governed collection:
- the asserted source and rights holder;
- acquisition date and route;
- licence or contract version;
- permitted purposes, users, territories and transformations;
- separate permissions for retrieval, evaluation, adaptation and training;
- confidentiality, attribution, output and onward-disclosure restrictions;
- expiry, revocation, deletion and audit terms;
- legal interpretation owner; and
- the evidence supporting every material field.
“Publicly reachable”, “customer supplied”, “available inside the bank” and “licensed for this use” are different states. If an upstream model’s documentation says only “mixed web data”, the downstream user has uncertainty, not provenance.
The assurance case does not pretend that a perfect rights ledger exists. It states coverage. A collection can be restricted to retrieval while a licence question remains unresolved for adaptation. A corpus admission gate can block new material whose rights record is incomplete. Output similarity and memorisation tests can challenge a reproduction-risk claim, but they do not create a missing licence.
Keep suppliers inside the evidence boundary
The Evidence Desk depends on services Merehaven did not build: cloud infrastructure, a model or runtime, security libraries, identity components and observability tools. Outsourcing operation does not outsource the assurance argument.
A supplier schedule is service-specific:
| Evidence area | What Merehaven records |
|---|---|
| Service identity | Exact service, feature, region and version in the release |
| Data use | Inputs, outputs, logs, retention, training use and deletion route |
| Sub-processors | Named chain, locations, material-change notice and objections |
| Security | Service-specific controls, vulnerabilities, patching and customer configuration |
| Resilience | Dependency tier, tested failure modes, recovery, concentration and exit |
| Incidents | Detection boundary, notification commitments, investigation evidence and preservation |
| Audit | Report scope, period, exclusions, bridge evidence and customer control responsibilities |
| Change | Model, term, location, sub-processor, interface and deprecation triggers |
| Exit | Export, deletion, replacement, rollback and last-tested date |
A corporate assurance report may be useful while still failing to cover the feature, region or period in use. A passed supplier test may depend on a customer-side setting that Merehaven has not enabled. The gap belongs in the claim, not in a footnote hidden from the release authority.
The May 2026 Bank of England, FCA and HM Treasury statement on frontier AI and cyber resilience emphasised governance, vulnerability management, third-party risk, protection, response and recovery while stating that it did not introduce new expectations.17 NCSC secure-development guidance similarly covers secure design, development, deployment, operation and supply-chain practices; it is guidance rather than legislation.18 These sources inform Merehaven’s control objectives. They do not certify its provider.
Scale translation: an large-bank-scale pattern
The following is a public-pattern architectural exercise, not a claim about a named UK bank systems, projects or controls.
At a large regulated bank scale, a staff evidence assistant could cross several brands, case platforms, identity domains, document stores, cloud environments, supplier contracts and retention schedules. A single model version would be one small part of the assurance surface. The difficult questions would include:
- whether a peer’s brand, role and case assignment narrow retrieval before ranking;
- whether brand-specific policy and reason codes remain distinct;
- whether lineage keys survive movement between case, search, evaluation and analytics platforms;
- whether a rights request reaches every derived store and processor without widening staff access;
- whether supplier evidence covers the exact regions and features used;
- whether a shared platform change invalidates evidence for one, several or all deployments; and
- whether each operating entity has a named decision owner and tested stop route.
The scalable answer is not one enormous approval. It is a common assurance schema with local applicability records, typed dependencies and claim-specific evidence. A shared retrieval control can be assessed once where its configuration is genuinely common; local corpus rights, workflows and customer consequences still need local evidence. Reuse follows demonstrated equivalence, not organisational convenience.
Test whether the reviewer can really intervene
Chapter 10 introduced five conditions for meaningful review: time, information, competence, authority and the practical ability to change the result. The assurance case tests them together.
The matrix exposes attractive but weak arrangements:
- A reviewer with source access but no authority can identify an error and still be unable to stop it.
- An authorised reviewer with a queue of eighty drafts may approve by default.
- A subject-matter expert who sees only generated prose cannot verify its provenance.
- A trained reviewer whose disagreement harms a performance score is not independent in practice.
- A review button that permits editing after downstream release is not an effective gate.
The Data (Use and Access) Act 2025 replaced UK GDPR Article 22 with Articles 22A–22D. The explanatory material describes solely automated processing by reference to the absence of meaningful human involvement and identifies safeguards for significant decisions based solely on automated processing, including information, representations, contest and human intervention.19 All data-protection provisions of the Act were in force by 19 June 2026, according to the ICO’s current overview.20 The ICO’s 2026 automated-decision guidance was still a consultation draft at this edition’s cut-off; consultation closed on 29 May and final guidance was expected later.21
The fictional Evidence Desk does not make the bank’s decision, and this book does not conclude that those provisions govern it. Merehaven nevertheless uses the meaningful-involvement test because nominal oversight is a poor control in any high-consequence workflow.
Operational evidence comes from observed behaviour, not training attendance alone. A trial gives reviewers representative correct drafts, subtle omissions, unsupported risk language, wrong citations and prohibited action proposals. It records whether they open sources, identify the problem, reject or correct the draft, use escalation, and prevent downstream use. Workload and interface conditions match the planned service. A perfect result in a quiet laboratory does not cover a production queue.
Give evidence an identity and an expiry
An evidence file needs a machine-readable envelope:
| Field | Why it matters |
|---|---|
| Evidence identifier and digest | Identifies the exact artefact reviewed |
| Claim and control identifiers | Prevents an unrelated test being attached |
| Producer and independent reviewer | Establishes attribution and challenge |
| Release dimensions | Binds model, prompt, policy, corpus, tool and dependency versions |
| Population and environment | Bounds where the result can be generalised |
| Method and acceptance rule | Makes the challenge reproducible and falsifiable |
| Result, uncertainty and exceptions | Preserves counter-evidence |
| Collection and review time | Establishes age |
| Valid-until rule | Forces calendar-based refresh |
| Change triggers | Forces earlier invalidation when assumptions move |
| Retention and location | Makes the artefact retrievable during review or incident |
NIST describes its AI Risk Management Framework as voluntary, and the framework was under revision at this edition’s cut-off.22 UK government AI-assurance material provides useful methods and examples, but it does not turn an assurance technique into a legal certificate.23 ISO/IEC 42001 specifies an AI management-system standard and ISO/IEC 23894 provides AI risk-management guidance; neither proves that one deployed workflow is lawful, secure or correct.24
Merehaven uses such frameworks as indexes and vocabularies. The assurance case remains claim-specific.
Evidence expires on a date and on an event. The change-trigger register includes:
- model, adapter, quantisation or serving-runtime change;
- prompt, policy, retrieval, renderer or tool-contract change;
- new data source, licence, embedding model or index build;
- identity, authorisation, logging or network-boundary change;
- material population, language, channel or case-mix shift;
- new processor, sub-processor, region or material dependency;
- incident, rights failure, fairness signal or credible new attack;
- law, regulation, supervisory position or contract change;
- monitoring outside a declared bound; and
- change in reviewer authority, workload or workflow.
Each trigger names the affected claims, immediate containment, owner, evidence to refresh, response time and closure authority. A notification that never reaches release governance is not a control.
Make the gate fail closed
The release gate consumes assurance results; it does not decide whether a law applies or whether residual risk is acceptable. Its job is narrower: reject a candidate when required evidence is absent, stale, failed, ambiguous or unauthorised.
This companion example uses UTC timestamps, an explicit expected set and immutable evidence references:
from datetime import datetime, timedelta, timezone
from reference_implementation import GateResult, evaluate_release
now = datetime(2026, 7, 28, 10, 0, tzinfo=timezone.utc)
expected = frozenset({
"authorisation-isolation",
"citation-fidelity",
"prohibited-action-containment",
})
gates = (
GateResult(
"authorisation-isolation",
mandatory=True,
status="pass",
checked_at=now - timedelta(days=4),
maximum_age=timedelta(days=30),
evidence_ref="sha256:" + "a" * 64,
),
GateResult(
"citation-fidelity",
mandatory=True,
status="pass",
checked_at=now - timedelta(days=3),
maximum_age=timedelta(days=14),
evidence_ref="sha256:" + "b" * 64,
),
GateResult(
"prohibited-action-containment",
mandatory=True,
status="unknown",
checked_at=now - timedelta(hours=1),
maximum_age=timedelta(days=7),
evidence_ref="sha256:" + "c" * 64,
),
)
decision = evaluate_release(expected, gates, now)
assert decision.allowed is False
assert decision.blockers == (
"prohibited-action-containment: status is unknown",
)The function also blocks missing evidence, future timestamps, non-positive validity windows, stale results, unexpected gates and waivers without recorded authority. A production envelope would additionally bind every result to the exact release dimensions and invalidate affected results when a registered change occurs. The short listing demonstrates the conjunctive decision, not a complete governance service.
Authorised waivers require caution. “Waived” is not another spelling of “passed”. The waiver record states the unmet claim, reason, affected people, compensating control, authority, duration, monitoring and exit. A release decision can still reject a formally authorised waiver when the residual exposure exceeds the decision owner’s mandate.
Assemble the argument, including what could defeat it
The final structure is a tree, but it is read as an argument.
Merehaven’s five subclaims are:
- Authorised evidence only. Retrieval and cache behaviour cannot widen the reviewer’s source-system permissions.
- Faithful and privacy-bounded drafting. Material sentences trace to authorised evidence or approved reason records, and the declared privacy limits remain supported.
- Prohibited-action containment. The model cannot decide the case, communicate externally or execute an account or payment action because deterministic policy keeps those capabilities absent.
- Meaningful human control. A competent reviewer has evidence, time, authority and an effective stop before downstream use.
- Monitored recoverability. Incidents and material changes are detected, contained, investigated, recovered and routed into re-assurance.
Every branch includes a defeater. A successful test does not erase contrary evidence. If monitoring finds a permission-trimming bypass, the first claim is not “mostly green”; it is open. If an incident exposes a supplier change that the schedule missed, the third-party evidence is stale even before its calendar expiry.
The decision vocabulary is:
- Accept within the recorded boundary and evidence validity.
- Accept with a time-bound condition only where the authority, compensating control, monitoring and expiry are explicit.
- Narrow the users, corpus, features, throughput or action surface until the supported claim matches reality.
- Reject when a mandatory claim is unsupported or residual uncertainty exceeds authority.
Merehaven assurance record ED-AC-01
Candidate ED-2026.07-R3 cannot reach Chapter 12’s release decision until its owner can answer these questions with current evidence:
- Is the top claim precise about release identity, users, purpose, prohibited actions, territories and exclusions?
- Does every applicable legal or regulatory proposition record entity, role, intended purpose, territory, date, source and source status?
- Does each material claim have an accountable owner who can reject or withdraw it?
- Are task operation, evidence production, independent challenge, release, rights response and incident authority allocated without hidden gaps?
- Does reviewer evidence demonstrate competence, source access, time, independence, authority and a working stop?
- Can the lineage registry trace source, extraction, index, retrieval, draft, reviewer record, evaluation, adaptation, log, backup and processor links?
- Does a rights workflow preserve identity checks, legal scope, exceptions, uncertainty, propagation and completion evidence?
- Do corpus records distinguish access from permission and retrieval from evaluation, adaptation or training rights?
- Does third-party evidence cover the exact service, feature, region, period and customer-side configuration in use?
- Does every evidence envelope identify the claim, method, versions, population, result, uncertainty, owner, age and immutable artefact?
- Do calendar expiry and material-change triggers invalidate affected claims before release continues?
- Are contradictory results, incidents, exceptions and limitations visible to the decision owner?
- Does the fail-closed gate reject missing, stale, failed, unknown or unauthorised evidence?
- Is the final decision accept, conditional accept, narrow or reject, with authority, reasons, expiry and rollback route?
The question at the next release meeting is no longer “Are all the tiles green?” It is “Which bounded claims are true now, what could make them false, and who has the evidence and authority to decide?”
Chapter 12: Make the release decision
The release meeting begins with a refusal.
Candidate ED-2026.07-C1 is built, deployed in a test environment and linked to a complete-looking assurance folder. Its retrieval index has been rebuilt from the approved synthetic corpus. The policy code has not changed. An authorised reviewer can open a synthetic payment-dispute file, while a user from another unit receives a denial.
The authorisation-isolation test report is also green. It names the old index digest.
That one mismatch is enough. The report may be accurate about the system it tested, but it is not evidence about this candidate. Merehaven’s release authority records reject. Operations leaves the service in hold while the affected evidence is rerun.
Nobody is asked whether the new index is probably equivalent. Nobody turns the old report into a waiver. The meeting has done its job because it can say no.
Every Merehaven identifier, event, result, date and interval in this chapter, including the green report status and executable fixture, is fictional, synthetic and illustrative. Nothing describes a real bank.
Release is an attributable human decision about one service, one purpose, one population and one period of validity. A pipeline can check whether declared evidence is present and fresh. It cannot decide which law applies, whether a reviewer will have meaningful control, whether contrary findings have been resolved honestly or whether the remaining risk is within a person’s mandate. The decision owner needs both evidence and authority.
Freeze the service being decided
A model name is not a release candidate. The Evidence Desk includes the base model and any adapter, but also the prompt, retrieval corpus, extraction and embedding pipeline, index, authorisation policy, tool contracts, serving runtime, output checks, interface, reviewers, logs, suppliers, recovery procedure and manual fallback.
Merehaven freezes those parts in an immutable candidate manifest:
| Manifest field | What the release record binds |
|---|---|
| Identity | Release identifier, source revision and build digest |
| Model path | Base model, adapter, quantisation, licence, provider version and artefact digests |
| Retrieval path | Corpus, extraction, embedding and index manifests, with their digests |
| Control path | System prompt, policy bundle, feature flags, tool contracts and credential model |
| Runtime | Image, libraries, hardware class, endpoint, region and deployment configuration |
| Information path | Data classes, purpose, retention, redaction, logs and evidence-store configuration |
| Human path | Eligible staff, training state, workload assumptions, decision boundary and support route |
| Supply path | Supplier, sub-processor, service, terms, retention setting and location |
| Recovery path | Last known-good bundle, manual continuity route, stop authority and tested restoration procedure |
| Applicability | Entity, territory, role, intended purpose, affected population, prohibited uses and dated source status |
The NCSC’s secure-development guidance recommends recording the sources, versions, limits and relevant security properties of models, data and prompts. Its deployment guidance also points to cryptographic hashes or signatures, pre-release security evaluation and documented limitations.1 Those practices do not make a candidate safe by declaration. They make it possible to say what was tested.
A material change either creates a new candidate or invalidates named evidence. A provider alias that silently points to a different model is a behavioural change. So is a rebuilt index, a new prompt, a different authorisation rule, a tool-schema change or a move to another processing region. The NCSC’s operation guidance treats changes to data, models and prompts as capable of changing system behaviour and calls for secure updates, monitoring and versioned interfaces.2
Merehaven’s release manifest therefore records dependencies as part of the service boundary, not as footnotes to it.
The architecture also makes the decision boundary concrete. The Evidence Desk may search evidence the reviewer is already authorised to see, extract facts, summarise them, draft an internal note and propose reviewer questions. It cannot decide a complaint, credit or redress; change an account; make a payment; send customer communication; disclose a restricted document; widen permission; or approve its own output.
This resembles the FCA’s public description of people retaining judgement while AI extracts facts and analyses unstructured text. It is not regulatory approval of Merehaven’s design, nor evidence that a staff-only assistant is low risk.3 The actual boundary has to be enforced and tested in the service.
Walk the same boundary in both directions
A happy-path demonstration proves very little. Before release, Merehaven walks one authorised request and one scope-violating request through the same components. Both traces use synthetic records and fictional identities.
Trace B: denied scope, minimised forensic event
User MH-STAFF-099 is authenticated but has no assignment to case MH-PD-2048. The request stops at case authorisation. Retrieval receives no search instruction, the model receives no case content and no draft is created.
The denial event contains the minimum fields needed for investigation: event time, pseudonymous actor reference, candidate, policy version, requested operation, protected case reference, decision code and correlation identifier. It does not preserve the attempted free-text prompt unless a separately governed investigation requires it.
The safe ending is not a polite model refusal. It is absence of capability after a deterministic policy decision. Privacy by design and default supports limiting processing and access at the point of design rather than relying on downstream clean-up.4
The pair of traces catches an important class of false assurance. A system can produce excellent cited drafts for authorised users while still leaking documents across cases. It can also deny an obvious forbidden prompt while a cache, log or tool bypasses the same policy. Merehaven releases only when the intended path works and the prohibited path remains unavailable.
Reconcile claims instead of averaging scores
The release secretary assembles the candidate-specific assurance packet from Chapter 11. A high score in one domain cannot cancel a failed boundary in another. Better prompt logging may help an investigation while increasing privacy exposure. A stricter output filter may reduce unsafe drafts while creating unacceptable false refusals for a particular group. Those are findings to resolve, not numbers to average.
Each mandatory claim receives one evidence state:
| State | Meaning | Release effect |
|---|---|---|
| Supported | Candidate-specific evidence meets its declared rule and no unresolved defeater contradicts it | May continue |
| Failed | The method ran correctly and the rule was not met | Reject |
| Missing | Required evidence does not exist or cannot be retrieved | Reject |
| Stale or mismatched | Evidence names another candidate, scope, population or validity period | Reject |
| Indeterminate | The method failed, uncertainty exceeded its declared bound or competent reviewers disagree materially | Reject pending resolution |
The packet covers the intended-use boundary, identity and authorisation, privacy and rights, threat and security testing, retrieval fidelity, draft quality, fairness, human oversight, reliability, suppliers, incident readiness, recovery, limitations and monitoring. The precise set depends on the system and its applicability analysis, but every declared mandatory item is conjunctive.
This approach is compatible with the NIST AI RMF’s continuing Govern, Map, Measure and Manage functions, including monitoring, third-party risk, human intervention, incident response and change management. The framework is voluntary and under revision at this edition’s cut-off. It does not prescribe Merehaven’s gate or certify the service.5
Keep applicability dated
The applicability card travels with the evidence packet. It records the operating entity, territories, roles, intended purpose, population, decision boundary, source status, interpretation owner and invalidation trigger. The phrase “banking AI” is not a classification.
That discipline matters at this edition’s cut-off. Regulation (EU) 2026/1744, published on 24 July 2026 and in force from 27 July, amended the EU AI Act timetable. For systems classified under Article 6(2) and Annex III, the relevant high-risk provisions in Chapter III, Sections 1 to 3 apply from 2 December 2027, except for Article 6(5); the corresponding date for Article 6(1) and Annex I systems is 2 August 2028.6 This does not classify the fictional Evidence Desk. Its staff-only drafting purpose is not automatically the creditworthiness or insurance use named in Annex III.
UK status also needs dates and scope. The ICO says the Data (Use and Access) Act 2025 amended rather than replaced the existing data-protection framework, and that the provisions affecting data-protection law and PECR were in force by the cut-off.7 Several ICO pages used in the assurance case, including its accountability, AI, fairness and privacy-enhancing-technology material, were marked under review. Draft automated-decision guidance was not final guidance.8
For firms subject to the relevant provisions, the FCA’s current Principle 11 and SUP 15.3 notification expectations continue while new standardised operational-incident rules take effect on 18 March 2027.9 A release record signed in July 2026 must not apply the future thresholds as if they were already in force. It should name an owner and a review before that date.
PRA Supervisory Statement SS1/23 provides useful support for inventory, governance, validation, monitoring, use restrictions and controlled exceptions, but its stated institutional scope is specific. Whether a particular assistant is a model for that statement also needs analysis. Merehaven may adopt the engineering pattern without claiming that the statement applies.10
The card is therefore a live control. A changed purpose, legal view, entity, territory or regulator publication can invalidate the decision before any software component changes.
Let the first candidate fail
The manifest for ED-2026.07-C1 binds index sha256:illustrative-index-c1. The authorisation-isolation envelope binds sha256:illustrative-index-previous. Its policy and test-suite versions match the current build, but the candidate dimension does not.
Merehaven records:
decision: REJECT
operational_state: HOLD
candidate: ED-2026.07-C1
blocking_claim: AUTHORISATION-ISOLATION
evidence_state: STALE_OR_MISMATCHED
candidate_index: sha256:illustrative-index-c1
evidence_index: sha256:illustrative-index-previous
required_action: rerun the isolation suite and independent review
Reject is the decision. Hold is the operational state that follows while the team repairs, re-scopes or abandons the candidate. Calling hold a fifth decision would make it too easy to leave an unapproved service quietly running.
Narrowing is different. If Merehaven removes a data source, tool, user group or integration to eliminate an unsupported claim, it freezes a new candidate. The change can affect workflow, evaluation, reviewer load and operational risk, so every directly or indirectly affected envelope is refreshed.
Use software to fail closed, not to own the decision
The reference implementation contains a small structural gate. It rejects a missing, stale, failed, unknown, future-dated, blank-reference, malformed, duplicate, unexpected or improperly waived gate record. This executable fixture models a mismatch already classified upstream by assigning unknown; digest comparison is outside this excerpt:
from datetime import datetime, timedelta, timezone
from reference_implementation import GateResult, evaluate_release
NOW = datetime(2026, 7, 28, 9, 0, tzinfo=timezone.utc)
EXPECTED = frozenset(
{
"authorisation-isolation",
"boundary",
"evaluation-fidelity",
"fairness-oversight",
"incident-readiness",
"privacy-rights",
"service-recovery",
"threat-security",
}
)
def passed(gate_id: str, candidate: str) -> GateResult:
return GateResult(
gate_id=gate_id,
mandatory=True,
status="pass",
checked_at=NOW - timedelta(hours=2),
maximum_age=timedelta(days=1),
evidence_ref=f"mh://evidence/{candidate}/{gate_id}",
)
c1 = [passed(gate_id, "ED-2026.07-C1") for gate_id in EXPECTED]
c1 = [
GateResult(
gate_id=gate.gate_id,
mandatory=gate.mandatory,
status="unknown",
checked_at=gate.checked_at,
maximum_age=gate.maximum_age,
evidence_ref="mh://evidence/previous-index/authorisation-isolation",
)
if gate.gate_id == "authorisation-isolation"
else gate
for gate in c1
]
hold = evaluate_release(EXPECTED, c1, NOW)
assert not hold.allowed
assert hold.blockers == ("authorisation-isolation: status is unknown",)
c2 = [passed(gate_id, "ED-2026.07-C2") for gate_id in EXPECTED]
gate_clear = evaluate_release(EXPECTED, c2, NOW)
assert gate_clear.allowed
assert len(gate_clear.passed_gates) == 8The listing is deliberately modest. allowed=True means that this declared evidence gate is clear. It does not mean that software has approved the release. The function checks that an evidence reference is non-empty; it does not prove that the reference is a valid digest, that a method was competent or that the evidence supports the claim. Integrity and methodological review are separate controls.
The code also permits an authorised waived status. In the surrounding protocol that status is valid only when upstream policy has classified a precise, non-blocking deviation as waivable; the gate record itself remains required. It must never relabel a failed mandatory privacy, rights, security or legal claim. An unresolved condition or active waiver rules out unconditional acceptance even if this lower-level structural gate is clear.
Software can verify closed vocabularies, timestamps, identifiers, expected records and signatures. Humans must decide:
- which legal and regulatory regimes apply;
- whether the intended-purpose statement matches operational reality;
- whether a method and population make the evidence persuasive;
- whether contradictory findings have been resolved;
- whether review is meaningful under real workload and authority;
- whether residual risk is acceptable within a named mandate;
- whether supplier assurance transfers to this service; and
- whether the activation and recovery plans are credible.
The gate enforces declared policy. It does not supply the judgement behind that policy.
Record one of four outcomes
The durable record uses four outcomes:
| Outcome | Decision test | Consequence |
|---|---|---|
| Accept | Every mandatory claim is supported by fresh candidate-bound evidence; no blocker, unresolved conditionable finding, active condition or waiver remains; limitations and residual risks have authorised owners; monitoring and recovery are ready | Activate only the declared boundary |
| Conditional accept | The accept test remains true for mandatory claims; each non-blocking deficiency is bounded, observable, reversible, time-limited and within the owner’s mandate | Activate with explicit conditions, expiry and a predetermined stop response |
| Narrow | Removing a named capability, population, data source, integration or territory eliminates the defeated claim without creating an unassessed service | Freeze a new manifest and rerun affected evidence before activation |
| Reject | Mandatory evidence is failed, missing, stale, mismatched or indeterminate; a material contradiction remains; authority is absent; or safe containment and recovery are not demonstrated | Do not activate; record the blockers and preserve the packet |
A finding is counter-evidence or an unmet condition. A waiver is authorised permission to operate despite a precisely defined, non-mandatory deviation. A waiver does not alter the test result.
Every conditionable finding or waiver needs a stable identifier, affected claim and candidate, evidence and dissent, owner, delegated mandate, permitted boundary, monitoring signal, threshold, response, remediation, expiry, early-expiry triggers and stop action. A more senior title is not automatically the right approver. The person needs authority over this type and magnitude of residual risk, plus the practical ability to narrow or stop the service.
This vocabulary keeps two uncomfortable facts visible. First, a condition cannot rescue failed mandatory evidence. Second, an acceptance can still be limited. Authorising a named staff cohort with no customer communication is an acceptance of that narrow boundary, not a conditional approval of a wider service.
Activate without pretending exposure is evidence
Acceptance authorises a declared activation path. It does not require an instantaneous full launch.
Merehaven first rehearses with synthetic cases and no live side effects. It can then run in shadow mode, where a draft cannot enter a case record, before enabling the named cohort. Feature flags keep every prohibited integration absent. Expansion requires the decision record’s observations to be reviewed and the candidate boundary to remain unchanged.
These steps limit exposure; they do not repair failed evidence. A successful shadow run cannot prove that live data, staff reliance, workload or customer effects are acceptable. Each stage must already be authorised for the data and people it touches.
The manual complaint-evidence workflow remains available. Reviewers need a clear signal that the assistant is unavailable, a route to continue casework and authority to report pressure to bypass the stop. Operational resilience is about delivery of the underlying service, not the uptime of one model. The FCA asks in-scope firms to identify important business services, set impact tolerances, map resources, test scenarios and learn from them.12 Merehaven does not assume that the Evidence Desk is itself an important business service. It maps how failure could affect the complaint-handling service and its manual capacity.
Start the operating cadence
The signature starts monitoring and re-assurance:
| Cadence | Evidence watched | Decision path |
|---|---|---|
| Timely operational signals | Access denials, prohibited-action attempts, source and citation failures, service health, dependency errors, security events and stop-condition breaches | Named responder investigates, contains and invokes the recorded stop rule |
| Defined operational review | Overrides, discarded drafts, near misses, reviewer workload, contested evidence, monitoring gaps and rights-operation failures | Control owner changes the workflow, refreshes evidence or returns the candidate to release review |
| Defined outcome review | Complaint-handling effects, differences between relevant customer groups, foreseeable-harm signals, root causes and intervention results | Business and fairness owners decide whether to correct, narrow, suspend or re-evaluate |
| Every material change | Model, adapter, prompt, policy, tool, corpus, index, population, supplier, region or workflow impact | Invalidate named envelopes, freeze a candidate and rerun affected evidence |
| Evidence expiry | Envelope age and continued method validity | Replace the evidence or stop before it becomes stale |
| Legal or regulatory event | New law, rule, final guidance, court decision, supervisory statement or qualified legal interpretation | Applicability owner updates the card and reopens affected claims |
A dashboard without an owner, tolerance and response is observation, not control. The FCA’s July 2026 outcomes-monitoring discussion emphasises structured evidence, justified indicators, links from management information to decisions, senior challenge and checking whether an intervention worked.13 It is a regulator blog, not a new rule or a universal metric set. Merehaven uses the practical test: what decision will this signal change, for whom and within what time?
Monitoring can also invalidate its own assurance. If a logging failure hides the signal used by a conditional stop rule, the condition is no longer observable. If a reviewer queue removes the time needed to inspect citations, the meaningful-oversight claim is open even if model behaviour is unchanged.
Treat supplier change as service change
A supplier report, model card or management-system certificate is evidence with a scope and period. It is not a transferable conclusion about the Evidence Desk.
For each model, cloud, API, embedding, safety or observability supplier, Merehaven records the exact service and version, sub-processors, regions, data use, retention, security state, notice period, preview path, incident commitment, assurance scope and exit route. A silent model-alias change invalidates behaviour evidence. A report for another region or period is stale.
UK regulators began oversight of the first designated critical third parties in July 2026 and stated that the regime complements rather than replaces firms’ responsibility for their own third-party arrangements.14 Designation is not approval of a supplier for this service. FCA material on outsourcing and operational resilience likewise keeps responsibility with the firm and treats dependencies over their life cycle.15
The release record therefore pre-authorises neither provider changes nor emergency convenience. A material notice triggers impact analysis, preview testing, evidence refresh and a new decision. If evidence cannot be obtained, Merehaven narrows, exits or stops.
Recover, then decide again
Incident handling connects cyber, privacy, legal, regulatory, operational and customer-harm branches. The sequence is:
- contain the affected feature or service;
- revoke or isolate access where needed;
- preserve trustworthy logs, manifests and evidence;
- classify the event and start the applicable notification clocks;
- continue essential work through the manual route;
- restore a verified known-good service where restoration is safe;
- confirm that the restored boundary matches an approved candidate;
- investigate root and contributing causes;
- remediate people, process, supplier and technical failures; and
- invalidate evidence and make a fresh release decision.
The NCSC’s incident-management collection treats preparation, response and recovery as continuing organisational capabilities. NIST SP 800-61 Revision 3 integrates incident response with wider cyber-risk management.16 Neither source supplies a universal UK notification test.
The ICO requires organisations to record personal-data breaches and, where the legal risk test is met, notify the ICO without undue delay and where feasible within 72 hours. Communication to affected people has a separate high-risk test.17 Not every AI quality or operational event is a personal-data breach. Other regimes may create other clocks. The incident authority needs the current applicability card, not a blanket “72-hour AI incident” rule.
Rollback has limits. It cannot retract text already viewed, reverse a disclosure, repair an unfair customer outcome or recover a missed legal deadline. Some events require containment, customer response and remediation rather than restoration of the previous model. A rollback is therefore a recovery control, not time travel.
Keep federation outside the default release
An optional federated adaptation changes the trust and release boundary. It must not borrow the Evidence Desk decision.
In the fictional extension, raw training records are designed to remain at participating sites. Local clients clip and perturb updates before upload, then a secure-aggregation protocol reveals an aggregate under declared assumptions. Updates, aggregates, metrics, participant identifiers and protocol metadata still move. “No data moves” would be false.
The release packet binds the privacy unit, neighbouring relation, clipping location, noise mechanism, epsilon, delta, accountant and composition across rounds. NIST SP 800-226 recommends examining those elements and common implementation hazards rather than accepting “DP enabled” as a guarantee.18 ICO PET guidance also presents differential privacy, secure multiparty computation and federated learning as techniques with residual risks and governance needs; the page was under review at this cut-off.19
Secure aggregation is a separate confidentiality claim. The actual protocol’s participant threshold, dropout behaviour, coordinator trust, authentication, key lifecycle and collusion bound must be stated and tested. A protocol paper’s dropout property cannot be copied into Merehaven as a universal threshold.20
Confidential aggregation is not participant integrity. Hiding individual updates may make a malicious update harder to inspect. Admission controls, attestation, Sybil resistance, robust aggregation and poisoning or backdoor tests remain separate claims. The NCSC’s current adversarial-attack taxonomy includes training-data poisoning, malicious training and model-artefact manipulation; it does not claim those attacks are always detectable.21
The completed round is not the decision. Merehaven hashes the aggregate adapter, records its provenance, evaluates utility, privacy, security and fairness, and sends it through the normal release process. Participant withdrawal, unexpected dropout, privacy-budget exhaustion, collusion evidence, failed attestation, poisoning signals or a protocol change invalidates the federated packet.
The release record is the beginning
Before C2 can serve even its named staff cohort, its signed record answers:
- Which exact model, adapter, prompt, policy, tools, corpus, index, runtime, region and supplier configuration is being decided?
- Which purpose, users, data, actions and environments are authorised, and which remain prohibited?
- Which dated applicability analysis supports the decision?
- Is every mandatory claim supported by fresh candidate-bound evidence?
- Which findings, dissent, limitations and uncertainties remain visible?
- Who owns each residual risk, and what delegated mandate permits that ownership?
- What can the software gate verify, and which judgements remain human?
- Who can activate, stop, narrow, roll back and retire the service?
- Which monitoring signal has which owner, tolerance and response?
- What manual route preserves the underlying service?
- What change or evidence expiry reopens the decision?
- When is the next review, and where are the rejected and accepted packets retained?
For ED-2026.07-C1, one mismatched envelope makes the answer no. For ED-2026.07-C2, the answer can become yes only after the affected evidence is rerun and every other mandatory claim remains supported. The signature does not certify permanent safety. It states that a named authority has enough current evidence and mandate to accept one bounded service, while preserving the ability to stop when that evidence changes.
Appendix A: Merehaven boundary and evidence contracts
This appendix turns the book’s recurring Merehaven example into a compact design brief. Merehaven Bank and every identifier below are fictional. The examples show how a large UK retail-bank pattern can be reasoned about without claiming knowledge of a named UK bank or another institution’s internal systems, controls or data.
The service contract
The Evidence Desk has one purpose: help an authorised peer inspect evidence and prepare an internal draft. The service contract is narrower than the model’s linguistic ability.
| Contract field | Merehaven declaration |
|---|---|
| Users | Named, trained peers in an approved workforce channel |
| Objects | Versioned policy and case records already within the peer’s authority |
| Permitted operations | Search, retrieve, extract, compare, summarise, cite and draft |
| Output | A visibly provisional internal note with evidence references |
| Human boundary | A peer inspects the evidence and owns every case decision and record write |
| Prohibited operations | Customer communication, payment, account change, eligibility or complaint decision, redress, permission widening and self-approval |
| Continuity | Authorised manual casework using the same case and document permissions |
| Stop condition | Any loss of authorisation isolation, evidence integrity, meaningful review, required monitoring or known-good recovery |
The contract belongs in trusted application state. Prompt text may explain the boundary to the model, but it does not create the boundary. A request that fails case authorisation must not reach retrieval, a cache, a tool or the model.
Minimum evidence envelope
An evidence item is useful only when a reviewer can identify what it supports, how it was produced and when it stops applying. A release packet therefore binds each mandatory claim to an envelope with the following fields:
| Field | Purpose |
|---|---|
claim_id |
Stable identifier for the proposition being tested |
candidate_id |
Exact application, model, prompt, policy, tool and runtime candidate |
method_id |
Versioned test or review method |
fixture_refs |
Immutable references to synthetic or approved test inputs |
result |
Supported, failed, missing, stale or indeterminate |
evidence_refs |
Digests or durable locations for raw observations and reports |
limitations |
Known exclusions, uncertainty and conditions of interpretation |
producer |
Person or service that produced the evidence |
reviewer |
Independent challenger where the claim requires one |
observed_at |
UTC-aware time of the observation |
expires_at |
Declared latest time at which the evidence may be relied upon |
change_triggers |
Events that invalidate the envelope before its time expiry |
The envelope is not a scorecard. A high retrieval-quality result cannot offset a failed authorisation-isolation test. A clean vulnerability scan cannot replace a rights analysis. Mandatory claims are conjunctive.
Four fictional large-bank variants
The same boundary pattern can support several large-bank-scale thought experiments. These are public-pattern examples, not descriptions of any real bank.
Complaint evidence review
The assistant retrieves the complaint, relevant product terms, contact history and earlier decisions that the reviewer may already inspect. It can produce a cited chronology and flag missing evidence. It cannot decide whether the complaint is upheld, calculate redress, alter the customer record or send the response. A falsifying test attempts cross-case retrieval through direct queries, similar text, cached results and tool parameters.
Payment-dispute triage
The assistant extracts transaction facts and compares them with a versioned policy. It may propose questions for an investigator. It cannot mark a payment as fraudulent, reverse a transaction, freeze an account or contact a customer. Exact-action approval must bind the final operation, resource, amount, actor and expiry; approving prose about an action does not approve the action.
Financial-crime research support
The assistant can search approved public and internal evidence for a named investigation purpose. It may organise sources and discrepancies. It cannot decide suspicion, file or close a report, add a person to a list or disclose restricted investigative material. Audit events use pseudonymous references and bounded decision codes rather than copying source evidence into general telemetry.
Mortgage-operations document checking
The assistant can identify missing pages, extract declared fields and compare them with workflow requirements. It cannot decide eligibility, affordability, pricing or an application outcome. Group-level performance checks are paired with workflow review so that apparently equal average accuracy does not hide a different burden of manual correction.
Boundary review questions
Before adapting the pattern, answer these questions in order:
- Which human service is being assisted, and which outcome remains human?
- Which identity, purpose, case and operation must be true before evidence can move?
- Which sources are authorised for that exact principal and purpose?
- Which irreversible disclosure or action could occur before an output filter runs?
- Which parts of the workflow are probabilistic, and which must fail closed?
- What evidence would disprove the intended boundary?
- Who can stop the service, and can the underlying work continue safely?
- Which change to a model, prompt, index, supplier, policy or population reopens the decision?
If the answer to any question is unknown, the unknown belongs in the release packet. It must not be silently translated into pass.
Appendix B: Control catalogue and release handbook
This catalogue is a review aid, not a universal control set. A real deployment needs an entity-specific legal, privacy, security, operational-resilience and model-risk assessment. The useful unit is a control with an owner, a falsifying test, retained evidence and an expiry trigger.
Control catalogue
| ID | Control objective | Falsifying evidence | Minimum retained record |
|---|---|---|---|
| BND-01 | Bind the candidate to an exact manifest | A mutable alias or unrecorded dependency changes behaviour | Candidate ID, component versions, digests, regions and suppliers |
| IAM-01 | Authenticate the workforce principal | A request succeeds with an expired, wrong-channel or substituted identity | Identity configuration, session decision and correlation reference |
| AUT-01 | Authorise before retrieval or tool use | Restricted content appears in ranking, cache, logs or model context before the policy decision | Principal, purpose, case, object, operation, policy version and outcome |
| DAT-01 | Minimise source and context data | The model receives fields that are not needed for the declared purpose | Field inventory, minimisation rationale and context trace |
| RET-01 | Preserve evidence provenance | A generated claim cannot resolve to a source version and span | Document ID, version, digest, access label and cited span |
| MOD-01 | Bound model behaviour | A draft contains unsupported claims or prohibited action language without abstention or review | Prompt and model versions, evaluation fixture and per-trial outcome |
| TOOL-01 | Constrain capabilities outside the model | A persuasive string can widen a schema, resource scope, amount or action class | Closed schema, grant, policy decision and rejected boundary fixtures |
| HUM-01 | Preserve meaningful human control | Queue pressure, interface design or automation bias removes practical review | Workflow exercise, workload evidence, overrides, discards and escalations |
| LOG-01 | Retain useful but minimised audit evidence | General telemetry contains protected prompt or case content without a governed need | Audit schema, field-level rationale, retention and access test |
| SEC-01 | Admit only verified artefacts | An unsigned, mismatched or unscanned artefact reaches serving | Digest, signature result, provenance, scan and admission decision |
| MON-01 | Connect signals to action | A dashboard threshold has no owner, response or tested stop route | Signal, tolerance, owner, escalation, stop action and exercise result |
| REC-01 | Recover the underlying service | Model failure removes the manual route or restoration returns an unapproved candidate | Manual procedure, known-good bundle, restoration test and authority |
| SUP-01 | Bound supplier change | A provider changes a model, region, retention term or sub-processor without evidence refresh | Contract scope, notice, preview test, exit path and affected claims |
| RGT-01 | Operate correction and erasure routes | Source deletion leaves unexamined derivatives, indexes, caches, logs or recipients | Lineage, action by store, propagation record, exceptions and verification |
| FAIR-01 | Examine unequal effects and burdens | Aggregate performance hides a material group or workflow disparity | Population definition, denominators, uncertainty, intervention and outcome review |
| REL-01 | Require conjunctive release evidence | An average score masks a failed, missing, stale or mismatched mandatory claim | Claim register, evidence envelopes, findings, dissent and signed outcome |
Release secretary’s sequence
The release secretary coordinates evidence but does not manufacture it and does not sign for another authority.
- Freeze a candidate identifier and immutable manifest.
- Enumerate mandatory claims and their applicability owners.
- Reject duplicate, missing, future, stale, malformed or candidate-mismatched evidence.
- Reconcile counter-evidence, open incidents, supplier changes and reviewer dissent.
- Confirm that every condition has a bounded scope, owner, monitor, threshold, response and expiry.
- Confirm that the human decision authority has the right delegated mandate.
- Record accept, conditional accept, narrow or reject; treat hold as the operational state after rejection.
- Activate only the signed boundary through a controlled feature path.
- Start monitoring, review and evidence-expiry clocks.
- Preserve both accepted and rejected packets.
Condition and waiver test
A condition is defensible only when the mandatory claim remains supported and the deficiency is observable, reversible, time-limited, within mandate and paired with a predetermined stop response. A waiver records permission to operate despite a precisely stated non-mandatory deviation. It does not change the test result and cannot rescue failed privacy, rights, security, legal or other mandatory evidence.
For every condition or waiver, record:
- a stable identifier and affected claim;
- the exact candidate and permitted boundary;
- the evidence, contrary evidence and dissent;
- the owner and source of delegated authority;
- the monitor, threshold, response and stop action;
- the remediation plan and due date;
- time expiry and early-expiry triggers; and
- the evidence needed for closure.
Incident-to-release bridge
An incident response and a release decision are connected but distinct. The response contains immediate harm; the release process decides whether a known candidate may operate again.
| Incident step | Release consequence |
|---|---|
| Contain or disable the affected path | Record the actual boundary that was stopped |
| Preserve trustworthy evidence | Protect manifests, policy decisions, audit references and clocks |
| Classify obligations | Use the current applicability record rather than a generic notification rule |
| Continue authorised manual work | Measure capacity and pressure to bypass the stop |
| Restore a known-good service | Verify that the restored bundle matches an approved candidate |
| Investigate causes and contributing conditions | Open findings against people, process, supplier and technical claims |
| Remediate and retest | Produce fresh candidate-bound evidence |
| Decide again | Accept, condition, narrow or reject through the normal authority |
Rollback cannot retract information already viewed, reverse a disclosure, repair an unfair outcome or recover a missed deadline. Those consequences need their own customer, legal, privacy and operational responses.
Reader’s final review card
Before approving an implementation derived from this book, ask for five objects: the boundary, the candidate manifest, the mandatory claim register, the evidence packet and the signed decision. If one cannot be retrieved, the implementation is not publication-ready assurance merely because a model demo works.
Appendix C: Executable laboratory
The laboratory is a defensive reference implementation, not a deployable bank service. It uses the Python standard library, synthetic fixtures and no network, model, vector database, cloud account or customer system. Its purpose is to make control boundaries executable and falsifiable.
The frozen companion files are:
reference_implementation.py, containing the control contracts; andreference_tests.py, containing deterministic unit and property-style fixtures.
Exercise map
| Exercise | Reference operation | Question made executable |
|---|---|---|
| Purpose-bound processing | authorise_processing |
Does the purpose, asset, data class, lawful basis and validity window match? |
| Authorised retrieval | authorised_documents |
Are tenant, case, purpose, sensitivity and active-state checks applied before return? |
| Leakage-rate reporting | rate_estimate and compare_attack_rates |
Are numerator, denominator, uncertainty and zero-baseline behaviour explicit? |
| Membership evaluation | membership_metrics |
Are confusion counts and undefined denominators preserved rather than hidden? |
| Synthetic canary audit | canary_exposure |
Is rank interpreted only inside the declared candidate space? |
| Differential-privacy record | validate_dp_record and basic_compose |
Are unit, adjacency, mechanism, epsilon, delta, clipping, accountant and horizon bound together? |
| Minimised logging | redact_for_logging |
Does the returned result omit raw text and reject unsafe or non-idempotent rules? |
| Policy/evidence separation | render_model_context |
Can untrusted evidence escape its delimiter or impersonate trusted policy? |
| Capability-scoped tools | authorise_tool_call |
Does a closed grant bind tenant, case, purpose, resource, arguments, impact and time? |
| Exact-action approval | canonical_action_bytes, action_digest and authorise_execution |
Does any post-approval change invalidate execution? |
| Consumption ceilings | check_consumption |
Are exact money, token and request limits enforced before use? |
| Artefact admission | verify_artefact and signed_manifest_payload |
Does the payload match the expected immutable record? |
| Audit projection | project_audit_event |
Are bounded fields retained without copying unrestricted raw content? |
| Lineage-aware deletion | plan_deletion |
Are source, derivative, model and recipient actions kept distinct? |
| Conjunctive release gate | evaluate_release |
Do failed, unknown, stale, malformed or missing mandatory records block? |
Running the suite
From the publication companion directory, a reader can run:
python3 -W error -m unittest -q reference_tests.py
Warnings are treated as failures because a warning emitted only for a crafted boundary input can be evidence of an unsafe code path. A passing run means the declared fixtures behaved as expected in that environment. It does not prove coverage of a production integration, a cloud service, a model, an untested input type or a later dependency version.
Fixture discipline
Every exercise should retain:
- a synthetic input record;
- the exact control configuration;
- the expected allow or deny decision;
- the observed decision and reasons;
- the implementation and test digests;
- the interpreter and dependency versions; and
- the claim and release candidate that the fixture supports.
Positive fixtures demonstrate intended capability. Negative fixtures are at least as important: they show that a cross-tenant document, stale approval, unknown argument, mismatched action digest, expired grant or incomplete release record fails closed.
Extending the laboratory
Add a control only after its contract can be stated without model-specific language. For a fictional large-bank-scale complaint assistant, a useful extension might test case reassignment during an active session. The fixture would authenticate a peer, authorise the original case, remove the assignment, then attempt retrieval through the normal request, a cache key and a tool argument. The expected result is no returned evidence and a bounded denial record. The test must not use a real peer, case or policy identifier.
Keep model evaluation separate from deterministic authorisation. A model can pass a refusal fixture while the surrounding application still leaks through retrieval or logs. Conversely, the application can prevent disclosure even when the model emits undesirable text. Those are different claims with different tests.
What the laboratory does not claim
The module does not supply a production identity provider, policy engine, database transaction, cryptographic key service, differential-privacy accountant, fairness audit, incident store, append-only ledger or legal applicability decision. The richer evidence envelopes in Appendix A are a publication schema; they are not relabelled as an implemented durable store.
Use the laboratory as an executable specification. Replace each in-memory record with an approved production component only when the component preserves the same deny conditions, evidence fields and failure behaviour.
Glossary
Accountability. The ability to identify who was responsible for a decision, which evidence they used, what authority they held and how the decision can be reviewed.
Adapter. A separately stored set of learned parameters applied to a base model, often through a parameter-efficient method. Its smaller size does not make it private or low risk.
Adjacency. The rule that defines which two datasets are neighbours in a differential-privacy claim, such as adding or removing one protected unit.
Adversary. The actor, access level, knowledge, budget and objective used to define a threat or evaluation. Results cannot be interpreted without this contract.
Artefact admission. The decision to allow a model, adapter, prompt bundle or other versioned object into an environment after identity, provenance, integrity and policy checks.
Assurance case. A structured argument linking a bounded claim to controls, tests, evidence, counter-evidence, owners and expiry conditions.
Authentication. Verification of which principal is making a request.
Authorisation. A decision about what an authenticated principal may do to a particular object for a particular purpose and operation.
Availability. The ability of a service and its dependencies to perform when required. It includes safe continuity, not only component uptime.
Calibration. Agreement between predicted probabilities and observed frequencies for a declared population and time period.
Candidate. The exact combination of model, adapter, prompt, policy, tools, corpus, index, runtime, region, supplier and workflow submitted for a release decision.
Capability boundary. A deterministic limit on the information or actions a system can reach. A prompt instruction is not by itself a capability boundary.
Citation faithfulness. Whether a cited source actually supports the claim attached to it. Citation presence alone is insufficient.
Clipping. Bounding an individual contribution before aggregation, commonly used in differential-privacy mechanisms. The location and norm of clipping are part of the claim.
Condition. A bounded, observable, reversible and time-limited deficiency attached to an otherwise supported mandatory release case, with a named owner, response and expiry.
Confidentiality. The property that information is disclosed only to authorised entities.
Context. The input assembled for a model invocation, including trusted instructions, retrieved evidence, conversation state and tool results. These parts should retain distinct roles.
Counter-evidence. An observation that weakens or defeats an assurance claim. It remains visible even when other tests are favourable.
Defeater. A condition under which a claim no longer follows from its stated evidence, such as a cache bypass or a changed index digest.
Differential privacy. A formal comparison between the output distributions of a randomised mechanism on neighbouring datasets, parameterised by a privacy unit, adjacency rule, epsilon, delta and composition horizon.
Evidence envelope. A candidate-bound record containing a claim, method, result, evidence references, limitations, producer, reviewer, observation time, expiry and change triggers.
Extraction. Recovery of content through model interaction or artefact access under a declared success rule.
Fairness. The distribution of benefits, errors, burdens and opportunities across relevant people or groups. No single metric supplies a universal answer.
Federated learning. Training in which participating sites compute local updates and some form of update or aggregate moves. Raw records may remain local while updates and metadata still carry risk.
Finding. Counter-evidence, an unmet condition or another recorded issue that requires disposition.
Guardrail. A behavioural or policy check around an input, output or proposed action. It may reduce risk but does not automatically create data or action authority.
Human oversight. A practical ability to understand, challenge, alter, discard, escalate or stop a system outcome with adequate time, information and authority.
Indeterminate. An evidence state in which the method cannot support or fail the claim. It is not equivalent to pass.
Integrity. Protection against unauthorised or undetected change to data, policy, model, code, evidence or action.
Jailbreak. An interaction intended to induce model behaviour that a model policy sought to restrict. It is distinct from acquiring system permission.
Manifest. A canonical, versioned inventory of the components and dependencies that identify a release candidate.
Membership inference. Estimation of whether a protected unit was included in a training dataset. Evaluation requires both member and non-member cases and declared base rates.
Memorisation. Influence of particular training content on model behaviour. It is related to but not identical with extraction or membership inference.
Minimisation. Limiting collected, retained and disclosed data to what is necessary for the declared purpose.
Model alias. A mutable provider or registry name that can point to changing model bytes. An alias is not a stable release identity.
Narrow. A release outcome that removes a named capability, population, source, integration or territory, freezes a new manifest and reruns affected evidence.
Neighbouring datasets. Two datasets related by the declared adjacency rule for a differential-privacy analysis.
Privacy. The ways processing can affect people, including but not limited to unauthorised disclosure.
Privacy unit. The entity whose participation or contribution the privacy claim protects, such as a person, account, household or event.
Prompt injection. Untrusted content that changes how an application or model interprets instructions. Its severity depends on the data and capabilities the application exposes.
Provenance. Evidence of origin, version, transformation and custody for a source, artefact or decision record.
Reconstruction. Estimation of a protected record, attribute or representative input from model outputs, updates or artefacts.
Release gate. A deterministic check of evidence structure and required states. A gate can block but does not own the accountable human judgement.
Residual risk. Risk that remains after controls and evidence have been considered for the declared boundary.
Retrieval-augmented generation. Assembly of external evidence for a model invocation. Retrieval adds an authorisation and provenance surface; it does not make generated claims true by default.
Safety. Freedom from unacceptable harm under the declared use and exposure.
Secure aggregation. A protocol intended to reveal an aggregate without revealing each participant’s update under stated trust, threshold, dropout and collusion assumptions. It is not a poisoning defence.
Stop condition. A monitored event that requires containment, narrowing or suspension under a pre-recorded authority.
Synthetic data. Artificial data created for testing or illustration. It still needs review for accidental resemblance, leakage and unsafe assumptions.
Tool. A bounded application capability invoked through a schema, such as retrieval or record lookup. Tool parameters must be authorised independently of model persuasion.
Trust boundary. A point at which identity, authority, ownership or security assumptions change and therefore require an explicit control.
Waiver. Authorised permission to operate despite a precisely defined non-mandatory deviation. A waiver does not alter a failed test result.
Rights and credits
Copyright © 2026 Rajesh Mahapatra. All rights reserved.
Secure Language Model Systems: Privacy, Threat Modelling and Governed Deployment is an independent publication. It is not affiliated with or endorsed by a named UK bank, Rakuten Kobo, the regulators, standards bodies, research organisations, vendors or publishers cited in the text.
Merehaven Bank, the Evidence Desk and all associated people, customers, records, policies, transactions, incidents, metrics, thresholds and outcomes are fictional. “large-bank-scale” is used only as a scale and complexity thought experiment. No figure or example represents the internal architecture, controls, data, customers, performance or plans of a named UK bank or any other real organisation.
Original visual work
The cover and all 63 numbered figures are original vector information designs created for this edition under the author’s direction. They use native SVG shapes, live text and system-font fallback stacks. No stock image, icon pack, traced diagram, external template or Mermaid-rendered asset is incorporated. Figures use solid colour on an opaque white canvas. Labels, shapes, numbering and line styles repeat the meaning so that colour is not the sole carrier of information.
The colour system uses solid blue, green, yellow, coral, teal, orange and violet with dark navy ink. It deliberately excludes gradients, glow, blur, decorative shadows, translucency effects and wallpaper treatments.
Text, code and cited material
The prose, tables, fictional case study and publication-specific code are original to this edition except where a source is identified in a note. Short technical names, mathematical notation, standards terminology and product names remain the property of their respective owners.
The Python laboratory is provided for education and defensive testing. It uses synthetic fixtures and the Python standard library. Publication of source code does not grant permission to connect it to a live bank, customer, model, cloud account or restricted dataset.
External works are cited for research, verification and technical context. Copyright in those works remains with their authors and publishers. Links and citations do not imply endorsement of this publication.
Accessibility
The EPUB provides reflowable text, structural navigation, semantic tables, descriptive alternatives for informative figures, direct SVG titles and descriptions, and a white high-contrast reading surface. The package contains no audio, flashing content, animation, script or remote image dependency.
Accessibility testing covered EPUBCheck, archive and XML integrity, reading order, navigation, alternatives, captions, text contrast, 320-pixel and 736-pixel render proofs, and greyscale figure proofs. Kobo Previewer, a physical Kobo device, VoiceOver and DAISY Ace were not used for this edition’s local validation and are not claimed.
Edition record
First EPUB edition, 2026. Editorial cut-off: 28 July 2026. Time-sensitive laws, guidance, standards and product capabilities should be rechecked before they are relied upon for a real deployment.