Mario Alvarez Revuelta

Practice notes · Credit risk

Applying AI to credit decisioning

What the work actually consists of when you put language models into a lending decision: where the effort goes, what the model is allowed to do, and how you show it is safe enough to use.

Role
Lead, Applied AI
Period
2026
Stack
LLM systems · Credit decisioning · Human-in-the-loop · Auditability

Most credit decisions in a large lender are already automated. What is left for a human is the awkward middle — the applications a rules engine will not call, where someone has to gather evidence from several places and form a judgement. That middle is where language models are genuinely useful, and it is also where putting one into production is hardest, because the decision has consequences and somebody will be asked to justify it.

Most of the work happens before the model

The intuition is that the difficulty is in the prompting, or the model choice, or the agent design. In practice those are the short part.

The long part is that the evidence a decision needs lives in systems that were never built to be read by anything other than a person. They disagree about what a customer is. They describe the same entity three different ways. Some of them are only reachable by a human opening a screen. Before any model can reason about a case, something has to assemble those sources into one representation that is coherent, complete and inspectable.

That assembly is the real engineering, and it is mostly schema design and negotiation. The schema because every downstream component depends on one agreed version of the facts; the negotiation because the teams who own those sources have their own roadmaps and no particular reason to prioritise yours. I have spent far more time on the second than I expected to, and I now treat it as the project rather than an obstacle to it.

Decide what the model is allowed to do

There is a strong pull toward letting the model do everything, because it can. It should not.

Anything defined by a rule — a calculation, a threshold, a band, a policy lookup — should be computed, not generated. Not mainly because the model would get it wrong, though it sometimes will, but because a generated number cannot be asserted. A computed one can be checked on every run, automatically, forever, and when it fails you know at once.

Drawing that line early is also the cheapest way to shrink the problem. Every component moved out of the model is a component you no longer have to evaluate probabilistically. What remains is the part that genuinely needs judgement, which is a far smaller surface to defend.

Assert everything that can be asserted

Within the generated output, some properties are still checkable. Does the structure conform? Do the entities it refers to exist in the input? Does a stated figure match the computed one? Is a required element present?

None of this tells you the answer is good. All of it tells you the answer is not malformed, and those two get conflated constantly. Property checks are cheap, they run on every execution, and they catch the class of failure that quietly corrupts a pipeline for weeks.

Agreement with the experts is a weaker test than it feels

The obvious validation is to run the system over historical cases where the human decision is known and count the matches. Everyone does it, and it is worth doing. It is also thin evidence.

A system can agree for the wrong reason. It can lean on something irrelevant that happens to correlate within your sample. It can be right on every easy case and silently wrong on the hard ones, which are the only ones that reached a human in the first place. And a high match rate on a small sample is mostly a statement about the sample.

So I treat agreement as a gate rather than a result. It says the system is not obviously broken.

Compare reasoning, not just outcomes

The stronger test is whether the system weighed what the expert weighed. In most professional domains the expert writes down why — a rationale, a note, a justification on the file — and that text is the most underused asset in the building.

Reasoning-to-reasoning comparison catches what outcome-matching cannot: the right answer reached by a path nobody would accept. It is slower, it does not reduce to a single number, and it requires reading. It is also the only method I have found that reliably surfaces a system reasoning confidently from something it should have ignored.

Traceability is an architectural constraint

In lending the question is never only whether the answer is right. It is whether you can show why. A decision whose inputs cannot be reconstructed is one the organisation cannot use, however good it is.

Designing for that changes the architecture rather than decorating it. Inputs have to be assembled into something durable and inspectable before the model sees them; intermediate output has to be retained; the path from input to conclusion has to survive the run.

The payoff is larger than compliance. A system you can trace is a system you can debug, and when output is wrong, traceability is the difference between a root cause and a shrug.

Model selection is a cost decision wearing a capability costume

The temptation is to use the strongest available model everywhere and stop thinking. That is expensive, slower, and it hides which parts of the system are actually hard.

Test the cheaper model first, component by component, against the same evidence. Usually it is sufficient for most of them, and the handful where it is not are informative — they tell you where the genuine difficulty sits. That answer changes with every release, so it wants re-running rather than deciding once.

“Good enough” depends on what happens next

Good enough is not a score. It is a threshold tied to the consequence of being wrong and to what the system is permitted to do with its answer.

A system whose output a person reviews before anything happens can tolerate error rates that would be unacceptable in one acting on its own. So the honest question is not whether the model is good enough, but good enough for which level of autonomy — and the answer in lending is usually: good enough to propose, not yet good enough to decide. Designing the human acceptance step as a real gate rather than a formality someone clicks through is what makes that answer safe rather than merely true.

It has a second benefit. An explicit accept-or-reject step is a recorded human judgement on model output, accumulating in production. It is the best evaluation signal available and it costs nothing once the workflow exists.

Where I have not got this right

Most of what I have described is run deliberately rather than continuously. Manual checking is the correct choice while a system is being shaped and the wrong one the moment it is taken seriously, and the transition is easy to miss because nothing breaks on the day you cross it.

Building the automated harness — a held-out set, a scored rubric, regression runs on every change — ahead of the next capability is the thing I would now insist on earlier. The checks that exist are the right checks. They are simply not yet running by themselves.

← All work