# Spring AI and TypeSafe Jev: Fast, Cheap, Structured Decisions

DevFeed: [Spring AI and TypeSafe Jev: Fast, Cheap, Structured Decisions](<https://devfeed.tech/articles/spring-ai-and-typesafe-jev-fast-cheap-structured-decisions-55737.md>)

Original publisher: [Read original article](<https://spring.io/blog/2026/09/21/spring-ai-typesafe-structured-judgment>)

Author: tzolov

Published: 2026-09-21T00:00:00Z

Content type: article

Language: en

Sources: [Spring](<https://devfeed.tech/sources/spring.md>)

Topics: [Spring AI](<https://devfeed.tech/topics/spring-ai.md>), [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>), [decision-making](<https://devfeed.tech/topics/decision-making.md>), [AI Integration Strategies](<https://devfeed.tech/topics/ai-integration-strategies.md>), [agentic workflows](<https://devfeed.tech/topics/agentic-workflows.md>), [Multi Agent Systems](<https://devfeed.tech/topics/multi-agent-systems.md>), [AI Chat](<https://devfeed.tech/topics/ai-chat.md>), [Multi-step AI processes](<https://devfeed.tech/topics/multi-step-ai-processes.md>), [llm-reasoning](<https://devfeed.tech/topics/llm-reasoning.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [ai-applications](<https://devfeed.tech/tags/ai-applications.md>), [api](<https://devfeed.tech/tags/api.md>), [article](<https://devfeed.tech/tags/article.md>), [batch](<https://devfeed.tech/tags/batch.md>), [boot](<https://devfeed.tech/tags/boot.md>), [cloud](<https://devfeed.tech/tags/cloud.md>), [components](<https://devfeed.tech/tags/components.md>), [confidence](<https://devfeed.tech/tags/confidence.md>), [context](<https://devfeed.tech/tags/context.md>), [decision-making](<https://devfeed.tech/tags/decision-making.md>), [demo](<https://devfeed.tech/tags/demo.md>), [documentation](<https://devfeed.tech/tags/documentation.md>), [event-driven](<https://devfeed.tech/tags/event-driven.md>), [example](<https://devfeed.tech/tags/example.md>), [examples](<https://devfeed.tech/tags/examples.md>), [fast](<https://devfeed.tech/tags/fast.md>), [input](<https://devfeed.tech/tags/input.md>), [java](<https://devfeed.tech/tags/java.md>), [jev](<https://devfeed.tech/tags/jev.md>), [microservices](<https://devfeed.tech/tags/microservices.md>), [reactive](<https://devfeed.tech/tags/reactive.md>), [serverless](<https://devfeed.tech/tags/serverless.md>), [spring](<https://devfeed.tech/tags/spring.md>), [spring-ai](<https://devfeed.tech/tags/spring-ai.md>), [structured](<https://devfeed.tech/tags/structured.md>), [typesafe](<https://devfeed.tech/tags/typesafe.md>), [typesafe-jev](<https://devfeed.tech/tags/typesafe-jev.md>), [web-applications](<https://devfeed.tech/tags/web-applications.md>)

## AI overview

Spring AI TypeSafe connects Spring applications to TypeSafe AI's hosted Jev API for fast, structured judgments. Developers provide a state and typed Noul (yes/no), Choice, or Score questions; Jev returns numeric results and confidence without generating text or requiring prompt templates, JSON schemas, or parsing. The excerpt describes JevJudge criteria with thresholds and inconclusive results when confidence is low, plus Spring AI advisors for retrying rejected answers and screening inputs and outputs. Input guardrails can block requests before they reach the chat model; output checks catch unsafe replies. The article reports a 275 ms median for one question and 310 ms for three in its own laptop run, and cites Jev's benchmark against chat and reasoning models while cautioning that results need independent validation. Jev requires a TypeSafe account and API key, does not stream, accepts state only as a string, object, array, or null, and makes one call per document; the excerpt suggests filtering before reranking to limit calls.

## Source excerpt

Reference documentation and GitHub repository We often need quick decision-making components in our AI applications: to pick the next step in a multi-agent system, to evaluate the inputs and outputs of a complex reasoning task, to route a request, to do input ranking and reordering. Those decisions need proper confidence, need to hold across repeated attempts, and need to be fast, cheap and structured. For example, here is a customer's support ticket, and three things you want to know about it: SystemOneResponse response = typeSafeClient.systemOne( "Help! My payouts have been failing for 3 days.", // customer's feedback (state) Map.of( // typed questions "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") .option("sales", "Pricing, upgrades, new accounts") .build(), "frustration", Score.of("How frustrated is the customer?", "Calm", "Frustrated", "Very angry"))); response.noulValue("is_urgent"); // 0.95 response.choiceValue("department"); // "billing" response.choice("department").confidence(); // 0.82 response.scoreValue("frustration"); // 1.1 No prompt template. No JSON schema. No parsing. Three typed questions, three numbers back, in about 300 milliseconds. That is the idea behind Spring AI TypeSafe, a new Spring AI Community project that integrates TypeSafe AI's hosted Jev API. It is not a Chat Model! TypeSafe describes it as making "a judgment a knowledgeable person makes in a second given the right context". It classifies, scores and decides, and it never generates text. You hand it a state (the thing being judged) and a map of typed questions, and every question is answered against that state in one call. 💡 Demo: Seven runnable examples ship with the project. See Demos. Every output quoted in this article is from a live run. Getting Started The project is on Maven Central. Add the s