Two to six weeks for one credit decision.
And most of that time isn’t spent deciding.
And the decision can still be wrong in two ways.
- What happens
- Approving a business that later defaults.
- Financial impact on the lender
- Direct principal loss, collection expenses and higher capital reserve requirements.
- What happens
- Rejecting a creditworthy business that would have repaid on time.
- Financial impact on the lender
- Lost interest and fee income, and damaged customer relationships.
Revenue is up. Profit and cash are down. Should the bank lend?
Company ABC grew revenue 20%, while EBITDA fell 40%, debt rose 67% and operating cash flow fell 53%. Specialist agents gather the evidence, code applies the lending rules, and a person makes the decision.
A scripted replay with three example companies, not a live agent run. It follows the steps and outputs of the PoC.
Four specialist agents. One orchestrator.
Anything that must be exact is code. Anything that needs judgement is an agent. And a person decides.
The system in six layers.
- 1User experience and gatewayPower App · API Management
One front door, for the full assessment and for direct agent requests. Every request carries the user’s identity.
- 2OrchestratorDeterministic state machine
Owns the workflow: state, dependencies, retries, timeouts, validation, and when a case is complete.
- 3Specialist agentsMateriality · Micro/Macro · Causality · Write-up
Judgement: what matters, what is happening outside, why it changed, and what goes in the report. Called over A2A.
- 4Deterministic servicesFinancial Analysis (Fabric notebooks) · Eligibility
Anything that must be exact: figures, thresholds and policy rules.
- 5Data and retrievalFabric OneLake · Azure AI Search · Moody’s
Governed financial data, searchable document evidence and market research.
- 6Identity, security and governanceEntra ID · OneLake security · Purview
Who is asking, what they may see, and the audit trail, across every layer.
Core banking mirrored in near real time, CRM notes, and Bronze → Silver → Gold metrics, with row- and column-level security.
Chunks of annual reports and loan documents, with hybrid search, access-list filters and page-level citations.
Simplified flow
Detailed component mapEvery Azure, Fabric and identity component, step by step.
Pick a step to follow it through the system. Hover or tap a component for what it does.
From document to citationHow a page of an annual report becomes evidence an agent can cite.
- 1 · Original documentStored in ADLS Gen2 with its access list. The index can always be rebuilt from here.
Company ABC · 2024 annual report.pdf - 2 · ExtractContent Understanding pulls out text, tables, layout and page positions.
table · page 14 · columns: £m, 2023, 2024 - 3 · Chunk by structureChunking rules for each document type keep a table whole, with its headers, units and periods.
EBITDA · £m · 2023: 20 · 2024: 12 - 4 · Embed and indexEach chunk gets a vector and metadata: borrower, document type, period, page and allowed groups.
borrower ABC · 2024 · p.14 · groups from the ACL - 5 · RetrieveHybrid keyword and vector search, with server-side filters on borrower, period and the user’s groups.
“Why did EBITDA fall?” · borrower = ABC - 6 · CiteThe agent gets the passage with its source and page, and the citation travels into the report.
Company ABC · 2024 annual report · page 14
How Causality investigatesSix steps, from what changed to a sourced explanation.
- What changedFrom Materiality: EBITDA −40%, debt +67%, operating cash flow −53%
- What’s happening outsideFrom Micro/Macro: industry demand weakening, material costs rising
- HypothesiseCould rising material costs explain the fall in margins?
- SearchAnnual reports, management commentary, disclosures and historical evidence
- CompareSupported relationships, alternative explanations and missing evidence
- ReportContributing factors, evidence, confidence, unresolved questions and credit implications
Three design decisionsAgents rather than a chatbot, a state machine in control, and A2A between agents.
Why agents and not a chatbot?
With a chatbot, you form the hypothesis and ask the question. Here the system forms the hypotheses, and each piece of evidence changes what to look for next.
Simpler option we rejectedA chatbot. It only answers what someone thinks to ask.
Who controls the workflow?
A deterministic state machine. If Moody’s is down, the case stops safely instead of producing a report with a gap nobody notices.
Simpler option we rejectedLetting an LLM decide when a required stage is complete.
Why A2A?
A2A isn’t the workflow engine; the orchestrator owns state, dependencies, retries and completion. A2A is the contract between agents that are deployed independently, so an analyst can also ask one agent a question without running the whole workflow. MCP connects agents to tools.
Simpler option we rejectedREST calls or a workflow engine inside one app. The better choice if everything lives in one app with one lifecycle.
What I owned, and what was hard.
Discovery
I ran it with credit risk, relationship managers and the data team, and turned the 80% problem into a scoped PoC with agreed success criteria.
Architecture
I designed it, including where the line between code and model sits.
Build
I built the orchestrator state machine, the Causality Agent, the ingestion and chunking pipeline, and the validation layer.
Evaluation
I set it up and ran the readouts with the bank’s credit leadership.
Chunking financial documents
- Problem
- Fixed-size chunks cut tables in half. The agent couldn’t tell 2023 from 2024, or thousands from millions.
- Choice
- Layout-aware extraction, with chunking rules for each document type.
- Result
- Retrieval improved by 30%, and citations point to an exact page.
Fixed size
| 20 | 12 |
| 30 | 50 |
| 15 | 7 |
No labels, periods or units
Layout-aware
| £m | 2023 | 2024 |
|---|---|---|
| Revenue | 100 | 120 |
| EBITDA | 20 | 12 |
| Debt | 30 | 50 |
| Operating cash flow | 15 | 7 |
Company ABC · 2024 · annual report · page 14
Business rules nobody owned
- Problem
- Materiality needs the bank’s thresholds. The data team didn’t have them, and had no link to the credit team.
- Choice
- I spent two weeks finding the right person. Meanwhile, I built the thresholds as configuration, with documented assumptions.
- Result
- When the real rules arrived, it was a config change, not a rebuild.
- Lesson
- Find the owner of the rules as well as the owner of the data.
| Metric | Flag when it moves past | Basis |
|---|---|---|
| EBITDA | −15% | Documented assumption |
| Debt | +20% | Documented assumption |
Evaluation without a golden dataset
- Problem
- We needed questions and expected answers. The bank’s experts couldn’t write them from scratch.
- Choice
- We generated candidate questions from historical credit memos with known outcomes, and asked the experts to review them.
- Result
- A much smaller ask of the experts, and a test set to check every release against.
| Layer | What we check |
|---|---|
| Figures | Every figure matches the calculation service exactly |
| Retrieval | Relevant evidence, inside the borrower, period and permission filters |
| Grounding | Every statement traces to a finding and its evidence |
| Reasoning | Unsupported hypotheses are reported as unsupported |
| Policy | Eligibility outcomes match the versioned rules service |
| Output | The report is complete, and every citation resolves to the right page |
Every request knows who is asking.
Jane signs in once. Each service gets its own token, issued for that service only and still in Jane’s name, so every agent and data source applies her access. The model never sees her token.
Three tokens, one person.
- Audience
- Credit API
- User
- Jane, with her groups
- Checked by
- API Management, then the orchestrator
- Audience
- Causality agent
- User
- Jane
- Actor
- Orchestrator
- Audience
- Fabric
- User
- Jane
- Used for
- Gold metrics, with row-level security
Follow one request.
Jane, an analyst, opens the case for Company ABC. Pick a step, or click any message in the diagram.
One request path, shown as an example. No hop is automatic: in Entra ID, each service has its own app registration, the audience and scopes it accepts, and an approved permission to exchange tokens on the user’s behalf for the next service. A hop that isn’t configured fails.
Where A2A falls shortThe protocol leaves most of the trust decisions to you.
A2A standardises how agents find each other and pass tasks. It can check that a call is allowed, but it doesn’t say who the call is for, or whether what comes back is safe to act on.
The user’s identity doesn’t travel.
A2A authenticates the calling agent, not the person behind it. If the orchestrator called an agent with its own managed identity, that agent would search with its own permissions, which are usually wider than the analyst’s. Permission trimming in search would still run, but for the wrong person.
In this designThe on-behalf-of exchange at every hop, in steps 3 and 7 above, so each agent acts as Jane.
Passing authority down a chain isn’t defined.
The spec doesn’t define how far a delegated permission reaches, how long it lasts, or how to revoke it. In a chain like orchestrator → Causality → another team’s Policy agent, nothing in the protocol stops a credential being forwarded further than intended.
When something failsEvery failure stops the case or flags it. None reaches the approver unnoticed.
| What fails | What the system does | Where |
|---|---|---|
| Moody’s API is unavailable | The case stops safely, instead of producing a report with a gap nobody notices. | Orchestrator |
| An agent returns malformed or incomplete output | Schema validation rejects it, and the orchestrator handles the retry or the failure. Nothing moves to the next stage unvalidated. | Orchestrator |
| A figure doesn’t match the calculation service | The draft is held until it matches. | Validation |
| A statement has no source | It’s removed and listed as missing information. | Validation |
| A token can’t be issued or validated | The call is refused, and the case stops safely. | Entra ID · every service |
| A passage is outside the user’s access | Search never returns it, so no agent can read or cite it. | Azure AI Search |
Recorded for every case
- The user, and every agent that acted for them
- Each validation outcome, including what was held or removed
- The sources behind every statement in the report
- The decision, with the approver, time, policy version and report version
- Sensitivity labels and audit in Purview, with reviews, exceptions and unsupported claims tracked in Power BI