[KongchangAI]
· 2 min read· 1,384 words

The Evaluation Gate Before AI Decisions: How I Built Payment-Grade AI Guardrails for AutoKon

The Evaluation Gate Before AI Decisions: How I Built Payment-Grade AI Guardrails for AutoKon

AutoKon inserts an evaluation gate between AI descriptions and payments, using an LLM judge to ensure claims are grounded.

AutoKon is a financial verification pipeline for Indonesian real estate developers, where a vision-language model reads site photos and decides whether to release contractor payments. Because wrong descriptions send money to the wrong place, the author inserted an LLM-as-judge gate that only asks whether each claim is supported by the image. It targets Cohen's κ ≥ 0.80, widens human review below that, and concentrates labeling on disagreement cases. AI approves nothing—it clears clear cases and flags ambiguous ones. The model isn't the hard part; the structure around it is.

The Evaluation Gate Before AI Decisions: How I Built Payment-Grade AI Guardrails for AutoKon

AutoKon evaluation gate design

Most AI features fail silently: a summary is slightly off, a label is wrong, a suggestion gets ignored. No one files a ticket, and the product keeps running. But AutoKon is not that kind of product—it is a financial verification pipeline for Indonesian real estate developers. On-site workers photograph houses, a vision-language model reads the photos, and the reading determines whether a contractor's payment is released. A wrong description doesn't just degrade the experience; it sends money to the wrong place. That characteristic changed every design decision that followed.

The Pipeline Doesn't End at the Model

The most intuitive architecture is "photo in, VLM out, decide directly." Claude Opus Vision is very good at describing construction sites: it will tell you the walls are plastered, the roof trusses are in place, the floor leveling is complete. Occasionally, it will say the same things with the same confidence about a completely different photo. Not often, but often enough to matter.

So every AI-generated description must pass through an "LLM-as-judge" evaluation stage before it gets anywhere near a payment decision. A second model scores the first model against the image and the claim, and only passing items move forward. This judge is not a quality dashboard bolted on after launch—it sits in the payment path. If the evaluation stage is down, payments wait. For this domain, that is exactly the right failure mode, and settling that early is what made the rest of the design tractable.

What the Judge Actually Measures

Most evaluation work I've seen optimizes for "is the answer good." For a payment gate, that's the wrong question. The real question is: is the description grounded—is every claim in it supported by what's in the photo? A description can be well-written, plausible, and useful and still assert a completion stage that isn't in the frame. That failure must not flow into the payment engine.

So the judge receives a very narrow prompt: is every claim here supported by this image? It is never asked whether the description reads well. Excellent prose with an unsupported claim fails the item, and most of the value comes from that narrowing. Broad quality rubrics let the judge model agree with the generator too often, because both models share the same optimistic prior.

LLM-as-judge is an evaluation paradigm in which a second language model scores or adjudicates the output of a first model. A common approach is to give the judge model a prompt asking it to assess the quality, correctness, or consistency of generated content against given criteria. In quality-assessment scenarios, judges are typically asked for scores or preference rankings; but in scenarios requiring auditability, judges are better suited to outputting binary "pass/fail" verdicts so that agreement rates can be computed against human labels. The main risks of LLM-as-judge include: optimistic bias from the judge and generator sharing training data, the significant influence of prompt wording on scoring outcomes, and the judge model's over-preference for fluent text. Therefore, in high-stakes scenarios such as payments, judge prompts should be narrowed as much as possible to verifiable specific claims, and the judge's reliability should be calibrated with human labels.

The Number That Makes the Judge Worth Having

An automated judge is only valuable if it agrees with human reviewers, and you have to be able to say how much. The pipeline targets Cohen's κ ≥ 0.80 against human labels—substantial agreement by any reading. This is an operational threshold, not a number for a slide. Below it, the judge is a source of false confidence rather than a control, and the honest move is to widen human review until the rubric or the labels improve.

Three things I learned on the way there. Human labeling time is scarce, so spend it where the generator and the judge disagree, not on cases that were never in question. Ambiguous rubrics show up as low κ before they show up as bad outcomes; when agreement drops, the cause is almost always a rubric that lets two reasonable reviewers score the same photo differently, not a model getting worse. And the input distribution moves: new site types, new phone cameras, and the rainy season all change what the camera sees, so an evaluation suite frozen at launch decays.

Cohen's κ (Cohen's kappa) is a statistic measuring the classification agreement between two reviewers on the same set of samples, computed with the probability of chance agreement removed. Values typically range from -1 to 1: 0 means no better than random guessing, 0.61–0.80 is generally considered substantial agreement, and above 0.81 is almost perfect agreement. Unlike simple accuracy, κ can reveal whether reviewers are systematically skewed toward a particular category, making it more informative than accuracy when assessing whether an automated judge can replace human review. κ's limitation is its sensitivity to category distribution: when one category is extremely imbalanced, κ may be low and needs to be interpreted alongside a confusion matrix. In AutoKon's scenario, κ ≥ 0.80 is used as the operational threshold, meaning the automated judge must reach substantial agreement with human reviewers on the "is the claim grounded" judgment before its conclusions are allowed to flow into the payment path.

Where Humans Sit

The evaluation gate doesn't replace approval. AutoKon runs a five-role photo-evidence approval workflow, and on-site submissions arrive via WhatsApp through n8n and Botpress flows rather than a portal that every site worker would need an account and training for.

AI approves nothing. It clears obviously complete, obviously grounded evidence out of reviewers' queues and flags what needs human handling. Reviewers get the ambiguous cases with context, which is exactly where human judgment earns its keep. That lets one engineer run the platform across three time zones and thousands of housing units without the review burden scaling with unit count.

n8n is an open-source workflow automation platform that connects webhooks, HTTP requests, database operations, and messaging services through visual node orchestration. Botpress is a platform for building conversational AI, used to design multi-turn dialogue flows, manage intents, and connect channels. In AutoKon's architecture, the two together handle the job of "turning photos and text that site workers submit via WhatsApp into structured approval tasks": WhatsApp messages are received and initially parsed by Botpress's dialogue flows, and n8n then triggers subsequent evaluation-gate calls, status updates, and reviewer notifications. The value of this combination is that site workers don't need to install a new app or learn a new portal, yet the approval pipeline still receives structured input in the background, lowering training costs during large-scale rollout.

What Transfers

Not every product moves money, but the questions are universal: here, what is the worst a confident wrong answer can do? Does your design start from that question, or from what the model can do? Does your metric measure correctness against the source, or plausibility? Can you say what your agreement with humans actually is? Are the humans still in the loop getting the hard cases or the easy ones?

The model was never the hard part of this build. The hard part was the structure around it, and the willingness to let that structure block the smooth path when it has to.

One-line Summary

AutoKon inserts an evaluation gate between AI descriptions and payment decisions, using an LLM judge to ensure claims are grounded.

Paragraph Summary

AutoKon is a financial verification pipeline for Indonesian real estate developers, where a vision-language model reads on-site photos and determines whether to release contractor payments. Because a wrong description sends money to the wrong place, the author inserted an LLM-as-judge evaluation gate between AI output and payment decisions: a second model answers only "is each claim supported by the image," not "is the description good." The gate uses Cohen's κ ≥ 0.80 as its operational threshold, widening human review when below it, with human labeling concentrated on cases where generator and judge disagree. AI approves no payments, only clearing clear cases and flagging ambiguous ones so human reviewers focus on high-value judgment. The core conclusion: the model isn't the hard part—the structural design around it, and the willingness to let that structure block the smooth path when necessary, is what matters.

#LLM-as-judge#AI guardrails#Cohen's kappa#payment pipeline#vision-language model#AutoKon
Share:

Related articles