
Mohammed Ahmadi arbeitet als Softwareentwickler bei der w3logistics AG und veröffentlicht regelmäßig technische Artikel.
In this article, I explore whether large language models (LLMs) are really necessary for every decision-making task in backend applications. To investigate this, I compare three different approaches for processing warehouse goods-receipt remarks: traditional Java rules, Jev (a decision model developed by TypeSafe AI), and Claude Haiku 5.5.
I conducted an experiment using 200 synthetic remarks in German and English to evaluate how accurately each approach could classify issues, assess their severity, and determine whether goods should be blocked from warehouse processing.
My findings were as follows:
- Classification: Both Jev and Claude achieved 100% accuracy when categorizing the warehouse remarks. Traditional Java rules struggled with more complex descriptions, abbreviations, and indirect language.
- Performance: Jev was approximately 6–8 times faster and nine times cheaper than Claude, making it an attractive alternative for straightforward classification tasks.
- Decision-making: Claude initially performed better when deciding whether goods should be blocked, achieving 98% accuracy compared with Jev’s 72%.
Improving decision criteria: By refining the wording of Jev’s decision criteria, I increased its accuracy from 72% to 85%. This demonstrated how important clear and precise instructions are. - Combining AI with business rules: By adding a deterministic rule based on existing warehouse master data, I increased Jev’s accuracy to 97%, bringing it close to Claude’s performance without requiring additional LLM calls.
- Confidence scores: I also highlight the importance of carefully calibrating and validating confidence scores against real data rather than automatically treating them as probabilities of correctness.
Based on these findings, I propose an architecture that combines three approaches:
- Traditional Java code for deterministic business rules, permissions, and information already available in master data.
- Jev for fast decisions involving predefined categories and options.
- LLMs for complex or uncertain situations that require explanations, flexible reasoning, or generated text.
For production environments, I recommend incorporating human approval for high-risk decisions, implementing fallback mechanisms, logging model decisions, versioning decision criteria, and testing models against representative datasets.
My main conclusion is that we do not need an LLM for every decision in a software system. By combining deterministic business rules, specialized decision models such as Jev, and LLMs where they genuinely add value, we can build systems that are more efficient, cost-effective, and reliable. Ultimately, choosing the right model is only part of the solution; clear decision criteria, domain knowledge, and proper validation against real-world data can have an even greater impact on accuracy.
Schreibe einen Kommentar