Small decisions. Interesting possibilities.Submit contentSubmit

How it uses Jev

In decisions mode the response model is the request shape. Each field becomes one question over the same input: a Literal field becomes a Choice whose allowed values are the criteria, a field annotated with Noul becomes a yes-or-no probability with its own true and false criteria and examples, and a field annotated with Score becomes a score over the declared scale with named levels. The answers are validated back into the Pydantic model, and the same call can go to the OpenAI Decisions API or to Jev through OpenRouter. A development version of the 1.18 release carries the decisions module and its tests.

What Jev decides

A moderation decision compiled from a Pydantic model (illustrative)Example answers · not a recorded Jev response · Source ↗
Question 1 · category
YOUR APP
INSTRUCTION

Which policy category best describes the post?

STATE

The input is one post being reviewed against a supplied content policy. Each field of the response model becomes one question, and the example below shows the choice, the policy probability, the severity score and the format field together in a single request.

JEV · CHOICE
  1. HARASSMENT
  2. HATE
  3. NONE
Question 2 · policy violation
YOUR APP
INSTRUCTION

Does the post violate the supplied content policy, attacking or harassing a person or group rather than expressing disagreement?

STATE

The input is one post being reviewed against a supplied content policy. Each field of the response model becomes one question, and the example below shows the choice, the policy probability, the severity score and the format field together in a single request.

JEV · NOUL
YesNo
Question 3 · severity
YOUR APP
INSTRUCTION

How severe is the content on the declared scale from no abuse to an explicit threat?

STATE

The input is one post being reviewed against a supplied content policy. Each field of the response model becomes one question, and the example below shows the choice, the policy probability, the severity score and the format field together in a single request.

JEV · SCORE
010
Question 4 · format
YOUR APP
INSTRUCTION

What kind of content is being reviewed?

STATE

The input is one post being reviewed against a supplied content policy. Each field of the response model becomes one question, and the example below shows the choice, the policy probability, the severity score and the format field together in a single request.

JEV · CHOICE
  1. text
  2. image_caption
  3. other

App workflow

  1. Declare the answers

    The developer writes a Pydantic response model, using a Literal or choice enum for labels, Noul for a probability and Score for a graded judgment.

  2. Call create

    The client is created with the decisions mode, and create sends the input together with the compiled questions.

  3. Send one request

    The library posts the questions to the OpenAI Decisions API or to Jev through OpenRouter, with all fields in one request.

  4. Validate the distribution

    The returned probabilities are checked against the declared options and mapped back into the Pydantic model; an invalid answer raises instead of being guessed.

  5. Act on typed fields

    Application code reads the validated field values, and create_with_completion also exposes the full distribution when the caller needs it.

Why it is interesting

The request is compiled from the response model the developer already wrote, so one call carries several independent typed questions and the answers come back as validated fields instead of prose to parse. Declaring the possible answers up front is what makes classification and scoring cheaper than asking a chat model for the same judgment.