typesafe-ai-jev-example
Chinese-language tutorial repo with six runnable Python demos and four notes on Jev primitives, with offline mock mode and live samples.
Overview
This repository is a hands-on tutorial for TypeSafe's Jev, written in Chinese. It has six runnable examples and four notes covering the three primitives and six composition patterns. It uses only the Python standard library and runs without an API key in mock mode, where probabilities come from hand-written fixtures but derived fields like choice, score and confidence are computed with the official formulas.
With a key, the author ran the full suite: 28 requests, 29,674 input tokens, $0.00125 total, 1.2 to 1.7 s per call. A comparison note reports findings: fallback options such as "unclear" or "none" were cleaner than a confidence gate; Jev 1.13's distributions were extreme, with many 1.00/0.00 answers, so the 0.5 to 0.9 caution band was nearly empty; and the author's hand-written probabilities were systematically too high because the model judges criteria literally. Live output samples are committed.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Choice | Choice with an explicit fallback option such as unclear or none | ... · unclear |
| Yes / no | Noul question (uncertainty shows as 0.4 to 0.6) | yes · no |
| Score | Score question on ordered levels | — |
How it works
- Clone and run python run_all.py (mock mode without a key).
- Add a key to .env and run check_setup.py.
- Run all demos live against jev-1.13.0.
- Compare live results with hand-written expectations in the notes.
Strengths
- Zero dependencies; runs offline for learning the API shape.
- Reports measured cost and latency for a full live run.
- Practical findings on fallback options versus confidence gates.
Caveats
- Mock probabilities are hand-written, not model output.
- Documentation is in Chinese.
- Findings are from a small set of examples.
Getting started
python run_all.pyAt a glance
- Type
- Service
- Status
- prototype
- Language
- Python
- Runtime
- CLI scripts
- Has code
- yes
- License
- MIT
Use cases and integrations
How curated lists describe it
This repository provides six runnable Python demos and four notes covering TypeSafe Jev primitives and composition patterns, with offline mock mode and committed live samples from jev-1.13.0.
logicrw/awesome-jev-projectsHands-on demos for TypeSafe's Jev (System One) model: six runnable examples and four field notes. Runs offline with no API key; samples/ holds real measured output from jev-1.13.0.
hellogumbo/awesome-jev
Frequently asked questions
Can I run it without a key?
Yes, it falls back to mock mode with hand-written probabilities.
What did the live run cost?
The README reports 28 requests and $0.00125 in total.
What is the main lesson?
Explicit fallback options like unclear handled uncertainty better than confidence thresholds, per the author.
Related projects
Agent skill and CLI that chains Jev question design: find decision calls, check fit, draft, lint, calibrate thresholds and plan a cascade.
Agent skillprototypePythonRunnable Jev cookbooks, a plain-English guide and sixteen interactive simulations of how a typed decision model changes architecture.
AppbetaPythonEducational site with six bounded recipes and a custom builder for AI SDK Choice, Score and Boolean evaluations, exportable as TypeScript.
ServiceTypeScriptTypeSafe docs page on decision patterns: speculative fan-out, confidence-gated routing, composite scoring and intent routing.
ArticleproductionPython sandbox turning Jev issue-category and reproduction judgments into testable routing proposals, with offline replay.
ProjectprototypePythonPlaybook for using Jev as a cheap gate before expensive agent steps: confidence policy, question recipes, a skill and a router.
Projectprototype