Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Jev,Laya, Decision APIs and models : Build, Test and Ship
New
Rating: 5.0 out of 5(2 ratings)
4 students

Jev,Laya, Decision APIs and models : Build, Test and Ship

Typed AI decisions with Jev, Laya, Perplexity, OpenAI and Gemini: build them, test them, ship them
Created byTejasvi Hegde
Last updated 11/2026
English

What you'll learn

  • Explain what a decision model is, how it differs from a text-generating model, and when an older approach such as a small classifier is the better choice
  • Call Jev, Laya, the Perplexity decider, OpenAI decisions and Gemini decisions, and read every response correctly
  • Find the endpoint, authentication, limits and confidence definition in each vendor's own documentation
  • Write typed questions, states and options that give stable answers, including image and document questions
  • Build one client for five vendor dialects with a fallback order and fail-open behaviour, in Python and again in TypeScript
  • Build a golden set and measure accuracy, calibration and risk against coverage with confidence intervals
  • Choose and defend thresholds with act, escalate and abstain bands, and fix overconfidence with temperature scaling
  • Write invariance, contract, failure and prompt-injection tests, and gate releases on them in CI
  • Verify another model's answers: citation and hallucination checks, a verification gate in an agent, and a fair benchmark against an LLM classifier
  • Ship decision features safely: shadow mode, rollout by band, drift monitoring, audit logs and human review
  • Work through fourteen projects and present them as a portfolio, with your own results and their limits

Course content

44 sections • 251 lectures • 22h 51m total length
  • Welcome: what you will build in this course3:09

    Learn what a decision model is, what comes back from a decision call, why this course is testing-led, and what you will build across its sections.

  • How the course works: theory, code in the IDE, tests, projects2:56

    See how every section is organised (theory, coding in the IDE, tests and a quiz) and how to follow each coding lesson offline, without an API key.

  • Course files and downloads: code, cheat sheets and worksheets0:38

    Download everything you need for the course in one place: the full course code (start and final versions of every lesson and project) and all 12 PDFs: cheat sheets, worksheets, checklists, the glossary, the setup guide and the reading list.

  • Set up Python, Node and VS Code or IntelliJ11:16

    Set up Python, a virtual environment, the course packages and optional Node in VS Code or IntelliJ, then write a checker script that prints Ready.

  • Setup on macOS and Windows4:25

    Install Python 3.11+, git, the course packages, an editor and optional Node on macOS and Windows, and confirm the setup with the same checker script.

  • Your first decision7:44

    Write your first decision: a script that asks one yes or no question about a support ticket, reads the probability and routes the ticket with a threshold.

  • Meet Decision Lab: tickets, market desk, image shelf and the mock decision serve7:56

    Tour Decision Lab, the course practice app, from a Python script: the tickets, golden sets, market news, image shelf and the mock decision server.

  • Get your API keys safely and keep them out of the code6:10

    Keep API keys in a .env file, never in code, and write a checker that reports each key as set or missing and confirms git ignores and never tracks them.

  • Refresher: HTTP, JSON and calling an API with an API key6:49

    Make one decision call by hand with plain HTTP and JSON, read the status code and answer, see two common mistakes, then repeat the call with the course client.

  • Quiz: Welcome, setup and the practice app

Requirements

  • Python basics: variables, functions, lists, dictionaries, virtual environments and pip (Python 3.11 or newer)
  • Comfort running commands in a terminal and cloning a repository with Git
  • Basic HTTP and JSON (refreshed in section 1)
  • School-level probability: what 0.8 means and what an average is; everything else is taught from zero
  • No machine learning background and no GPU needed; vendor keys are optional because every coding lesson also runs offline
  • Node 20 or newer only for the TypeScript lessons

Description

This course contains the use of artificial intelligence.

A testing-led course on decision models. A decision model does not write text. You describe a case, ask a typed question (yes or no, pick one option, give a score) and get probabilities back. Your code decides what to do with them. Since September 2026 several vendors have released decision APIs, each with its own request shape and its own meaning of "confidence". This course teaches five of them side by side, and then shows, with tests, how to find out when their answers can be trusted on your own data.

What is in the course. 41 sections and 222 video lectures, about 20 hours of video: 212 lessons plus 10 documentation tours, where the real vendor and standards pages are opened on screen (Jev from TypeSafe, Vercel AI Gateway, the Laya model card on Hugging Face, Ollama, the Perplexity, OpenAI and Gemini Decisions APIs, promptfoo, the NIST AI Risk Management Framework and the EU AI Act). Every section ends with a quiz, five sections have a role play, and there are 12 downloadable PDFs: cheat sheets, worksheets, checklists, a glossary, a setup guide and a reading list.

What you will learn

  • What a decision model is, where it fits in a product (routing, triage, moderation, gating an agent's tool call, ranking) and when not to use one
  • The typed question: choice, yes or no, score, number and box-on-an-image questions, how to write the state and the options, and batching
  • What a probability of 0.8 means, why each vendor defines confidence differently, and why a threshold cannot move between vendors
  • Hands-on with Jev (direct and through a gateway), Laya running locally with no key, the Perplexity decider, OpenAI decisions and Gemini decisions, including images, PDFs, refusals and blocked requests
  • One client for five dialects, with a fallback order and fail-open behaviour; the code is in Python, and the course builds the same client in TypeScript too
  • The older alternatives taught fairly: structured output, logprobs, embeddings with logistic regression, small fine-tuned classifiers, rerankers and guardrail models
  • How decision models are trained, and a small fine-tune on your own labels that runs on a laptop
  • Decisions over images: several images, boxes, resizing and image limits, EXIF orientation
  • Golden sets, accuracy with confidence intervals, confusion matrices, reliability diagrams, expected calibration error, Brier score and McNemar's test
  • Choosing thresholds from a risk and coverage curve, with act, escalate and abstain bands
  • Temperature scaling and conformal prediction sets to handle overconfidence
  • Invariance tests (option order, paraphrase, negation, grouping, repeat runs), contract and failure tests, prompt injection inside the state
  • Drift and CI: pinned versions, alias checks, scheduled drift reports and a GitHub Actions gate that fails the build on a calibration drop
  • Production patterns: shadow mode, rollout by band, caching, metering, audit logs, human review queues, security and the standards to know
  • Decisions inside agents and workflows: gating a tool call, routing between models, decision nodes in LangChain and LangGraph, and RAG guardrails

Fourteen projects. Seven product projects: a support ticket queue, trading signal triage on invented market news (education only, not financial advice), content moderation with images, document intake, an agent tool gate, a model router, and a case study of how one real product uses decision models. Seven test engineering projects: flaky test triage in CI, bug report triage and duplicate detection, a visual regression judge, a requirement coverage checker, an API response oracle, a release go or no-go gate and a test data privacy check. The projects are checked with tests or labelled sets, and several are wired into a GitHub Actions workflow.

How the course is built. Each idea is explained first, then coded and run on screen in VS Code (you can follow along in VS Code or IntelliJ). Every coding lesson runs offline against a fake decision model and the Decision Lab practice app, with no key, no network and no cost; you switch to a real vendor when you are ready. You learn to record the source, the model version and the date with every vendor fact and result, because prices, limits and probabilities change from one version to the next.

What this course does not do. It does not rank vendors for you; the course measures no vendor against another (the five-vendor arena runs on simulated profiles offline). You learn to measure them on your own data, with your own golden set.

Who this course is for:

  • Developers and backend engineers adding AI decisions such as routing, triage or moderation to a product
  • Test engineers and QA engineers who need to test AI features with more than a handful of examples
  • AI engineers who want a repeatable way to choose, measure and monitor decision models on their own data
  • Anyone preparing for interviews on testing and shipping AI features