Do We Really Need an LLM for Every Decision? Testing Jev with Spring Boot

How many of your backend's decisions actually need a large language model? I built a goods-receipt triage service in Spring Boot and benchmarked three approaches — plain Java rules, Jev (a decision model from TypeSafe AI), and Claude Haiku 5.5 — on 200 synthetic warehouse remarks in German and English, three runs each. This is the short version; the full article on Medium has the architecture, the Spring Boot code, the complete benchmark tables, and a production checklist.
What Is Jev?
Jev is a decision model, not a text generator: instead of writing a sentence you then have to parse back into an answer, it picks from options you define upfront and returns a probability for each. It fits what Daniel Kahneman called System 1 thinking — fast, intuitive judgments over a fixed set of options — which turns out to describe a lot of backend AI tasks: is this spam, which team gets this ticket, is this urgent.
What the Benchmark Found
Categorizing a remark turned out to be solved — both Jev and Claude Haiku 5.5 scored 100%, while keyword rules matched only 36% of remarks. The harder, more consequential question was whether to block the goods from putaway: Claude got 98% right against Jev's 72%. But the fix wasn't switching models. Rewriting one sentence of Jev's criteria raised its accuracy to 85%, and adding a single rule from the warehouse's own master data — block missing-document cases only when the goods are hazardous — raised it to 97%, at 225 ms instead of 1.5 seconds and about an eighth of the cost. That 97% figure comes with a caveat: the rewritten criteria and the master-data rule were both designed after reviewing where Jev got things wrong, so it's a promising result, not yet an independently validated one.
Where Each Layer Actually Fits
- Fast, closed-set judgments (triage, categorization, routing) → a decision model like Jev, not an LLM
- Risk signals before irreversible actions (stock postings, payments) → deterministic rules first, a model signal on top, never the sole authority
- Open-ended text, multi-step reasoning, anything genuinely uncertain → an LLM, used deliberately, not by default
- Policy questions your own master data already answers → don't ask any model, just read the data
The full article covers the Spring Boot implementation — Jev as a plain REST client, a confidence-and-risk routing policy, a Resilience4j fallback — a Claude Haiku 5.5 structured-output bug caused by its own reasoning blocks, and the complete benchmark: calibration curves, safe-automation coverage at a 2% error budget, and the lessons learned along the way. The full source code, the labeled dataset, and the analysis script are on GitHub. Continue reading: the full article on Medium →
Mohammed Ahmadi
Software Developer
Recommended
- JBang: Turning Java Into a Scripting Language
- Resilience4j in Spring Boot: From Zero to Production-Ready Fault Tolerance
- A Step-by-Step, Real-World Guide to Securing Company-to-Company API Communication Using OAuth 2.0
- End-to-End Testing with Playwright — Quick Setup & Best Practices
- Visualizing SBOMs with the Dependency Radar: A Practical Approach to Dependency Management
- Request-Response API Styles: REST vs gRPC vs GraphQL vs SOAP
- Building a 3D Warehouse Visualizer with Three.js