Case study · Multi-agent, Gemini
LendWise: AI credit underwriting where the AI does not decide
Staged specialist agents read a borrower's documents, deterministic code scores the risk, every finding cites its source, and a person makes the call.
By Ali Raza, Senior AI EngineerMulti-agent pipeline, Gemini, deterministic scoring
In AI credit underwriting, the most important feature I built was the part where the AI does not decide.
The job
An analyst receives a credit application with a stack of borrower PDFs and CSVs. Most of their time goes into reading, extracting and summarizing before any judgment happens. LendWise takes over that reading and summarizing, and leaves the judgment where it belongs.
How it works
- Specialist agents work in stages. Each reads the borrower's documents for one part of the picture.
- A deterministic engine calculates the risk score. The model never produces the number.
- Every finding links back to the document it came from, so an analyst can check it.
- Gemini writes a structured credit memo from the findings and the score.
- A person reads the memo and makes the final decision.
Why the model does not score
A model that is right most of the time is still wrong some of the time, and in lending a wrong score is a business and compliance problem, not a typo. A score also has to be explainable and repeatable: the same inputs should give the same number tomorrow. Code does that. A model does not.
So the work is split by what each part is good at. The model reads messy documents and writes clear prose. Code does arithmetic and applies rules. A person carries the accountability.
Evidence over confidence
The hard part was not getting the model to write a memo. It was making every claim in that memo traceable. A memo that sounds right but cannot be checked is worse than no memo, because it invites trust it has not earned. Citing the source of each finding turns the memo from an opinion into a summary of evidence.
The pattern I reuse
AI for evidence, deterministic code for scores, humans for decisions.
I apply it to any workflow where a wrong answer has a real cost. It is slower to design than one agent that does everything, and much easier to trust.