%23%20%2F%2F%2F%20script%0A%23%20requires-python%20%3D%20%22%3E%3D3.12%22%0A%23%20dependencies%20%3D%20%5B%22marimo%22%5D%0A%23%0A%23%20%5Btool.marimo.runtime%5D%0A%23%20watcher_on_save%20%3D%20%22autorun%22%0A%23%0A%23%20%5Btool.marimo.save%5D%0A%23%20autosave%20%3D%20%22off%22%0A%23%20%2F%2F%2F%0A%22%22%22BYOJ%20talk%3A%20WIP%20slides%20draft.%20Slides%20layout%20lives%20in%20layouts%2Fslides.slides.json.%22%22%22%0A%0Aimport%20marimo%0A%0A__generated_with%20%3D%20%220.25.1%22%0Aapp%20%3D%20marimo.App(%0A%20%20%20%20width%3D%22medium%22%2C%0A%20%20%20%20layout_file%3D%22data%3Aapplication%2Fjson%3Bbase64%2CeyJ0eXBlIjogInNsaWRlcyIsICJkYXRhIjogeyJjZWxscyI6IFt7fSwge30sIHt9LCB7fSwgeyJ0eXBlIjogInN1Yi1zbGlkZSJ9LCB7InR5cGUiOiAic3ViLXNsaWRlIn0sIHt9LCB7fSwgeyJ0eXBlIjogInN1Yi1zbGlkZSJ9LCB7InR5cGUiOiAic3ViLXNsaWRlIn0sIHt9LCB7fSwge30sIHt9LCB7InR5cGUiOiAic3ViLXNsaWRlIn0sIHsidHlwZSI6ICJzdWItc2xpZGUifSwgeyJ0eXBlIjogInN1Yi1zbGlkZSJ9LCB7InR5cGUiOiAic3ViLXNsaWRlIn0sIHsidHlwZSI6ICJzdWItc2xpZGUifSwge30sIHt9LCB7fSwge30sIHt9LCB7fSwge31dLCAiZGVjayI6IHt9fX0%3D%22%2C%0A%20%20%20%20css_file%3D%22theme.css%22%2C%0A%20%20%20%20html_head_file%3D%22head.html%22%2C%0A)%0A%0A%0A%40app.cell%0Adef%20_()%3A%0A%20%20%20%20import%20base64%0A%20%20%20%20import%20json%0A%20%20%20%20import%20math%0A%0A%20%20%20%20import%20marimo%20as%20mo%0A%0A%20%20%20%20return%20base64%2C%20json%2C%20math%2C%20mo%0A%0A%0A%40app.cell%0Adef%20title(mo)%3A%0A%20%20%20%20mo.hstack(%0A%20%20%20%20%20%20%20%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20mo.vstack(%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20mo.md(%22%23%20Bring%20Your%20Own%20Jev%22)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20mo.md(%22%40jerpint%2C%20Jeremy%20Pinto%22)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20gap%3D0.5%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20mo.image(src%3D%22public%2Fonix-tiny-labs.png%22%2C%20width%3D400%2C%20rounded%3DTrue)%2C%0A%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20justify%3D%22space-between%22%2C%0A%20%20%20%20%20%20%20%20align%3D%22center%22%2C%0A%20%20%20%20)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(mo)%3A%0A%20%20%20%20%23%20Full-slide%20image%2C%20synced%20from%20Google%20Slides.%20Re-renders%20when%20the%20file%20is%20updated.%0A%20%20%20%20_slide%20%3D%20mo.watch.file(%22public%2Fmemes%2Fdecision-models.png%22)%0A%20%20%20%20mo.image(_slide.read_bytes()%2C%20width%3D%22100%25%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20What%20is%20a%20decision%3F%0A%0A%20%20%20%20A%20decision%20can%20be%20summarized%20as%3A%0A%0A%20%20%20%20%3E%20given%20an%20observation%2C%20which%20option%20should%20I%20pick%3F%0A%0A%20%20%20%20%60%60%60python%0A%0A%20%20%20%20decision%20%3D%20decide(observations)%0A%0A%20%20%20%20if%20decision%3A%0A%20%20%20%20%20%20%20%20print(%22Do%20the%20thing%22)%0A%20%20%20%20else%3A%0A%20%20%20%20%20%20%20%20print(%22Do%20other%20thing%22)%0A%20%20%20%20%60%60%60%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20What%20is%20a%20decision%3F%0A%0A%20%20%20%20Deterministic%20decisions%20are%20easy%2C%20eg%3A%0A%0A%20%20%20%20%60%60%60python%0A%0A%20%20%20%20def%20decide(observations%3A%20dict)%20-%3E%20bool%3A%0A%20%20%20%20%20%20%20%20'''Is%20the%20value%20above%20the%20threshold%3F'''%0A%0A%20%20%20%20%20%20%20%20return%20observations%5B%22value%22%5D%20%3E%20MAXIMUM_ALLOWED_VALUE%0A%0A%0A%20%20%20%20decision%20%3D%20decide(observations)%0A%0A%20%20%20%20if%20decision%3A%0A%20%20%20%20%20%20%20%20print(%22Do%20expensive%20thing%22)%0A%20%20%20%20else%3A%0A%20%20%20%20%20%20%20%20print(%22Do%20other%20thing%22)%0A%20%20%20%20%60%60%60%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20What%20is%20a%20decision%3F%0A%0A%20%20%20%20Semantic%20decisions%20are%20harder%20to%20codify%2C%20eg%3A%0A%0A%20%20%20%20%60%60%60python%0A%0A%20%20%20%20def%20decide(observations%3A%20dict)%20-%3E%20bool%3A%0A%20%20%20%20%20%20%20%20'''Is%20the%20user's%20question%20relevant%3F'''%0A%0A%20%20%20%20%20%20%20%20%23%20no%20threshold%20to%20compare%20against%20so%20you%20guess%20some%20heuristics%0A%20%20%20%20%20%20%20%20keywords%20%3D%20%5B%22health%22%2C%20%22wellness%22%5D%0A%20%20%20%20%20%20%20%20return%20any(k%20in%20observations%5B%22question%22%5D.lower()%20for%20k%20in%20keywords)%0A%0A%0A%20%20%20%20question%20%3D%20%22Can%20you%20help%20me%20reset%20my%20password%3F%22%0A%20%20%20%20decision%20%3D%20decide(%7B%22question%22%3A%20question%7D)%0A%0A%20%20%20%20if%20decision%3A%0A%20%20%20%20%20%20%20%20print(ask_expensive_bot(question))%0A%20%20%20%20else%3A%0A%20%20%20%20%20%20%20%20print(%22Sorry%2C%20I%20can%20only%20help%20with%20health%20and%20wellness%20questions.%22)%0A%20%20%20%20%60%60%60%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(mo)%3A%0A%20%20%20%20mo.vstack(%5B%0A%20%20%20%20%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20%22Decision%20model%22%20in%202020%20(it%20was%20hard)%0A%0A%20%20%20%20COVID-19%20Q%26A%3A%20map%20a%20user's%20question%20to%20a%20pre-canned%20FAQ%20answer...%20**if%20it's%20relevant**.%0A%20%20%20%20%22%22%22)%2C%0A%20%20%20%20%20%20%20%20mo.hstack(%0A%20%20%20%20%20%20%20%20%20%20%20%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20-%20Had%20to%20fine-tune%20for%20every%20use-case%0A%20%20%20%20-%20Training%20data%20was%20**really%20hard**%20to%20get%0A%20%20%20%20%22%22%22)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20mo.image(%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20src%3D%22public%2Ffigures%2Fcovid-qa-schematic.png%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%20cap%20the%20height%20so%20the%20slide%20fits%20(a%2016%3A9%20slide%20is%2056.25cqw%20tall)%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20style%3D%7B%22max-height%22%3A%20%2228cqw%22%2C%20%22width%22%3A%20%22auto%22%2C%20%22max-width%22%3A%20%22100%25%22%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20widths%3D%5B1%2C%201.4%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20align%3D%22center%22%2C%0A%20%20%20%20%20%20%20%20)%2C%0A%20%20%20%20%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%3Csmall%3EBronzi%2C%20Pinto%2C%20Ghosn%2C%20Subakan%2C%20Sharma%2C%20Lu%2C%20Reddy.%20*A%20Question%20Answering%20System%20in%20Response%20to%20the%20COVID-19%20Crisis.*%20%5BMontreal%20AI%20Symposium%202020%5D(https%3A%2F%2Fmontrealaisymposium.wordpress.com%2Faccepted-submissions-2020%2F)%3C%2Fsmall%3E%0A%20%20%20%20%22%22%22)%2C%0A%20%20%20%20%5D)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20LLMs%20changed%20the%20game%0A%0A%20%20%20%20You%20could%20now%20just%20*ask*%20a%20model%2C%20with%20the%20right%20context%3A%0A%0A%20%20%20%20%60%60%60python%0A%0A%20%20%20%20prompt%20%3D%20f'''Is%20this%20question%20about%20health%20and%20wellness%3F%0A%20%20%20%20Question%3A%20%7Bquestion%7D%0A%0A%20%20%20%20Answer%20in%20JSON%3A%20%7B%7B%22relevant%22%3A%20true%20%7C%20false%7D%7D%0A%20%20%20%20PLEASE%20OUTPUT%20VALID%20JSON%20OR%20I%20LOSE%20MY%20JOB'''%0A%0A%20%20%20%20response%20%3D%20client.chat.completions.create(%0A%20%20%20%20%20%20%20%20model%3D%22any-llm%22%2C%0A%20%20%20%20%20%20%20%20messages%3D%5B%7B%22role%22%3A%20%22user%22%2C%20%22content%22%3A%20prompt%7D%5D%2C%0A%20%20%20%20)%0A%20%20%20%20decision%20%3D%20json.loads(response.choices%5B0%5D.message.content)%5B%22relevant%22%5D%0A%20%20%20%20%60%60%60%0A%0A%20%20%20%20Works%20fine...%20until%20it%20replies%0A%0A%20%20%20%20%3E%20%60Sure!%20Here's%20your%20JSON%3A%60%0A%0A%20%20%20%20%F0%9F%92%80%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20Structured%20outputs%3A%20the%20format%20is%20guaranteed%0A%0A%20%20%20%20%60%60%60python%0A%0A%20%20%20%20class%20Relevance(BaseModel)%3A%0A%20%20%20%20%20%20%20%20relevant%3A%20bool%0A%0A%0A%20%20%20%20response%20%3D%20client.chat.completions.parse(%0A%20%20%20%20%20%20%20%20model%3D%22any-llm%22%2C%0A%20%20%20%20%20%20%20%20messages%3D%5B%7B%22role%22%3A%20%22user%22%2C%20%22content%22%3A%20f%22Is%20this%20about%20health%20and%20wellness%3F%20%7Bquestion%7D%22%7D%5D%2C%0A%20%20%20%20%20%20%20%20response_format%3DRelevance%2C%0A%20%20%20%20)%0A%20%20%20%20decision%20%3D%20response.choices%5B0%5D.message.parsed.relevant%0A%20%20%20%20%60%60%60%0A%0A%20%20%20%20Valid%20JSON%20every%20time%2C%20no%20begging%20required.%0A%0A%20%20%20%20But%20**how%20sure**%20is%20it%3F%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20Structured%20output%20%2B%20logprobs%20is%20basically%20already%20Jev%0A%0A%20%20%20%20%60%60%60python%0A%0A%20%20%20%20response%20%3D%20client.chat.completions.parse(%0A%20%20%20%20%20%20%20%20model%3D%22any-llm%22%2C%0A%20%20%20%20%20%20%20%20messages%3Dmessages%2C%0A%20%20%20%20%20%20%20%20response_format%3DRelevance%2C%0A%20%20%20%20%20%20%20%20logprobs%3DTrue%2C%0A%20%20%20%20%20%20%20%20top_logprobs%3D2%2C%20%20%23%20also%20return%20the%202%20most%20likely%20tokens%20%2B%20their%20logprobs%0A%20%20%20%20)%0A%0A%20%20%20%20response.choices%5B0%5D.message.parsed%0A%20%20%20%20%23%20Relevance(relevant%3DTrue)%20%20%20%E2%86%90%20same%20answer%20whether%20it%20was%2099%25%20or%2051%25%20sure%0A%0A%20%20%20%20%23%20logprobs%20at%20the%20true%20%2F%20false%20token%3A%0A%20%20%20%20%23%20%5BTopLogprob(token%3D'true'%2C%20%20logprob%3D-0.03)%2C%20%20%20%23%20%E2%89%88%2097%25%0A%20%20%20%20%23%20%20TopLogprob(token%3D'false'%2C%20logprob%3D-3.5)%5D%20%20%20%20%23%20%E2%89%88%203%25%0A%20%20%20%20%60%60%60%0A%0A%20%20%20%20Structured%20output%20picks%20the%20answer.%20**Logprobs%20tell%20you%20how%20sure%20it%20was.**%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(mo)%3A%0A%20%20%20%20%23%20Accuracy%20vs%20cost%20chart%3B%20re-renders%20when%20the%20file%20is%20updated.%0A%20%20%20%20_fig%20%3D%20mo.watch.file(%22public%2Ffigures%2Fllm-latency-cost.jpg%22)%0A%20%20%20%20mo.vstack(%0A%20%20%20%20%20%20%20%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20The%20problem%3A%20LLMs%20are%20slow%20and%20expensive%20deciders%0A%20%20%20%20%22%22%22)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20mo.hstack(%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20-%20**Latency**%3A%20LLMs%20**generate**%20every%20token%20in%20the%20response%2C%20a%20decision%20only%20generates%20**one%20token**%0A%0A%20%20%20%20-%20**Model**%3A%20LLMs%20have%20to%20learn%20to%20**generate**%20text%2C%20a%20decision%20model%20only%20needs%20to%20**understand**%20it%0A%20%20%20%20%22%22%22)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20mo.vstack(%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20mo.image(_fig.read_bytes()%2C%20style%3D%7B%22max-height%22%3A%20%2236cqw%22%2C%20%22width%22%3A%20%22auto%22%2C%20%22max-width%22%3A%20%22100%25%22%7D)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%3Csmall%3ESource%3A%20%5BIntroducing%20System%20One%20models%20and%20Jev%5D(https%3A%2F%2Ftypesafe.ai%2Fblog%2Fintroducing-system-one-models-and-jev)%2C%20TypeSafe%2C%20Oct%2012%2C%202026%3C%2Fsmall%3E%0A%20%20%20%20%22%22%22)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20align%3D%22center%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20gap%3D0.25%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20widths%3D%5B1%2C%201.5%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20align%3D%22center%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20gap%3D3%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20)%2C%0A%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20gap%3D1%2C%0A%20%20%20%20)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(mo)%3A%0A%20%20%20%20%23%20Announcement%20banner%2C%20synced%20from%20Google%20Slides%20(page%205).%20Re-renders%20when%20the%20file%20is%20updated.%0A%20%20%20%20_banner%20%3D%20mo.watch.file(%22public%2Ffigures%2Fjev-announcement.png%22)%0A%20%20%20%20mo.vstack(%0A%20%20%20%20%20%20%20%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20What%20is%20Jev%3F%0A%20%20%20%20%22%22%22)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20mo.hstack(%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20-%20A%20**decision%20model**%20from%20**TypeSafe**%3A%20*%22unstructured%20state%20in%2C%20typed%20probabilistic%20decisions%20out%22*%0A%20%20%20%20-%20They%20call%20it%20a%20**System%20One%20model**%3A%20fast%2C%20structured%20decisions%20that%20software%20can%20use%20directly%0A%20%20%20%20-%20**Closed%20source**%3A%20we%20get%20an%20API%2C%20not%20the%20weights%20or%20the%20architecture%0A%20%20%20%20-%20It%20**started%20the%20hype**%3A%20open%20replications%2C%20guides%20and%20leaderboards%20within%20days%0A%20%20%20%20%22%22%22)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20mo.image(%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20_banner.read_bytes()%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20style%3D%7B%22max-height%22%3A%20%2230cqw%22%2C%20%22width%22%3A%20%22auto%22%2C%20%22max-width%22%3A%20%22100%25%22%2C%20%22border-radius%22%3A%20%228px%22%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20widths%3D%5B1.2%2C%201%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20align%3D%22center%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20gap%3D2%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%3Csmall%3ESource%3A%20%5BIntroducing%20System%20One%20models%20and%20Jev%5D(https%3A%2F%2Ftypesafe.ai%2Fblog%2Fintroducing-system-one-models-and-jev)%2C%20TypeSafe%3C%2Fsmall%3E%0A%20%20%20%20%22%22%22)%2C%0A%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20gap%3D0.75%2C%0A%20%20%20%20)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(mo)%3A%0A%20%20%20%20def%20decision_flow(stage)%3A%0A%20%20%20%20%20%20%20%20%22%22%22The%20%22when%20to%20use%20a%20decision%20model%22%20flowchart%2C%20revealed%20in%20stages.%0A%0A%20%20%20%20%20%20%20%201%3A%20decision%20model%20vs%20LLM.%202%3A%20%2B%20%22what%20kind%20of%20answer%3F%22%20(LLM%20greyed%20out).%0A%20%20%20%20%20%20%20%203%3A%20%2B%20Noul%20%2F%20Choice%20%2F%20Score.%0A%20%20%20%20%20%20%20%20%22%22%22%0A%20%20%20%20%20%20%20%20lines%20%3D%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22flowchart%20LR%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20'Q%7B%22Fixed%20set%20of%20options%2C%3Cbr%2F%3Eknown%20in%20advance%3F%22%7D'%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20'Q%20--%20%22%3Cb%3Eyes%3C%2Fb%3E%22%20--%3E%20D%5B%22%3Cb%3EDecision%20model%3C%2Fb%3E%3Cbr%2F%3Eclassification%20%C2%B7%20true%20or%20false%20%C2%B7%20choice%22%5D'%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20'Q%20--%20%22%3Cb%3Eno%3C%2Fb%3E%22%20--%3E%20L%5B%22%3Cb%3ELLM%3C%2Fb%3E%3Cbr%2F%3Etext%20%C2%B7%20code%20%C2%B7%20open-ended%22%5D'%2C%0A%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20if%20stage%20%3E%3D%202%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20lines.append('D%20--%3E%20T%7B%22What%20kind%3Cbr%2F%3Eof%20answer%3F%22%7D')%0A%20%20%20%20%20%20%20%20if%20stage%20%3E%3D%203%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20lines%20%2B%3D%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20'T%20--%20%22yes%20%2F%20no%22%20--%3E%20N%5B%22%3Cb%3ENoul%3C%2Fb%3E%3Cbr%2F%3EP(yes)%22%5D'%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20'T%20--%20%22one%20of%20N%22%20--%3E%20C%5B%22%3Cb%3EChoice%3C%2Fb%3E%3Cbr%2F%3EP%20per%20option%22%5D'%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20'T%20--%20%22a%20level%20on%20a%20scale%22%20--%3E%20S%5B%22%3Cb%3EScore%3C%2Fb%3E%3Cbr%2F%3EP%20per%20level%22%5D'%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20lines%20%2B%3D%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22classDef%20question%20fill%3A%23ffffff%2Cstroke%3A%23383a42%2Cstroke-width%3A2px%2Ccolor%3A%23383a42%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22classDef%20decision%20fill%3A%23f6e9f6%2Cstroke%3A%23a626a4%2Cstroke-width%3A2px%2Ccolor%3A%23383a42%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22classDef%20llm%20fill%3A%23fdf3e1%2Cstroke%3A%23c18401%2Cstroke-width%3A2px%2Ccolor%3A%23383a42%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22classDef%20muted%20fill%3A%23f3f4f6%2Cstroke%3A%23d1d5db%2Cstroke-width%3A2px%2Ccolor%3A%239ca3af%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22class%20Q%20question%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22class%20D%20decision%22%2C%0A%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20if%20stage%20%3E%3D%202%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20lines%20%2B%3D%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22class%20T%20question%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22class%20L%20muted%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22linkStyle%201%20stroke%3A%23d1d5db%2Ccolor%3A%239ca3af%22%2C%20%20%23%20the%20%22no%22%20arrow%20to%20the%20LLM%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20else%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20lines.append(%22class%20L%20llm%22)%0A%20%20%20%20%20%20%20%20if%20stage%20%3E%3D%203%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20lines.append(%22class%20N%2CC%2CS%20decision%22)%0A%20%20%20%20%20%20%20%20return%20mo.mermaid(%0A%20%20%20%20%20%20%20%20%20%20%20%20%22%5Cn%20%20%20%20%22.join(lines)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20theme%3D%22base%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20theme_variables%3D%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22fontSize%22%3A%20%2218px%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22fontFamily%22%3A%20%22-apple-system%2C%20BlinkMacSystemFont%2C%20Inter%2C%20Helvetica%20Neue%2C%20Arial%2C%20sans-serif%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22lineColor%22%3A%20%22%23383a42%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22edgeLabelBackground%22%3A%20%22%23ffffff%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20)%0A%0A%20%20%20%20return%20(decision_flow%2C)%0A%0A%0A%40app.cell%0Adef%20_(decision_flow%2C%20mo)%3A%0A%20%20%20%20mo.vstack(%5Bmo.md(r%22%22%22%0A%20%20%20%20%23%23%20When%20to%20use%20a%20decision%20model%0A%20%20%20%20%22%22%22)%2C%20decision_flow(1)%5D%2C%20gap%3D1)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(decision_flow%2C%20mo)%3A%0A%20%20%20%20mo.vstack(%5Bmo.md(r%22%22%22%0A%20%20%20%20%23%23%20What%20kind%20of%20answer%3F%0A%20%20%20%20%22%22%22)%2C%20decision_flow(2)%5D%2C%20gap%3D1)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(mo)%3A%0A%20%20%20%20%23%20Full-slide%20image%2C%20synced%20from%20Google%20Slides%20(page%204).%20Re-renders%20when%20the%20file%20is%20updated.%0A%20%20%20%20_slide%20%3D%20mo.watch.file(%22public%2Ffigures%2Ftypesafe-primitives.png%22)%0A%20%20%20%20mo.vstack(%0A%20%20%20%20%20%20%20%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20What%20kind%20of%20answer%3F%0A%20%20%20%20%22%22%22)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20mo.vstack(%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20mo.image(%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20_slide.read_bytes()%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20style%3D%7B%22max-height%22%3A%20%2232cqw%22%2C%20%22width%22%3A%20%22auto%22%2C%20%22max-width%22%3A%20%22100%25%22%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%3Csmall%3ESource%3A%20%5Bdocs.typesafe.ai%5D(https%3A%2F%2Fdocs.typesafe.ai%2Fintroduction)%3C%2Fsmall%3E%0A%20%20%20%20%22%22%22)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20align%3D%22center%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20gap%3D0.25%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20Jev%20set%20the%20standard%20for%20what%20the%20API%20surface%20could%20look%20like%20for%20decision%20models.%0A%20%20%20%20%22%22%22)%2C%0A%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20gap%3D0.75%2C%0A%20%20%20%20)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(decision_flow%2C%20mo)%3A%0A%20%20%20%20mo.vstack(%5Bmo.md(r%22%22%22%0A%20%20%20%20%23%23%20What%20kind%20of%20answer%3F%0A%20%20%20%20%22%22%22)%2C%20decision_flow(3)%5D%2C%20gap%3D1)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(mo)%3A%0A%20%20%20%20mo.vstack(%0A%20%20%20%20%20%20%20%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20Jev%20data%20structures%0A%0A%20%20%20%20The%20question%20moved%20**from%20the%20output%20head%20into%20the%20input**%3A%20one%20state%2C%20many%20questions%2C%20one%20call.%0A%20%20%20%20%22%22%22)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20mo.hstack(%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%60%60%60python%0A%0A%20%20%20%20%40dataclass%0A%20%20%20%20class%20Noul%3A%20%20%20%20%20%20%23%20is%20this%20true%3F%0A%20%20%20%20%20%20%20%20instructions%3A%20str%0A%20%20%20%20%20%20%20%20%23%20-%3E%20noul%3A%20P(yes)%0A%0A%0A%20%20%20%20%40dataclass%0A%20%20%20%20class%20Choice%3A%20%20%20%20%23%20pick%20one%20of%20N%0A%20%20%20%20%20%20%20%20instructions%3A%20str%0A%20%20%20%20%20%20%20%20criteria%3A%20dict%5Bstr%2C%20str%5D%0A%20%20%20%20%20%20%20%20%23%20-%3E%20choice%20%2B%20probabilities%0A%0A%0A%20%20%20%20%40dataclass%0A%20%20%20%20class%20Score%3A%20%20%20%20%20%23%20how%20much%3F%20(ordered%20classes)%0A%20%20%20%20%20%20%20%20instructions%3A%20str%0A%20%20%20%20%20%20%20%20criteria%3A%20list%5Bstr%5D%0A%20%20%20%20%20%20%20%20%23%20-%3E%20score%20%2B%20probabilities%0A%20%20%20%20%60%60%60%0A%20%20%20%20%22%22%22)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%60%60%60python%0A%0A%20%20%20%20response%20%3D%20client.system_one(%0A%20%20%20%20%20%20%20%20state%3Duser_message%2C%0A%20%20%20%20%20%20%20%20questions%3D%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22is_relevant%22%3A%20Noul(instructions%3D%22Is%20this%20about%20health%20and%20wellness%3F%22)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22topic%22%3A%20Choice(%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20instructions%3D%22Which%20topic%20is%20it%20about%3F%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20criteria%3D%7B%22sleep%22%3A%20%22...%22%2C%20%22nutrition%22%3A%20%22...%22%2C%20%22fitness%22%3A%20%22...%22%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22urgency%22%3A%20Score(%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20instructions%3D%22How%20urgent%20is%20it%3F%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20criteria%3D%5B%22not%20urgent%22%2C%20%22somewhat%20urgent%22%2C%20%22very%20urgent%22%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20)%2C%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20)%0A%0A%20%20%20%20response.nouls%5B%22is_relevant%22%5D.noul%20%20%20%20%23%200.97%0A%20%20%20%20response.choices%5B%22topic%22%5D.choice%20%20%20%20%20%20%23%20%22sleep%22%0A%20%20%20%20response.scores%5B%22urgency%22%5D.score%20%20%20%20%20%20%23%200.26%0A%20%20%20%20%60%60%60%0A%20%20%20%20%22%22%22)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20widths%3D%5B1%2C%201.5%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20align%3D%22center%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20gap%3D1.5%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%3Csmall%3EAPI%20shape%3A%20%5BTypeSafe%20docs%2C%20quickstart%5D(https%3A%2F%2Fdocs.typesafe.ai%2Fintroduction%2Fquickstart)%20(%60POST%20%2Fv1%2Fsystemone%60)%3C%2Fsmall%3E%0A%20%20%20%20%22%22%22)%2C%0A%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20gap%3D0.5%2C%0A%20%20%20%20)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(json%2C%20mo)%3A%0A%20%20%20%20%23%20A%20real%20Jev%20call%2C%20saved%20from%20OpenRouter's%20Decisions%20API.%20Re-renders%20when%20the%20file%20is%20updated.%0A%20%20%20%20_result%20%3D%20json.loads(mo.watch.file(%22public%2Fresults%2Fjev-3am.json%22).read_text())%0A%20%20%20%20_response%20%3D%20_result%5B%22response%22%5D%0A%20%20%20%20_relevant%2C%20_topic%2C%20_urgency%20%3D%20(_response%5B%22answers%22%5D%5Bk%5D%20for%20k%20in%20(%22is_relevant%22%2C%20%22topic%22%2C%20%22urgency%22))%0A%20%20%20%20_level%20%3D%20max(_urgency%5B%22probabilities%22%5D%2C%20key%3D_urgency%5B%22probabilities%22%5D.get)%0A%20%20%20%20_asked%20%3D%20%7Bk%3A%20q%5B%22instructions%22%5D%20for%20k%2C%20q%20in%20_result%5B%22request%22%5D%5B%22questions%22%5D.items()%7D%0A%0A%20%20%20%20_code%20%3D%20%22%5Cn%22.join(%0A%20%20%20%20%20%20%20%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22%60%60%60python%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20f'%23%20Noul%3A%20%22%7B_asked%5B%22is_relevant%22%5D%7D%22'%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20'%22is_relevant%22%3A%20%7B'%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20f'%20%20%20%20%22noul%22%3A%20%7B_relevant%5B%22noul%22%5D%7D%2C'%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22%7D%2C%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20f'%23%20Choice%3A%20%22%7B_asked%5B%22topic%22%5D%7D%22'%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20'%22topic%22%3A%20%7B'%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20f'%20%20%20%20%22choice%22%3A%20%22%7B_topic%5B%22choice%22%5D%7D%22%2C'%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20f'%20%20%20%20%22probabilities%22%3A%20%7Bjson.dumps(_topic%5B%22probabilities%22%5D)%7D%2C'%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22%7D%2C%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20f'%23%20Score%3A%20%22%7B_asked%5B%22urgency%22%5D%7D%22'%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20'%22urgency%22%3A%20%7B'%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20f'%20%20%20%20%22score%22%3A%20%7B_urgency%5B%22score%22%5D%7D%2C%20%20%23%20%3D%200%C3%97P(0)%20%2B%201%C3%97P(1)%20%2B%202%C3%97P(2)'%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20f'%20%20%20%20%22probabilities%22%3A%20%7Bjson.dumps(_urgency%5B%22probabilities%22%5D)%7D%2C'%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22%7D%2C%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22%60%60%60%22%2C%0A%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20)%0A%20%20%20%20_reading%20%3D%20%22%5Cn%22.join(%0A%20%20%20%20%20%20%20%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20f%22-%20**%7B_relevant%5B'noul'%5D%3A.0%25%7D**%20sure%20it's%20about%20health%20and%20wellness%3A%20call%20the%20bot%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20f%22-%20It's%20about%20**%7B_topic%5B'choice'%5D%7D**%20(%7B_topic%5B'probabilities'%5D%5B_topic%5B'choice'%5D%5D%3A.0%25%7D)%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20f%22-%20Mostly%20**%7B_urgency%5B'legend'%5D%5B_level%5D%7D**%20(%7B_urgency%5B'probabilities'%5D%5B_level%5D%3A.0%25%7D)%22%2C%0A%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20)%0A%0A%20%20%20%20mo.vstack(%0A%20%20%20%20%20%20%20%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20mo.md(f%22%22%22%0A%20%20%20%20%23%23%20What%20comes%20back%0A%0A%20%20%20%20*%22%7B_result%5B%22request%22%5D%5B%22state%22%5D%7D%22*%0A%20%20%20%20%22%22%22)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20mo.hstack(%5Bmo.md(_code)%2C%20mo.md(_reading)%5D%2C%20widths%3D%5B1.5%2C%201%5D%2C%20align%3D%22center%22%2C%20gap%3D2)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20mo.md(%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20f%22%3Csmall%3EReal%20response%20from%20%60%7B_response%5B'model'%5D%7D%60%20via%20OpenRouter's%20Decisions%20API%20%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20f%22(%7B_result%5B'latency_ms'%5D%7D%20ms%2C%20%24%7B_response%5B'usage'%5D%5B'cost'%5D%3A.6f%7D%2C%20%7B_result%5B'date'%5D%7D).%20%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20f%22Raw%3A%20%3Ccode%3Epublic%2Fresults%2Fjev-3am.json%3C%2Fcode%3E%3C%2Fsmall%3E%22%0A%20%20%20%20%20%20%20%20%20%20%20%20)%2C%0A%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20gap%3D0.5%2C%0A%20%20%20%20)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(mo)%3A%0A%20%20%20%20%23%20Full-slide%20image%2C%20synced%20from%20Google%20Slides%20(page%203).%20Re-renders%20when%20the%20file%20is%20updated.%0A%20%20%20%20_slide%20%3D%20mo.watch.file(%22public%2Ffigures%2Fencoder-vs-decoder.png%22)%0A%20%20%20%20mo.vstack(%0A%20%20%20%20%20%20%20%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20Model%20architecture%0A%20%20%20%20%22%22%22)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20mo.hstack(%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20A%20decision%20model%20can%20be%20%22just%22%20a%20**BERT-style%20encoder**%3A%20smaller%20and%20easier%20to%20train.%0A%0A%20%20%20%20LLMs%20need%20a%20**decoder**%20to%20generate.%0A%0A%20%20%20%20Both%20are%20transformers.%0A%20%20%20%20%22%22%22)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20mo.image(%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20_slide.read_bytes()%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20style%3D%7B%22max-height%22%3A%20%2240cqw%22%2C%20%22width%22%3A%20%22auto%22%2C%20%22max-width%22%3A%20%22100%25%22%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20widths%3D%5B1%2C%202.6%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20align%3D%22center%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20gap%3D1.5%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%3Csmall%3EFigures%20adapted%20from%20Sebastian%20Raschka%2C%20%5BLanguage%20Models%20for%20Text%20Classification%3A%20From%20Bag-of-Words%20to%20Jev%5D(https%3A%2F%2Fmagazine.sebastianraschka.com%2Fp%2Fclassifier-history-and-jev)%20(originals%3A%20BERT%2C%20Devlin%20et%20al.%202019%3B%20Transformer%2C%20Vaswani%20et%20al.%202017)%3C%2Fsmall%3E%0A%20%20%20%20%22%22%22)%2C%0A%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20gap%3D0.25%2C%0A%20%20%20%20)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(math%2C%20mo%2C%20temperature)%3A%0A%20%20%20%20%23%20Toy%20answer%20logits%20for%20%22Which%20topic%20is%20this%20question%20about%3F%22%20(the%20real%20model%20comes%20later).%0A%20%20%20%20_logits%20%3D%20%7B%22sleep%22%3A%204.0%2C%20%22nutrition%22%3A%201.5%2C%20%22fitness%22%3A%201.0%2C%20%22off-topic%22%3A%200.2%7D%0A%20%20%20%20_z%20%3D%20%7Bk%3A%20v%20%2F%20temperature.value%20for%20k%2C%20v%20in%20_logits.items()%7D%0A%20%20%20%20_norm%20%3D%20sum(math.exp(v)%20for%20v%20in%20_z.values())%0A%20%20%20%20_probs%20%3D%20%7Bk%3A%20math.exp(v)%20%2F%20_norm%20for%20k%2C%20v%20in%20_z.items()%7D%0A%20%20%20%20_top%20%3D%20max(_probs%2C%20key%3D_probs.get)%0A%0A%20%20%20%20_cols%20%3D%20%22%22.join(%0A%20%20%20%20%20%20%20%20f'''%3Cdiv%20style%3D%22flex%3A1%3Bdisplay%3Aflex%3Bflex-direction%3Acolumn%3Bjustify-content%3Aflex-end%3Balign-items%3Acenter%3Bheight%3A100%25%22%3E%0A%20%20%20%20%20%20%20%20%20%20%3Cdiv%20style%3D%22font-weight%3A700%3Bmargin-bottom%3A0.3em%22%3E%7Bp%3A.0%25%7D%3C%2Fdiv%3E%0A%20%20%20%20%20%20%20%20%20%20%3Cdiv%20style%3D%22width%3A100%25%3Bheight%3A%7Bp%20*%2085%3A.1f%7D%25%3Bborder-radius%3A6px%206px%200%200%3Bbackground%3A%7B%22%23a626a4%22%20if%20k%20%3D%3D%20_top%20else%20%22%23d8b4d8%22%7D%22%3E%3C%2Fdiv%3E%0A%20%20%20%20%20%20%20%20%3C%2Fdiv%3E'''%0A%20%20%20%20%20%20%20%20for%20k%2C%20p%20in%20_probs.items()%0A%20%20%20%20)%0A%20%20%20%20_labels%20%3D%20%22%22.join(f'%3Cdiv%20style%3D%22flex%3A1%3Btext-align%3Acenter%22%3E%7Bk%7D%3C%2Fdiv%3E'%20for%20k%20in%20_probs)%0A%20%20%20%20_chart%20%3D%20mo.Html(%0A%20%20%20%20%20%20%20%20f'''%3Cdiv%20style%3D%22font-size%3A1.6cqw%3Bwidth%3A100%25%22%3E%0A%20%20%20%20%20%20%20%20%20%20%3Cdiv%20style%3D%22display%3Aflex%3Balign-items%3Aflex-end%3Bgap%3A1.5cqw%3Bheight%3A20cqw%3Bborder-bottom%3A2px%20solid%20%23383a42%3Bpadding%3A0%200.5cqw%22%3E%7B_cols%7D%3C%2Fdiv%3E%0A%20%20%20%20%20%20%20%20%20%20%3Cdiv%20style%3D%22display%3Aflex%3Bgap%3A1.5cqw%3Bpadding%3A0.4em%200.5cqw%200%3Bcolor%3A%23383a42%22%3E%7B_labels%7D%3C%2Fdiv%3E%0A%20%20%20%20%20%20%20%20%3C%2Fdiv%3E'''%0A%20%20%20%20)%0A%0A%20%20%20%20mo.vstack(%0A%20%20%20%20%20%20%20%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20Calibration%3A%20can%20you%20trust%20the%2090%25%3F%0A%20%20%20%20%22%22%22)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20mo.hstack(%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20A%20model%20is%20**calibrated**%20if%2C%20when%20it%20says%20**90%25**%2C%20it's%20right%20**90%25**%20of%20the%20time.%0A%0A%20%20%20%20-%20It%20says%20**90%25**%20on%2010%20reviews%2C%20but%20only%20**8**%20are%20right%3A%20**overconfident**%0A%20%20%20%20-%20Calibrated%2C%20it%20says%20**80%25**%20on%20those%20same%20reviews%3A%20same%20accuracy%2C%20**honest%20probability**%0A%0A%20%20%20%20Why%20it%20matters%3A%20decisions%20run%20on%20thresholds.%20*%22Only%20call%20the%20expensive%20bot%20if%20P(relevant)%20%3E%200.7%22*%20only%20works%20if%200.7%20means%200.7.%0A%0A%20%20%20%20Raw%20LLM%20logprobs%20are%20usually%20**overconfident**.%0A%20%20%20%20%22%22%22)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20mo.vstack(%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20mo.md(%22*Which%20topic%20is%20this%20question%20about%3F*%22)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20_chart%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20temperature%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20gap%3D1%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20widths%3D%5B1.1%2C%201%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20align%3D%22center%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20gap%3D2.5%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%3Csmall%3EExample%20adapted%20from%20Sebastian%20Raschka%2C%20%5BFrom%20Bag-of-Words%20to%20Jev%5D(https%3A%2F%2Fmagazine.sebastianraschka.com%2Fp%2Fclassifier-history-and-jev)%3C%2Fsmall%3E%0A%20%20%20%20%22%22%22)%2C%0A%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20gap%3D0.75%2C%0A%20%20%20%20)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(mo)%3A%0A%20%20%20%20temperature%20%3D%20mo.ui.slider(0.5%2C%205.0%2C%20step%3D0.1%2C%20value%3D1.0%2C%20label%3D%22temperature%22)%0A%20%20%20%20return%20(temperature%2C)%0A%0A%0A%40app.cell%0Adef%20_(json%2C%20mo)%3A%0A%20%20%20%20%23%20Real%20answers%2C%20saved%20from%20the%20demo's%20three%20backends.%20Re-renders%20when%20the%20file%20is%20updated.%0A%20%20%20%20_saved%20%3D%20json.loads(mo.watch.file(%22public%2Fresults%2Ffailures.json%22).read_text())%0A%20%20%20%20_models%20%3D%20list(_saved%5B%22results%22%5D%5B0%5D%5B%22answers%22%5D)%0A%0A%20%20%20%20def%20_top(answer)%3A%0A%20%20%20%20%20%20%20%20probs%20%3D%20answer%5B%22probabilities%22%5D%0A%20%20%20%20%20%20%20%20if%20not%20probs%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20%22error%22%0A%20%20%20%20%20%20%20%20best%20%3D%20max(probs%2C%20key%3Dprobs.get)%0A%20%20%20%20%20%20%20%20return%20f%22%7Bbest%7D%20**%7Bprobs%5Bbest%5D%3A.0%25%7D**%22%0A%0A%20%20%20%20_rows%20%3D%20%22%5Cn%22.join(%0A%20%20%20%20%20%20%20%20f%22%7C%20*%7Br%5B'state'%5D%7D%20%7Br%5B'question'%5D%7D*%20%7C%20%22%20%2B%20%22%20%7C%20%22.join(_top(r%5B%22answers%22%5D%5Bm%5D)%20for%20m%20in%20_models)%20%2B%20%22%20%7C%22%0A%20%20%20%20%20%20%20%20for%20r%20in%20_saved%5B%22results%22%5D%0A%20%20%20%20)%0A%20%20%20%20mo.md(f%22%22%22%0A%20%20%20%20%23%23%20Where%20decision%20models%20might%20fail%0A%0A%20%20%20%20They're%20still%20**smaller%20models**%2C%20with%20a%20weaker%20**world%20model**%3A%0A%0A%20%20%20%20-%20**Ambiguous%2C%20long-context%20reasoning**%3A%20read%20a%20whole%20murder%20mystery%20novel%2C%20*who%20is%20the%20murderer%3F*%0A%20%20%20%20-%20**Stochastic%20events%2C%20unknowable%20futures%2C%20calibration**%3A%20they%20still%20answer%2C%20with%20confidence%0A%0A%20%20%20%20%7C%20We%20asked%20%7C%20%7B%22%20%7C%20%22.join(_models)%7D%20%7C%0A%20%20%20%20%7C---%7C%7B%22---%7C%22%20*%20len(_models)%7D%0A%20%20%20%20%7B_rows%7D%0A%0A%20%20%20%20%3Csmall%3EReal%20answers%2C%20%7B_saved%5B%22date%22%5D%7D.%20Same%20prompts%20as%20the%20demo.%3C%2Fsmall%3E%0A%0A%20%20%20%20So%20how%20good%20are%20the%20open%20ones%3F%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(base64%2C%20mo)%3A%0A%20%20%20%20%23%20Leaderboard%20screenshot%20(cropped%20to%20the%20chart)%3B%20clicking%20it%20opens%20the%20live%20page.%0A%20%20%20%20_img%20%3D%20base64.b64encode(mo.watch.file(%22public%2Ffigures%2Fjev-decision-index.png%22).read_bytes()).decode()%0A%20%20%20%20mo.vstack(%0A%20%20%20%20%20%20%20%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20Everyone%20can%20build%20one%3A%20the%20Jev%20Decision%20Index%0A%0A%20%20%20%20**10%2B**%20open%20models%20already%20score%20above%20Jev%0A%20%20%20%20%22%22%22)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20mo.Html(%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20'%3Ca%20href%3D%22https%3A%2F%2Fhuggingface.co%2Fspaces%2Fmultimodalart%2Fjev-decision-index%22%20target%3D%22_blank%22%3E'%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20f'%3Cimg%20src%3D%22data%3Aimage%2Fpng%3Bbase64%2C%7B_img%7D%22%20'%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20'style%3D%22display%3Ablock%3Bmargin%3A0%20auto%3Bmax-height%3A36cqw%3Bmax-width%3A100%25%3Bborder-radius%3A8px%22%3E%3C%2Fa%3E'%0A%20%20%20%20%20%20%20%20%20%20%20%20)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%5Bhuggingface.co%2Fspaces%2Fmultimodalart%2Fjev-decision-index%5D(https%3A%2F%2Fhuggingface.co%2Fspaces%2Fmultimodalart%2Fjev-decision-index)%0A%20%20%20%20%22%22%22).center()%2C%0A%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20gap%3D0.5%2C%0A%20%20%20%20)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20Bring%20your%20own%20Jev%0A%0A%20%20%20%20Two%20ways%20to%20build%20one%2C%20live%3A%0A%0A%20%20%20%201.%20**Any%20LLM%20%E2%86%92%20Jev**%3A%20structured%20output%20%2B%20logprobs%2C%20through%20OpenRouter%0A%20%20%20%20%20%20%20%20-%20Caveat%3A%20not%20every%20model%20exposes%20logprobs%20today%2C%20**especially%20closed%20models**%0A%20%20%20%202.%20**A%20tiny%20local%20model%2C%20fully%20offline**%3A%20read%20the%20answer%20straight%20off%20the%20logits%20of%20a%20small%20Qwen%0A%0A%20%20%20%20Then%20we%20throw%20some%20questions%20at%20them%20and%20see%20how%20they%20do.%0A%0A%20%20%20%20**Demo%20time.**%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20What's%20next%3A%20beyond%20decisions%0A%0A%20%20%20%20Jev%201.14%20(Oct%2014%2C%202026)%20points%20at%20where%20this%20is%20going%3A%0A%0A%20%20%20%20-%20**New%20answer%20types**%3A%20%60Box%60%20*%22returns%20a%20single%20bounding%20box%22*%2C%20their%20*%22first%20type%20that's%20not%20purely%20meant%20for%20smart-if%20statements%22*%0A%20%20%20%20-%20**Beyond%20text**%3A%20images%20as%20state%2C%20but%20*%22all%20models%20(Jev%20included)%20perform%20worse%20on%20multimodality%20over%20pure%20text%22*%0A%20%20%20%20-%20**Longer%20context**%3A%20*%22we%20strongly%20recommend%20limiting%20context%20length%2C%20you%20no%20longer%20have%20to%22*%0A%0A%20%20%20%20All%20three%20ship%20behind%20opt-in%20%60TypeSafe-Danger-Zone-*%60%20headers.%0A%0A%20%20%20%20%3Csmall%3ESource%3A%20%5BJev%3A%20For%20the%20builders%20AND%20dreamers%5D(https%3A%2F%2Ftypesafe.ai%2Fblog%2Fjev-1-14)%2C%20TypeSafe%2C%20Oct%2014%2C%202026%3C%2Fsmall%3E%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0Aif%20__name__%20%3D%3D%20%22__main__%22%3A%0A%20%20%20%20app.run()%0A
bf9e55e31edfa9e0ab728b10b12864b9