Contents
What to cover
Sketch your own design first. A complete answer has these parts; the notes say what each should settle.
- Requirementsalert volumes and analyst capacity; decision rights (who decides); regulatory reporting needs; data access controls; latency per case; success metric (time per case, quality)
- Estimates
- API
- Data model
- Architectureexisting real-time scoring untouched; case service assembling features, transaction timelines and model explanations via tools/SQL; LLM summarisation and narrative drafting grounded in retrieved records with references; pattern highlights from deterministic analytics; analyst UI with accept/edit; audit log and model-risk documentation; evaluation with analysts (time saved, error rate, inter-rater checks); feedback into rules/models
- Deep divesthe narrative states a transaction amount that doesn’t exist — prevent it.; How do you show regulators how the copilot influenced decisions?
- Trade-offsautomation vs analyst judgement; LLM narrative vs templated text; data minimisation vs context richness; cost per case
- EvaluationLLM kept out of the scoring hot path; numbers from deterministic queries; grounded, auditable outputs; analyst-centred evaluation; privacy controls
Reference design
One way to answer it, part by part. Open a part once you have your own version of it.
Requirements
Functional: when an analyst opens an alert, show a brief (why it fired, key facts, transaction timeline, linked entities), highlighted suspicious patterns with evidence, answers to follow-up questions, and a draft case narrative (including SAR-style text) that the analyst edits and owns.
Assumptions to confirm
- Alert volumes and analyst capacity: ~15k fraud and financial-crime alerts/day; ~300 analysts at ~40 cases/day = 12k — a backlog today. Average 12 minutes per case.
- Decision rights: analysts decide (release, block, exit, file a SAR); the copilot never recommends a final disposition at launch and never contacts customers.
- Regulatory reporting: SARs to the NCA, including defence-against-money-laundering requests with statutory timelines; tipping-off rules mean nothing reaches customer-facing channels; five-year record keeping; model risk management expectations (PRA SS1/23 formally applies to banks with internal-model approval and covers AI-based models; others use it as good practice) should be applied to a tool that informs decisions.
- Data access controls: analysts see only cases they are assigned; least-privilege tools; data minimisation; no customer data used for model training; EU/UK hosting.
- Latency per case: brief ready when the case is opened (precomputed within 30 s of alert creation); follow-up answers < 5 s.
- Success metric: time per case down from 12 to ~7 minutes with no drop in decision quality; zero fabricated facts in narratives.
- Hard constraint: real-time fraud scoring (< 50 ms) is untouched.
Estimates
- Brief generation: 15k alerts × ~10k input tokens (≈ 200 transactions × 30 tokens + profile + model explanation + prior cases) = 150M input + 12M output tokens/day. At an assumed $3/M in, $15/M out: $450 + $180 ≈ $630/day.
- Interactive questions: ~3 per case × ~12k tokens → 540M input ≈ $1.6k, plus ~13.5M output ≈ $200 → ~$1.8k/day.
- Total: ~$2.4k/day ≈ 16 cents per case.
- Value: saving 5 minutes × 15k cases = 1,250 analyst-hours/day; at ~£35/hour loaded that is ~£44k/day, and the 12k-case capacity becomes ~20k, clearing the backlog.
- Data access load: ~10 parameterised queries per case → 150k queries/day (~2/s) against a read replica or warehouse — negligible, and never against the scoring path’s stores.
- Audit storage: evidence snapshots, outputs and edits ≈ 200 KB per case → 3 GB/day, ~5.5 TB over five years.
API
Event in: alert.created {alert_id, customer_id, rule_or_model, score, reason_codes} → precompute brief
GET /v1/cases/{id}/brief
→ {summary, timeline: [{ts, event, ref}], highlights: [{pattern, explanation, evidence_refs[]}],
open_questions[], refs: {"tx:8812": {...}}, model_version, generated_at}
POST /v1/cases/{id}/ask {question} → {answer, refs[], queries_run[]}
POST /v1/cases/{id}/narrative/draft {template: "internal"|"sar"} → {sections: [{text, refs[]}]}
PUT /v1/cases/{id}/narrative {final_text, accepted_sections[], edits}
Read-only tools the LLM can call (parameterised, scoped to the case’s customer and counterparties):
get_transactions(customer_id, from, to, filters) get_counterparties(customer_id, window)
get_kyc_profile(customer_id) get_model_explanation(alert_id)
get_prior_cases(customer_id) run_pattern(name, params) # deterministic analytics
No tool writes, decides or files anything; dispositions stay in the case-management system.
Data model
- Alert / Case: owned by the existing case-management system; the copilot stores only references.
- EvidenceRecord: ref_id (e.g.
tx:8812), source table and primary key, query hash, snapshot of the values used, retrieved_at. Everything the LLM may mention must exist here. - PatternResult: pattern name (velocity spike, structuring, new payee then drain, round amounts, mule indicators, shared device), parameters, result, evidence refs.
- Brief / NarrativeDraft: version, model and prompt versions, text with ref placeholders, validator result.
- AnalystInteraction: questions asked, answers shown, sections accepted, edit diff, time on case.
- AuditEvent (immutable): who saw what, what the copilot showed, what was accepted, final decision reference and decider.
- ModelRiskRecord: inventory entry, intended use, limitations, validation results, monitoring thresholds, approvals.
Architecture
Flow · 5 stepsCopilot beside real-time scoring
- Scoring path Card auth feeds unchanged real-time scoring, which feeds the decision and also emits alerts to the case-management system.
- Alert to copilot The case-management system streams CDC copies to the read replica and fires alert.created to the copilot case service.
- Evidence and patterns Evidence assembly uses typed tools and SQL scoped to the case; deterministic analytics turn it into pattern facts with refs.
- Draft and validate The LLM writes the brief and narrative from the evidence bundle only; the renderer fills references and the validator fails closed on unmatched figures.
- Analyst and audit The analyst UI shows the brief, timeline and highlights with accept, edit and reject; the audit log records what was shown and accepted.
Data
| Step | Title | What happens |
|---|---|---|
| 1 | Scoring path | Card auth feeds unchanged real-time scoring, which feeds the decision and also emits alerts to the case-management system. |
| 2 | Alert to copilot | The case-management system streams CDC copies to the read replica and fires alert.created to the copilot case service. |
| 3 | Evidence and patterns | Evidence assembly uses typed tools and SQL scoped to the case; deterministic analytics turn it into pattern facts with refs. |
| 4 | Draft and validate | The LLM writes the brief and narrative from the evidence bundle only; the renderer fills references and the validator fails closed on unmatched figures. |
| 5 | Analyst and audit | The analyst UI shows the brief, timeline and highlights with accept, edit and reject; the audit log records what was shown and accepted. |
Source: This page's text
| Box | Group | Detail |
|---|---|---|
| Card auth | Scoring | authorisation path |
| Real-time scoring | Scoring | unchanged, < 50 ms |
| Decision | Scoring | authorisation decision |
| Case management system | Case data | owns alerts and cases |
| Read replica / warehouse | Case data | CDC copies |
| Evidence assembly | Copilot case service | typed tools / SQL, scoped |
| Deterministic analytics | Copilot case service | velocity, structuring, graph links |
| LLM | Copilot case service | brief and narrative |
| Renderer | Copilot case service | fills references |
| Validator | Copilot case service | fail closed |
| Analyst UI | Outputs | accept / edit / reject |
| Audit log | Outputs | model-risk · feedback |
Source: This page's text
Card auth ─► real-time scoring (unchanged, < 50 ms) ─► decision
└─► alerts ─► Case management system
│ alert.created
Read replica / warehouse (CDC) ◄─────┤
▼
Copilot case service
1. Evidence assembly: typed tools / SQL, scoped to the case
2. Deterministic analytics: velocity, structuring, graph links, model
explanations ─► pattern facts with refs
3. LLM: brief and narrative from the evidence bundle only; numbers,
dates and names are written as references ({{tx:8812.amount}})
4. Renderer fills references from EvidenceRecords
5. Validator: every reference resolves; any literal number, date or
name in free text must match evidence; otherwise fail closed
─► Analyst UI: brief, timeline, highlights, hover-to-source,
accept / edit / reject, ask a question
─► Audit log · model-risk documentation · feedback to rules/model teams
The copilot reads copies of data asynchronously; nothing it does can slow the authorisation path.
Deep dives
Flow · 6 stepsGrounded brief pipeline
- Alert enters case management The alert from scoring enters case management; case management emits alert.created to the copilot, and the read replica supplies case-scoped data.
- Assemble evidence and patterns Evidence assembly pulls case-scoped records via typed tools / SQL; deterministic analytics computes pattern facts with refs.
- LLM writes references The LLM writes the brief and narrative from the evidence bundle only, using references such as {{tx:8812.amount}} rather than free-text numbers.
- Renderer fills references The renderer fills references from stored EvidenceRecords.
- Validator fails closed The validator extracts every literal number, date, currency and name and checks it against the evidence bundle; unmatched sections are blocked.
- Analyst reviews The analyst UI shows the brief, timeline and highlights, with every figure linked to its source record.
Data
| Step | Title | What happens |
|---|---|---|
| 1 | Alert enters case management | The alert from scoring enters case management; case management emits alert.created to the copilot, and the read replica supplies case-scoped data. |
| 2 | Assemble evidence and patterns | Evidence assembly pulls case-scoped records via typed tools / SQL; deterministic analytics computes pattern facts with refs. |
| 3 | LLM writes references | The LLM writes the brief and narrative from the evidence bundle only, using references such as {{tx:8812.amount}} rather than free-text numbers. |
| 4 | Renderer fills references | The renderer fills references from stored EvidenceRecords. |
| 5 | Validator fails closed | The validator extracts every literal number, date, currency and name and checks it against the evidence bundle; unmatched sections are blocked. |
| 6 | Analyst reviews | The analyst UI shows the brief, timeline and highlights, with every figure linked to its source record. |
Source: This page's text
| Box | Group | Detail |
|---|---|---|
| Alert from scoring | Input | < 50 ms scoring untouched |
| Case management system | Input | emits alert.created |
| Read replica / warehouse | Input | CDC |
| Evidence assembly | Copilot | typed tools / SQL, scoped to the case |
| Deterministic analytics | Copilot | velocity, structuring, graph links |
| LLM | Copilot | brief and narrative from evidence bundle |
| Renderer | Copilot | fills references from EvidenceRecords |
| Validator | Copilot | every reference resolves; fail closed |
| Analyst UI | Output | brief, timeline, highlights, hover-to-source |
Source: This page's text
The narrative states a transaction amount that doesn’t exist — prevent it. Numbers never come from the model’s free text. Aggregates (totals, counts, date ranges) are computed by SQL tools; the model writes references such as {{agg:outbound_7d.total}} that the renderer fills from stored evidence. A validator then extracts every literal number, date, currency and name from the output and checks it against the evidence bundle; anything unmatched blocks that section and shows it as “needs analyst”. In the UI every figure links to its source record. Offline, a seeded test set checks the validator catches injected wrong figures.
Showing regulators how the copilot influenced decisions. Per case, an immutable trail: the evidence snapshot, prompt and model versions, everything the copilot displayed, what the analyst accepted or changed (diffs), and the final decision with the named analyst. Aggregate reports show acceptance and edit rates, outcomes for assisted vs unassisted cases, and QA findings. The tool sits in the model inventory with documented intended use, limitations, independent validation and ongoing monitoring in line with model risk expectations, and the policy states plainly that decisions are human.
Trade-offs
- Automation vs analyst judgement: drafting saves time but invites automation bias; start with summaries and evidence, not recommended dispositions, and measure whether assisted analysts miss things the brief omitted.
- LLM narrative vs templated text: templates are exact and auditable for factual sections (amounts, dates, counterparties); the LLM adds value in explaining why a pattern is suspicious. Combine them: templated facts, LLM connective reasoning, both validated.
- Data minimisation vs context richness: more history and counterparty data improve briefs but widen exposure; tools return only case-relevant fields, counterparties are pseudonymised unless needed, nothing outside the case scope.
- Cost per case: ~16 cents of model spend against several pounds of analyst time; a stronger model is justified if it measurably cuts edits, while smaller models can handle classification-like steps.
Evaluation
- LLM kept out of the scoring hot path: architecture review plus load tests show no dependency from authorisation to the copilot.
- Numbers from deterministic queries: validator coverage 100%; zero unsupported figures on the offline set; production validator-failure rate monitored.
- Grounded, auditable outputs: every highlight has evidence refs; audit completeness checked by sampling.
- Analyst-centred evaluation: a staggered rollout across teams (or alternating cases) comparing time per case, QA rework rate, decision quality (later-confirmed fraud among released cases, SAR quality feedback) and inter-rater agreement between assisted and unassisted analysts on double-reviewed samples; blind ratings of narratives by senior investigators.
- Privacy controls: access tests (analysts cannot query outside assigned cases), retention and logging reviews.
- Monitoring: latency to brief, acceptance and edit rates, cost per case, feedback tags routed to rules and model owners.
What a strong design shows
- Leaves real-time scoring untouched and makes the copilot an asynchronous reader of replicated data.
- Takes every number from deterministic queries via references and validates the text against evidence, failing closed.
- Keeps decisions with named analysts and produces an audit trail a regulator can follow.
- Evaluates with analysts: time per case and decision quality, with controls and inter-rater checks, not just text metrics.
- Applies data minimisation, scoped access and model-risk governance.