A lender kicks back a refinance application because the odometer reading in the form doesn't match the photo. Or the payoff quote expired while the file sat in a queue. Each kickback costs a day and some fraction of the applicant's patience. Enough of them and the lender's funding desk starts putting your submissions at the bottom of the pile.
At TechFabric we build software for auto refinance shops and lenders. For Auto Approve we built the automated approval engine that doubled the loans they process each month without adding agents, replacing more than four manual workflows. For iLending we automated lead and loan officer assignment, rate sheet processing and stipulation documents. Much of that work lives in the steps between a lead and a lender, where an application gets assembled, checked and routed.
So when decision models arrived this autumn, we wanted to know where one would sit in that flow. We also wanted to know what the data team has to build around it before anyone should trust its answers. I've worked it through here for a typical refinance shop: the five places a model fits, the Delta table that logs every call, and the calibration you run against your own lender outcomes.
An auto refinance shop buys leads from aggregators. The lead shows up with a name, a phone number, a rough payoff balance and a vehicle. From there the shop collects the rest: year, make, model, trim, mileage, an odometer photo, a credit pull, a driver's license image, an SSN, proof of income, proof of insurance, and a payoff quote from the current lienholder. Then it packages all of that and submits to one of a dozen lender partners.
Most of what goes wrong in that business is in the package rather than the credit decision. The name on the license is "Robert" and the application says "Bob", or the VIN has seventeen characters but somebody typed a letter O where a zero belongs.
The useful question is whether software can decide, on every application, whether this package is ready to submit and which lender should see it. That's a decision, and this new class of model makes decisions.
What a decision model actually is
TypeSafe released Jev in September 2026 as what they call a System One model: unstructured state in, typed probabilistic decisions out, with no string generation at all. Because the possible outputs are defined in advance, the model can't make a type error and can't hallucinate a field, and every answer arrives with a calibrated confidence score. TypeSafe quotes end-to-end response times of 70ms to 500ms, and input pricing of $0.042 per million tokens with output tokens free.
Cloudflare followed with Clef and Clef-flash, open-sourced on Hugging Face under Apache 2.0 and hosted on Workers AI, fully Jev-API compatible. Two things in that announcement matter for a document-heavy workflow. Clef has a vision encoder, so it takes images directly, which Jev does not do today. Cloudflare also puts Clef's context window at 64k against Jev's 32k, which reads TypeSafe's limits narrowly. Jev takes 64k tokens per request, and 32k is its budget for the state plus the single longest question. That 32k is still the number that bites on a long application state, because Clef's 65,536 tokens hold the state, the questions and any images together. Cloudflare's published median latency is 209.3ms for Clef and 38.8ms for Clef-flash.
The mental model I keep coming back to is the one both vendors describe: a smart if-statement. You hand it the state, you hand it a fixed set of questions with typed answers, and your ordinary code branches on the result. The model's freedom is bounded by the shape of the question, which is why you can put it in the hot path of a submission workflow and sleep.
Five places in the refinance pipeline where one fits
Walk the pipeline from lead purchase to funding and the brittle spots show up in the same places every time.
Lead triage at purchase. State is the raw aggregator payload plus whatever enrichment is available at that moment. The questions are whether this lead is likely to produce a fundable application, which product bucket it belongs in, and how confident the model is. Money goes out the door on every lead bought. A sub-second decision that routes the ambiguous ones to a human queue is cheap next to the lead price.
Document classification and completeness. The applicant uploads four photos from a phone. One is the license, one is the odometer cluster, one is the insurance declaration page, one is a blurry shot of a parking garage floor. Classifying those and spotting what's missing is exactly the visual task Clef's vision encoder exists for, and the alternative is a general LLM spending seconds per image.
Cross-field consistency. This is the big one, and it's where the kickbacks come from. State is the whole application written as a dense paragraph, covering stated mileage, odometer reading from the photo, VIN, year and model, payoff amount and quote date, employer, stated income, license name and date of birth. The questions are the ones an underwriter asks silently while scrolling. Does the odometer evidence support the stated mileage. Is the person on the license the person on the application. Is the payoff quote still inside this lender's window.
Lender routing. Every lender partner has preferences they'll never put in writing. LTV tolerance, vehicle age and mileage caps, and how they feel about a thin file or a recent repo. A choice-typed question over the lender list, with the criteria maintained as text, is easier to change on a Tuesday afternoon than the stored procedure it replaces.
Pre-submission gate. The last call before the package goes over the wire. Is this ready, what's the likeliest stipulation request, how confident are we. Low confidence sends it to a human. That's the real value of a calibrated model. It tells you when it doesn't know.
An illustrative query
I wrote this request only to show the interface. It follows the Clef request shape from Cloudflare's own example, with refinance questions in place of the support-ticket ones. You'd put the applicant's actual values in the state.
{
"model": "clef",
"state": "Applicant stated mileage <stated_miles> on a <year> <model>. Odometer photo OCR read <ocr_miles>. Payoff quote issued <quote_date>. License name Robert; application name Bob.",
"questions": {
"mileage_consistent": {
"type": "noul",
"instructions": "Does the odometer evidence support the stated mileage?"
},
"blocking_issue": {
"type": "choice",
"instructions": "What is the most likely reason an underwriter rejects this package?",
"criteria": {
"mileage": "Stated and observed mileage disagree",
"identity": "Name or identity fields do not reconcile",
"stale_payoff": "Payoff quote outside the lender window",
"none": "No blocking issue found"
}
},
"readiness": {
"type": "score",
"instructions": "How ready is this package for submission?",
"criteria": ["Not ready", "Needs one fix", "Minor cleanup", "Submit now"]
}
}
}
Note the noul type and the score with named bands, both straight from Cloudflare's published example. With a typed schema, the downstream code never parses prose and never has to handle a field the model made up.
Where Databricks does the unglamorous work
A decision model is a function. It has no memory, no history, and no opinion about your lender panel. Everything that makes the call good comes from the state you assemble and the evidence you keep afterward, and that part is platform work.
The state is a join. Lead payload, credit pull, OCR output, vehicle valuation, prior applications from the same applicant, each lender's recent behavior. On a lakehouse that's a feature table keyed on application ID, served online so the gate call isn't waiting on a batch job. Bad state produces a confidently wrong decision in well under a second, which is worse than a slow wrong one because nobody is watching when it happens.
Every call gets logged, both sides. Request state, every typed answer, every confidence score, model name and version, timestamp. One Delta table. Teams skip this and regret it, because without it you cannot answer the only question that matters six weeks in. When the model reports high confidence, how often is it right?
The label comes back from the lender. Approved, declined, stipulation requested, and which stipulation. Join that to the decision log on application ID and the calibration dataset builds itself. Plot predicted readiness against actual kickback rate and you learn whether the confidence scores mean anything on your population. Calibration is a claim the vendor makes about training. Whether it holds on your files is a measurement you run.
Thresholds are a parameter you set, so treat them that way. Once you can measure, set the auto-submit cutoff deliberately. High confidence submits, the middle band goes to a processor, the bottom stops hard. Pick the band edges from your own calibration curve and move them as evidence accumulates, because the right cutoff depends on what a kickback costs you against what a human review costs you. Unity Catalog governs the PII sitting in that state, which matters a great deal in a workflow carrying SSNs and license images. We wrote about the shape of that in an AI governance framework is four answers you can query.
Pick the model by your own measurement. Clef and Clef-flash being Jev-API compatible means you can route a slice of traffic to each and compare on your labels. Cloudflare's own table shows Clef-flash winning some evals and losing others badly, CLINC150 macro-F1 at 66.77 against Clef's 97.43. Published benchmarks tell you which models are worth testing. They stop short of telling you which one to ship.
What to measure from week one
Four numbers belong on the dashboard before the first auto-submit. Kickback rate per lender, broken out by reason. Share of applications auto-submitted versus deferred to a human. Time from lead purchase to submission. Calibration, predicted against observed, bucketed by confidence decile.
The risk is that a fast decision becomes an unexamined one. A rules engine fails loudly, in a line of code you can read. A decision model returns a clean typed answer with a confidence score whether or not the state it was handed made any sense, and it will keep doing that at full volume without complaint. The defense is the log and the label loop, which is why the platform half matters as much as the model call.
What I'd tell someone starting this
Start with the gate before you touch the pipeline. One decision, the pre-submission readiness check, running in shadow mode beside whatever the processing team does today. Log both answers for two weeks and study the disagreements. They'll teach you more about your lender panel than the lenders will.
Write the questions before you write the code. If a decision can't be expressed as a bounded set of typed answers, it isn't a System One task, and it should stay with a person or an LLM.
Leave the deterministic checks alone. VIN checksums, date arithmetic, field presence, state-specific title rules. Those work, and they should stay code. Decision models are for the judgment calls the rules engine was always bad at, the ones full of "usually" and "depends".
And budget for the boring half. Feature table, decision log, label join, calibration report. That's where the accuracy comes from. If you want to talk through how it maps onto a lakehouse, that's the kind of work we do on Databricks.
Frequently asked questions
What if my application states run longer than the model's context window?
Check the limit against your longest real application before you choose a model. Jev gives you a 32k budget for the state plus the single longest question, and Clef has 65,536 tokens that also have to hold images. A refinance file with OCR output, a credit pull and several photos is the kind of state that hits that ceiling, so we'd measure token counts on a sample of your files first.
What does a decision model cost to run on every application?
Jev's input pricing is $0.042 per million tokens, and output tokens are free. That puts the cost in the state you assemble, because the typed answers add nothing to the bill. A long application state costs more per call than a short one, which is one more reason to keep the state tight. Clef runs on Workers AI, so price it there before comparing the two.
What does a confidently wrong answer look like, and how do we catch it?
A clean typed answer with a high confidence score on state that made no sense, returned in well under a second with nobody watching. Join each logged call to the lender's outcome on application ID and check how often high-confidence answers were right, bucketed by confidence decile.
How do I choose between Clef and Clef-flash for the readiness gate?
Route a slice of live traffic to each and compare them on your own lender outcomes. Both are Jev-API compatible, so the switch is cheap. The published numbers show why a single benchmark won't settle it: Clef-flash is faster, at 38.8ms median against 209.3ms, but scored 66.77 macro-F1 on CLINC150 against Clef's 97.43.