
Learn what a decision model is, why Jev AI and Laya are built for quick, clear choices, and whether this course is right for you.
The course moves from decision AI basics to hands-on work in the TypeSafe playground and the Jev AI docs on state and choice, then a side by side comparison in System One Arena. You build six code projects in Python, among them support ticket classification, review sentiment analysis and bank intent classification. You also run Laya locally with Ollaya, use decision models in Ollama, and benchmark eight decision models through Jev-compatible APIs.
Meet your instructor in the next lecture. If you get stuck anywhere, post your question in the Q&A section.
A one-minute introduction to Laxmi Kant, founder of KGP Talkie, and how he can help you upgrade your career or move into AI.
How the course goes in passes from theory to code, how the slide decks and notebooks pair up, and a study method: watch, run it yourself, then change things.
The Udemy player settings that make code easy to read: quality and full screen, speed, captions and transcript, notes and offline viewing.
Where to get the course repository, and the short setup: Python 3.12, uv, one OpenRouter key in the .env file, and a Windows setting for Jupyter.
How to leave an honest rating, how to use the Q&A, and where course announcements appear.
Why paying a giant chat model to tick boxes is wasteful, and what a decision model such as Jev does instead.
Rules, your own trained classifier and a chat model compared on one bank message, and where each one falls short.
The people behind Jev at TypeSafe AI, and how the name System One comes from Kahneman's Thinking, Fast and Slow.
Kahneman's System 1 and System 2 applied to AI: why most decisions inside an app are fast ones, and why Jev writes no text at all.
The five words you need to read any decision API: state, questions, answers, model and usage.
Choice, Score and Noul on one bank message: picking an option, placing a value on a scale and answering yes or no with a probability.
Probability, confidence and calibration explained with a weather app, and three zones for acting, reviewing or escalating.
How the way a model is trained decides how it behaves, told through three teachers, and why Jev is trained to be honest about its confidence.
Four patterns from the TypeSafe docs, starting with asking every question in one call, then confidence gates, weighted scores and routing.
The ten use cases of System One Arena in five groups, and the jobs where a decision model is the wrong tool.
How a decision request differs from a chat completion request, which servers share the format, and the common error codes.
A map of the closed and open decision models, and how to keep apart what a company claims and what you measure yourself.
The four layers of support around decision models: SDKs, gateways such as OpenRouter, frameworks and local servers.
Where decision models go wrong, from counting and dates to order bias and prompt injection, and how to guard against each.
A tour of the TypeSafe AI home page, and why the company says its model is built for decisions inside software and not for chat.
TypeSafe's own comparison table, row by row, showing how Jev differs from a large language model.
Create your TypeSafe console account and find your way around it.
A tour of the console and the playground: usage, API keys and rate limits, then state, questions and running a request.
Run your first Noul in the playground on the question of whether a hotdog is a sandwich, and see how criteria change the probability.
Run a Choice in the playground: pick the colour of the sky from options you define, and see how definitions and state change the answer.
Use a real copyright case about a monkey's selfie to ask four Noul questions about who contributed to the photo.
Replace the four Nouls with one Score question, then read its score, its confidence and the JSON behind it.
Why we read the docs after the playground, and what is still missing: how to build the state and the questions ourselves.
The docs' block diagram of one request: state and questions go in, answers come back in one JSON response, and your code branches on them.
State as a string, an object or an array, and how to add context from your own systems and not only the user's words.
Why every question should be a focused snap judgment, how to split a big judgment into small ones, and the parts of a question.
How a Choice selects one option from a fixed set, with the docs' examples and the value of an other option.
Build the same request with the Python SDK: the client, a Choice question and the structure of the response.
Habits that get the most from Jev, starting with asking many questions in one request, and why extra questions barely change time or cost.
Use structured instructions and criteria, with positive and negative examples, to separate options the model keeps mixing up.
How a Score places an answer on a spectrum of described levels, and what it returns.
The docs' Score examples, watching the score and the confidence for each one.
Work out a Score's value and its confidence by hand from the probabilities.
Work out a Choice's confidence by hand: how far the top probability sits above a pure guess.
Rules for writing levels: describe situations and not degrees, judge each level on its own, and split a complex ticket into separate Scores.
When to use a Noul, why it returns one probability and no confidence, and how true and false criteria work.
The docs' interactive sliders show how sharp or spread-out probabilities move the confidence of a Choice and of a Score.
Meet System One Arena, the app built for this course that puts decision models and chat models side by side on answers, speed and cost.
A guided tour of every control in the arena: the API lineup, decision API and chat LLM columns, use cases, samples and results.
What OpenRouter is, why one account and one key reach many models, and how to read its model pages.
Create an OpenRouter key with an expiry time and a small credit limit plug it into the arena, and pick a free model to start.
Make your first decision call in the arena on the Helpdesk Triage use case, read the answers, speed and cost, and add a second model to compare.
Why a reasoning model can be trained to pick answers like a decision model but not the other way around, shown with Clef.
Run all the samples of one use case through three decision models and compare accuracy, speed and cost per million calls.
Benchmark the three models across all ten use cases in one run, and see why a model that wins one use case may not win another.
Set up the first notebook: the imports, the key in the .env file and the 40 labelled support tickets we will triage.
Send the first ticket to Jev with a hand-built HTTP request and read the JSON that comes back, so there is no magic left.
Send the same request with the TypeSafe SDK and see how little code it needs.
Write a first Choice question for the support team, see how descriptions fix a split probability, and work out the confidence by hand.
Write a first Score question for urgency and see where the score and its confidence come from.
Write a first Noul question about refunds and see how defining true and false fixes an unsure answer.
Ask for the department, the urgency and the refund in one request and read each answer by name.
Send a JSON record as the state and get typed results back as attributes on your own response class.
Triage all 40 tickets at once with the async client, then add a retry policy and a timeout for requests that fail.
Break the code on purpose in four ways and see which part of the code catches each error.
Add up the input tokens of the 40 tickets and turn them into the cost of one request and of a million requests.
Ask four questions about every ticket, put the answers in one table and measure accuracy against the gold labels.
Use confidence to send doubtful tickets and suspected injections to a person, then go through the cheat sheet for the section.
Meet the 120 product reviews and the idea that every question becomes a column of a table.
Build two columns for a review: the aspect it is about as a Choice, and how the reviewer feels as a Score.
Add three yes or no columns, then ask all five questions in one request.
Run all 120 reviews together with asyncio and save the answers as columns of a DataFrame.
Build three dashboards with pandas and matplotlib: topics per product, sentiment by month and refund requests.
Count competitor mentions, build one summary table and list the low-confidence reviews that a person should check.
Split a lead-scoring judgment into one question per factor, using the BANT checklist, and score one lead.
Score all 40 leads, put every factor on the same scale and combine them into one number with weights.
Change the weights and watch the ranking change without a single extra API call, then go through the cheat sheet and wrap up the section.
Set up a router that reads one bank message and picks one of ten card intents, and meet the 200 labelled messages we test it on.
Write the routing question twice, with labels only and with a short description for each label, and compare them on one message.
Run both versions on all 200 messages and measure accuracy overall and for each intent.
Build the confusion matrix to see which intents get mistaken for which, and read the wrong answers one by one.
Check whether the confidence can be trusted, with a reliability table and a plot.
Compare coverage with accuracy to choose a confidence threshold that decides when code acts and when a person decides.
Test whether reversing the order of the options changes the answers, and see how a negation can fool the router.
Keep math and dates in your code, and catch a message that tries to give orders with a Noul.
See what happens with an off-topic message and with long irrelevant text, and fix both.
Pin the model version, save the results together with it, and wrap up the section.
Meet Ollaya, the local server that runs Laya, see how it is built and set up the notebook.
Pull Laya and look inside the two models it points to, the English one and the multilingual one.
A slide-only lesson on how an encoder model answers Choice, Score and Noul questions in one step.
Ask Laya for decisions from the command line, with presets.
Compare a cold request with a warm one, and call Ollaya's native decide endpoint.
Read the extra fields that Laya returns: its own confidence and the act head.
Point the TypeSafe SDK at your own machine and run the hosted Jev code on Laya by changing only the base URL, the key and the model.
Route the operations inbox of an online store with Laya.
Run all 40 emails through Laya, measure accuracy, read the crosstab and study the misses.
Read Hindi, Hinglish and English customer feedback with the language router.
Send every review through the router, and see how the English Laya handles Hindi.
Send one request to Laya and to hosted Jev and compare the two answers.
Compare Laya and hosted Jev on the same 200 messages: Laya is faster and keeps your text on your machine, hosted Jev is more accurate on this task.
Use the built-in presets and write your own.
Build your questions into a model of your own, go through the cheat sheet and wrap up the section.
What this section builds, and how decision models run in Ollama next to chat models.
Pull nimble and tev1 from Python and read what ollama show tells you about them.
See how nimble is built on a frozen base model with LoRA, what is inside the file you download, and who made it.
Make the first call to the /v1/systemone endpoint on your own machine with raw HTTP.
Call the same endpoint from Python with ollama.systemone and ask a Noul, a Choice and a Score at once.
How a decoder model that writes no text still gives a probability for every option: it is asked for one answer letter.
Work out Ollama's confidence for a Choice and for a Score by hand and check it against the returned number.
Run the hosted Jev code against Ollama by changing only the base URL, the API key and the model.
Start a use case: check outbound messages for personal data or internal information before they leave the company.
Run all 52 messages through nimble, measure accuracy twice and study the one message it got wrong.
Turn the two answers into a send or hold decision, with a threshold you choose.
Hit the limit of 64 questions per request on purpose, then measure what many questions cost.
Find out what happens when a prompt is longer than the context window.
Meet the last two limits: 64 KB of text, and text only.
Compare nimble, tev1 and hosted Jev on the same 200 card messages for accuracy and speed.
Look inside the accuracy: how each model does per intent, and which messages they answer differently.
Choose between local and hosted per workload, go through the cheat sheet and look back at what you built.
This course contains the use of artificial intelligence. The course outline, the explanations, the tool choices and every measured number are my own.
Learn decision AI with Jev AI and Laya, the System One models built to make fast, typed decisions inside software. In this hands-on Python course you use Jev AI, Laya, Ollama and OpenRouter for text classification, intent classification, sentiment analysis and message routing, and you check every answer with a confidence score before you trust it.
Think about the small questions inside every real product. Which team should get this support ticket? Is this message urgent? Does this customer want a refund? Many teams send each of these to a big chat model (LLM) and pay for a long written answer, when all they needed was one clean choice.
A decision model is built for exactly this. You give it some text or JSON and your typed questions, and in one fast pass it gives back typed answers, each with a probability. It never writes text. Jev, the System One model from TypeSafe AI, started this kind of model, and Laya is an open decision model that you can run on your own machine.
Jev AI and Laya Fundamentals: Decision AI for Beginners teaches you how to use these models, one step at a time. You start with the ideas in plain words, try Jev AI in its own playground, read its documentation, compare models side by side in System One Arena, and then build six Python projects on real labelled data.
What makes this course different
Three question types, Choice, Score and Noul, and how to read the probability and the confidence score of every answer, including the confidence formulas worked out by hand.
Six Python projects, each with a slide deck and a notebook of the same name: support ticket classification on 40 tickets, sentiment analysis and lead scoring on 120 product reviews, intent classification on 200 real bank card messages, email routing on 40 store emails, a personal data check on 52 outbound messages, and one routing question run on many providers.
Testing before trusting: accuracy per intent, the confusion matrix, a reliability table for calibration, a confidence threshold, and the failure modes that decision models share, such as option order bias and prompt injection.
Hosted and local with the same code: hosted Jev AI through OpenRouter, Laya on your own machine with Ollaya, nimble and tev1 with Ollama, and eight decision models compared in one benchmark. You change only the base URL and the model name.
Honest comparisons from real runs. For example, on the same 200 bank messages, local Laya scored 0.875 accuracy and hosted Jev scored 0.970, with Laya faster and keeping your text on your machine.
Every line of code is typed and explained on screen, and the real output is read out, so you can follow along and run the notebook yourself.
What you will cover
Decision AI basics: why decision models exist, System 1 versus System 2 thinking, the parts of a decision API call, the three primitives, confidence and calibration, decision patterns, endpoints, the model landscape and the limits.
Jev AI hands-on: the TypeSafe AI site and playground, with the hotdog, sky colour and Naruto monkey selfie examples for Noul, Choice and Score.
The Jev AI docs in depth: from state and questions to the confidence formulas, worked by hand.
System One Arena: a side-by-side app for comparing decision models and chat models, with an OpenRouter API key and benchmarks across ten use cases.
Python projects: support ticket triage, a product review sentiment dashboard with lead scoring, and a bank intent router, from a raw HTTP call to dashboards, calibration and confidence thresholds.
Local decision AI: Laya with Ollaya, and nimble and tev1 with Ollama's decision endpoint, with their limits and a send-or-hold check for outbound messages.
Jev-compatible APIs across providers: one request format, many providers, a fair benchmark, cost per million messages, and how to choose a backend and avoid vendor lock-in.
By the end, you will be able to turn messy text into clean, typed decisions in Python, and to measure how far you can trust them before they run inside your product.
A little Python is enough. You do not need a machine learning background, and a GPU is optional: Laya also runs on a CPU, only slower.