Bank Doc-Risk GenAI Agent
For each named case folder, the agent flags document gaps and risk before a human or soft path writes the Case/GRC system of record.
Soft flag HITL SoR
Operating design · HITL · FMEA · circuit breakers · Asia/Shanghai
A reference architecture for the operating model. Not a live agent at a named bank. Targets, RPN scores, and breaker signals on this page are design estimates.
Glossary
SoR = Case/GRC system of record. HITL = human-in-the-loop. Soft flag = low-risk + complete pack may auto-write a non-clearing flag to SoR; it never clears a regulatory obligation. CP-* = named control point. CB-* = circuit breaker. FMEA = failure mode and effects analysis; RPN = S×O×D.
What it does
Flow: classify → extract → completeness → grounded insight → soft flag or HITL → SoR write.
In scope v1: named case folders, fixed doc-type taxonomy, soft auto for low+complete only. Out of scope v1: whole-estate crawl, auto-clear of regulatory obligation, public LLM endpoints, agent-held PII memory.
Platform path
BR-SIGN-OFF — freeze PACK-v1, taxonomy, Azure region, RACI.
Claude Code scaffolds LangGraph (redacted packs only).
PoC-GO on LangGraph — gold-set metrics; CB stubs trip in CI.
UAT-ACCEPT — Risk Ops on LangGraph HITL; optional Dify shell.
PROD-STEADY — LangGraph service; Claude Code off live folders; Dify off SoR.
PoC targets
Design estimates — not measured production KPIs. These are the PoC-GO gates, not a result.
Production graph
Every live case runs on LangGraph. The model drafts the narrative and the citations. A deterministic scorer sets the tier. The soft path never clears a regulatory obligation.
Soft · low + complete
auto_flag_soft. Non-clearing flag only. It never clears a regulatory obligation.
Else · CP-HITL
hitl_interrupt. Approve, edit, reject, or escalate. Timeout → quarantine, never approve.
Control points
Eleven named checks. The fail action is the contract. The checklist stays in the policy pack, not only in the prompt.
| ID | Name | Where | Check | Fail action |
|---|---|---|---|---|
| CP-INTAKE | Folder allow-list | intake_folder | Path in approved case roots | Reject the run |
| CP-CLS | Taxonomy gate | classify_doc_type | Type in the taxonomy, or unknown | Unknown to HITL |
| CP-EXT | Field confidence | extract_fields | Confidence ≥ 0.90 | Force HITL |
| CP-GAP | Completeness | completeness_check | Required docs and fields present | Gap list to HITL |
| CP-HOOK | Rules outside the model | policy pack | Checklist is not in the prompt | Block deploy if inlined |
| CP-LLM | Grounded summary | risk_summarize | JSON schema and citations | Drop uncited factors |
| CP-SCORE | Deterministic tier | score_and_route | Policy table only | Unit-test fail blocks deploy |
| CP-HITL | Human gate | hitl_interrupt | Approve, edit, reject, or escalate | Timeout to quarantine |
| CP-CASE | SoR write | write_case_packet | Idempotent case id | Retry, then dead-letter queue |
| CP-NET | Private egress | platform | Allow-list endpoints only | Kill the run and open an incident |
| CP-EVAL | Trace and eval | Langfuse | trace_id on every case | Alert if missing |
Failure modes
S / O / D are preliminary design scores pending PoC measurement — illustrative, not measured production KPIs. RPN = S×O×D. Six modes, highest RPN first. As of 25 Oct 2026.
| ID | Failure mode | RPN | Controls | Action |
|---|---|---|---|---|
| FM-02 | OCR / extract field error | 180 | CP-EXT, CB-EXTRACT | Field confidence gate; cite the page |
| FM-01 | Wrong doc-type classification | 160 | CP-CLS, CB-CONFIDENCE | Unknown type to HITL |
| FM-04 | LLM under-states risk | 150 | CP-SCORE, CP-HITL, CB-LLM | Deterministic tier; never an LLM-alone tier |
| FM-05 | Missing-info rule bypassed | 81 | CP-GAP, CP-HOOK | Checklist lives outside the model |
| FM-08 | PII egress to a public model endpoint | 80 | CP-NET, CB-DATA-EGRESS | Private Azure OpenAI only; egress allow-list |
| FM-06 | HITL skipped, or timeout treated as approve | 40 | CP-HITL, CB-HITL-BACKLOG | Timeout to quarantine, never approve |
Circuit breakers
Example signals only (ex: …) — illustrative design telemetry. Trip rules are the production contract. Soft auto-path is disabled whenever any breaker is open. Opening CB-HITL-BACKLOG or CB-CASE-WRITE never auto-approves. Opening CB-DATA-EGRESS kills the run.
CB-EXTRACT · Document Intelligence
Trip. Error rate >5% or p95 >30s over 5 min.
Degrade. Pause extract; queue files; page ops.
Example state. closed · ex: 1.2% err
CB-LLM · Azure OpenAI summarize
Trip. 5xx >3% or grounded-cite fail >10%.
Degrade. Stop the LLM node; HITL packet without narrative.
Example state. closed · ex: 0.4% 5xx
CB-CONFIDENCE · Extract confidence
half-openTrip. Share of fields below 0.90 exceeds 25% of the pack.
Degrade. Force HITL; widen the eval sample.
Example state. half-open · ex: 18% low-conf
CB-HITL-BACKLOG · Analyst queue
Trip. Open HITL above SLA (50 cases or >4h p50).
Degrade. Throttle intake; alert the Risk Ops lead. Never approve.
Example state. closed · ex: 12 open
CB-CASE-WRITE · Case / GRC write
Trip. Write fail >2% or dead-letter queue >0 for 10 min.
Degrade. Freeze completions; retry the dead-letter queue. Never approve.
Example state. closed · ex: 0 DLQ
CB-DATA-EGRESS · Network egress
Trip. Any call outside the allow-list.
Degrade. Kill the run; open a security incident bridge.
Example state. closed · ex: allow-list OK
Gates
Four gates. Nothing skips one. Status as of 25 Oct 2026 (Asia/Shanghai): pending or not started. No gate is signed off.
Pending
Risk, Compliance, InfoSec, and Ops sign. PACK-v1 and the doc-type taxonomy freeze. BR-01 to BR-10, from the folder allow-list through a trace on every case.
Not started
Gold-set targets met on redacted packs. No production PII. Breaker stubs trip in CI.
Not started
Risk Ops signs UAT-01 to UAT-07: soft flag, missing field, name conflict, low confidence, HITL timeout, case API down, blocked egress. Dify is an optional HITL shell here, not the SoR.
Not started
LangGraph service only for live cases. Claude Code stays off live folders. Dify stays off the system of record.
Next build
Next build order: freeze PACK-v1 + taxonomy, scaffold LangGraph nodes with CP-* hooks, gold set, breaker stubs, then UAT with Risk Ops. Optional Dify only as HITL shell in UAT.
Related: Design the agent before you deploy it.