Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Decision AI Models: TypeSafe Jev and OpenAI Decisions API
New

Decision AI Models: TypeSafe Jev and OpenAI Decisions API

OpenAI API and Jev in Python: AI decisions with probabilities for triage, LLM guardrails, AI agent tools and photos
Created byRoni Das
Last updated 10/2026
English

What you'll learn

  • Explain what a decision model returns (a probability for each allowed answer) and how that differs from generated text and LLM structured outputs.
  • Call the OpenAI API (the Decisions API) and TypeSafe Jev from Python for AI decision making, with your API keys kept in a .env file.
  • Write yes/no, choice and score questions, and ask many of them in one call.
  • Turn probability and confidence into a rule: act, check first, or send to a person.
  • Find and avoid the weak spots: literal reading, long input, and unpinned model versions.
  • Test a vendor's speed, cost and accuracy claims with your own fair comparison.
  • Build LLM classification and AI agent helpers: a ticket router, a reply guardrail, a tool picker and a duplicate-record knowledge graph.
  • Send photos to the Decisions API and to Jev (experimental image input), and use Jev's Box answer.
  • Build a small Streamlit web app with one tab per question type.
  • Choose between Jev, the Decisions API and a chat model for a given job.

Course content

14 sections • 36 lectures • 3h 11m total length
  • Preview, and a note on dates0:51
  • Meet Jev and the Decisions API8:44
  • Your first call to Jev9:05
  • Section 1 quiz

Requirements

  • Basic Python: you can run a script and read a function.
  • A terminal, a code editor and Python 3.12 or newer, on macOS, Windows or Linux.
  • Git, to copy the course code.
  • A TypeSafe account and API key, and an OpenAI API key with a little credit (the Decisions API lessons need it).
  • No machine-learning maths, no GPU, and no earlier AI experience.

Description

Learn AI decision making in Python with the OpenAI API (its new Decisions API) and TypeSafe Jev. These decision models do not write a paragraph back. They return a probability for every allowed answer, so your code can act on the number directly.

You use them for LLM classification (ticket triage), guardrails that check an LLM reply before it is sent, picking the right tool for AI agents, and grading photos. Structured outputs give you the right shape; a decision model also tells you how sure it is.

This course teaches two of them from zero, in Python: TypeSafe's Jev and OpenAI's Decisions API.

You will:

  • ask the three question types: yes or no (Noul / predicate), one pick from a list (Choice) and a rating on ordered levels (Score), many of them in one call;

  • read probability and confidence, and turn them into an action: act, check first, or hand the decision to a person;

  • find the weak spots before your users do: literal reading, long input, version names;

  • test a vendor's claims with your own fair comparison on 300 tickets;

  • build real projects: ticket triage, a reply guardrail, a tool picker, and a big project that merges duplicate company records into a knowledge graph;

  • send photos to the Decisions API: grade egg photos, run a refund desk, and race a car on pictures to see why a cut-off is not the same as safety;

  • send photos to Jev with its new image input and the new Box answer type;

  • build a small web app with Streamlit, one tab per question type;

  • decide when to use Jev, the Decisions API or a normal chat model, and when to use them together.

Every script, command and result in the course is a real run, recorded in real VS Code, and the full code is included as a download.

A note on dates. The course was recorded on 6 October 2026, when Jev's documentation listed it as text only. On 14 October 2026 TypeSafe announced image input for Jev (experimental) and released Jev 1.14. Section 11 is a new chapter that shows it, and dated notes in the earlier lectures point to it.

About the voice. Some short narration segments, and most of Section 11 (the new image chapter), use an AI voice clone of the instructor's own voice, made with ElevenLabs. They are labelled "voice clone of Roni" on screen. Everything else is the instructor speaking.

Questions? Ask in the Q&A tab of this course. I read every question.

Who this course is for:

  • Backend and full-stack engineers who want AI decisions they can put in an if statement.
  • Data engineers who match, clean or route records.
  • ML and AI engineers who build agents and need a cheap, typed check before an action.
  • Architects and tech leads choosing between decision models and chat models.
  • Students and career switchers with basic Python.