Return to site

🍃🤖 Spring AI + JEV: when AI needs to DECIDE, not TALK

What if your AI needs a decision, not another generated paragraph? 🎯

· spring

🔸 TL;DR

Spring AI now has a different kind of AI integration: TypeSafe Jev, a model designed for fast, structured judgments rather than text generation.

You provide a state plus typed questions. Jev returns decisions, scores and probabilities: no prompt template, JSON schema or parsing required.

View original: https://lnkd.in/eF6rNCMg

🔸 3️⃣ PRIMITIVES, THAT'S IT

The API revolves around three concepts:

▪️ Noul → yes/no probability between 0 and 1

▪️ Choice → choose among predefined options + confidence

▪️ Score → position something on an ordered scale Pasted markdown

For example:

SystemOneResponse response = typeSafeClient.systemOne(
    "Help! My payouts have been failing for 3 days.",
    Map.of(
        "is_urgent",
        Noul.of("Does this convey urgency?"),
        "department",
        Choice.builder()
            .instructions("Which team should handle this?")
            .option("billing", "Payments, invoicing, refunds")
            .option("technical", "Bugs, outages, integrations")
            .build(),
        "frustration",
        Score.of("How frustrated is the customer?",
            "Calm", "Frustrated", "Very angry")
    )
);

One state. Multiple atomic judgments. ⚡

Jev is explicitly not a Chat Model: it classifies, scores and decides without generating prose.

🔸 WHY IS THIS INTERESTING?

The Spring article reports roughly 310 ms for three questions in its author's test. TypeSafe's own benchmark claims 10–125× faster and 22–805× cheaper than the compared models.

That opens interesting use cases around:

▪️ Classification & routing

▪️ LLM-as-a-Judge

▪️ Guardrails

▪️ RAG filtering/reranking

▪️ Tool selection

▪️ Gating expensive LLM calls

And that's perhaps the most important point: Jev doesn't replace the LLM.

The two can complement each other:

LLM → generates 📝

Jev → judges 🎯

🔸 TAKEAWAYS

▪️ Ask narrow questions and compose the decisions in Java.

▪️ Use confidence to decide when human review is needed.

▪️ Keep chat models for prose and open-ended reasoning.

▪️ Consider Jev when the possible outcomes are already known.

▪️ Sometimes AI doesn't need to generate more, it needs to judge better.

#SpringAI #SpringBoot #Java #Jev #AI #ArtificialIntelligence #LLM #JavaDeveloper #SoftwareArchitecture #MachineLearning

📺 YouTube Demo: https://youtu.be/Ai7oVfbFKts

Go further with Java certification:

Java👇

Spring👇

SpringBook👇

JavaFullstackBook👇