DEV Community

Anushka Shukla
Anushka Shukla

Posted on

# Where Jev Fits in an Application

Suppose you’re building a service that receives customer support tickets. Before assigning a ticket, your code needs to answer two questions:

  1. Which team should handle it?
  2. Does it need urgent attention?

You could ask a language model to write an assessment and then parse its response. Jev, TypeSafe AI’s decision model, offers another interface: send it the ticket as state, define the questions and their answer types, and receive structured answers.

For example, you might define the team as a Choice between billing, technical, and sales. Urgency could be a Noul, Jev’s probability-based answer to a yes-or-no question. Jev also supports Score questions for placing something on a defined scale.

The flow looks like this:

Ticket + defined questions
           ↓
          Jev
           ↓
Choice and probability-based answers
           ↓
Your application decides what to do
Enter fullscreen mode Exit fullscreen mode

Your application still owns the rules. It might assign a ticket automatically when the team choice is clear, or put it in a review queue when the result is uncertain. Jev supplies a judgment; your code decides how much to trust it.

That separation is useful when the inputs vary too much for a few if statements, but the possible actions are known in advance. Think ticket routing, document classification, content review, or deciding which tool an AI agent should call next.

There’s a limit to keep in mind: structured output guarantees a usable shape, not a correct judgment. I would test it against real examples, track mistakes, and keep human review for decisions where errors matter.

TypeSafe AI’s quickstart shows the request format and a working example if you want to try it.

Top comments (0)