<?xml version="1.0" encoding="UTF-8"?><rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>DEV.to - Trending Guides</title><link>https://dev.to</link><atom:link href="http://rss.144-124-237-35.sslip.io/dev.to/guides" rel="self" type="application/rss+xml"></atom:link><description>Trending guides and resources from DEV.to - Powered by AtomRSS</description><generator>AtomRSS</generator><webMaster>contact@atomgroup.dev (AtomRSS)</webMaster><language>en-us</language><lastBuildDate>Sun, 18 Oct 2026 17:06:33 GMT</lastBuildDate><ttl>5</ttl><item><title>Gemini 4 Argon vs Opus 5.5 vs GPT-6 Astra: Same Prompt, Real Bills</title><description>&lt;p&gt;&lt;strong&gt;Gemini 4 Argon&lt;/strong&gt;, Google&#39;s new frontier model (generally available October 13, 2026), built a 3D car in Blender from &lt;strong&gt;one picture&lt;/strong&gt;, by itself. Then I gave Argon, &lt;strong&gt;Claude Opus 5.5&lt;/strong&gt; and &lt;strong&gt;GPT-6 Astra&lt;/strong&gt; the exact same prompts: a Lamborghini in pure code, a one-shot 3D kart game, an animated SVG and 82 labelled questions. Argon made the best-looking cars and was the fastest and &lt;strong&gt;2.3x cheaper&lt;/strong&gt; on the kart game; the Blender job cost &lt;strong&gt;$22.13&lt;/strong&gt;. This is the written companion to my video, with every number and the two settings that make Argon work in opencode.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src=&quot;https://www.youtube.com/embed/5t07FpWZAVg&quot; width=&quot;710&quot; height=&quot;399&quot; style=&quot;width: 100%; height: auto; aspect-ratio: 16 / 9;&quot; allowfullscreen=&quot;&quot; loading=&quot;lazy&quot; referrerpolicy=&quot;no-referrer&quot;&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhnzrlkw5ewb8l7wjts7b.webp&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhnzrlkw5ewb8l7wjts7b.webp&quot; alt=&quot;Three AI-built Lamborghini-style cars side by side: Gemini 4 Argon, Claude Opus 5.5 and GPT-6 Astra, same prompt&quot; loading=&quot;lazy&quot; width=&quot;800&quot; height=&quot;450&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;key-facts-quick-answer&quot; href=&quot;https://dev.to/akartit/gemini-4-argon-vs-opus-55-vs-gpt-6-astra-same-prompt-real-bills-1dd9#key-facts-quick-answer&quot;&gt;
  &lt;/a&gt;
  Key facts (quick answer)
&lt;/h2&gt;

&lt;div class=&quot;table-wrapper-paragraph&quot;&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Fact&lt;/th&gt;
&lt;th&gt;Measured result&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Image to 3D car in Blender&lt;/td&gt;
&lt;td&gt;Argon: 43 objects, working lights, turntable rig, 240 frames; &lt;strong&gt;$22.13&lt;/strong&gt; on my API key&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Same Lamborghini prompt, 3 agents&lt;/td&gt;
&lt;td&gt;Argon (opencode) &lt;strong&gt;2,540 lines&lt;/strong&gt;; Opus 5.5 (Claude Code) 1,166 lines in 14 min 39 s; Astra (Codex) 193 lines in 9 min 17 s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;One-shot 3D kart game (OpenRouter)&lt;/td&gt;
&lt;td&gt;Argon &lt;strong&gt;220.6 s, $0.306&lt;/strong&gt;, works; Astra 323.4 s, $0.704, 10/10; Opus cut off at 32,000 tokens&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;82 labelled questions&lt;/td&gt;
&lt;td&gt;Argon 82/82, Astra 82/82, Opus 81/82 (1 format miss)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Price&lt;/td&gt;
&lt;td&gt;$2 in / $10 out per 1M tokens until Nov 30, 2026, then $4 / $20&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Context&lt;/td&gt;
&lt;td&gt;1,048,576 tokens; text, image, video, audio, PDF in; text out&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  &lt;a name=&quot;tldr&quot; href=&quot;https://dev.to/akartit/gemini-4-argon-vs-opus-55-vs-gpt-6-astra-same-prompt-real-bills-1dd9#tldr&quot;&gt;
  &lt;/a&gt;
  TL;DR
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Argon turned &lt;strong&gt;one reference sheet into a 43-object 3D car&lt;/strong&gt; in Blender, with lights and a turntable rig.&lt;/li&gt;
&lt;li&gt;That Blender session cost &lt;strong&gt;$22.13&lt;/strong&gt;: 10,203,143 input tokens, only about 4% from cache.&lt;/li&gt;
&lt;li&gt;On the &lt;strong&gt;Lamborghini test&lt;/strong&gt;, Argon wrote &lt;strong&gt;2,540 lines&lt;/strong&gt; for one car; my pick for car design, weakest on driving feel.&lt;/li&gt;
&lt;li&gt;One-shot kart game: Argon &lt;strong&gt;220.6 s and $0.306&lt;/strong&gt;, Astra 323.4 s and $0.704 (10/10), Opus cut off.&lt;/li&gt;
&lt;li&gt;In opencode, set &lt;strong&gt;headerTimeout 1800000&lt;/strong&gt; and &lt;strong&gt;OPENCODE_EXPERIMENTAL_OUTPUT_TOKEN_MAX=65536&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;On 82 one-word questions Argon and Astra scored 82/82; Argon was the slowest (3.355 s median).&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  &lt;a name=&quot;how-did-gemini-4-argon-build-a-3d-car-in-blender&quot; href=&quot;https://dev.to/akartit/gemini-4-argon-vs-opus-55-vs-gpt-6-astra-same-prompt-real-bills-1dd9#how-did-gemini-4-argon-build-a-3d-car-in-blender&quot;&gt;
  &lt;/a&gt;
  How did Gemini 4 Argon build a 3D car in Blender?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;One image, then Argon did the modelling itself.&lt;/strong&gt; Codex made a single reference sheet of a lime supercar from the front, side, back and top. I gave that one image to Argon running in opencode, connected to Blender through an MCP server.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4l5ynv4cedhix5k6e31f.webp&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4l5ynv4cedhix5k6e31f.webp&quot; alt=&quot;The 4-view reference sheet Codex made for Gemini 4 Argon&quot; loading=&quot;lazy&quot; width=&quot;800&quot; height=&quot;450&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Argon read the picture, built the body, wheels, wing and glass part by part with Python, checked snapshots against the sheet, and ended with &lt;strong&gt;43 objects&lt;/strong&gt;. When I asked for working lights it added headlights and taillights; then a turntable rig and a &lt;strong&gt;240-frame&lt;/strong&gt; camera move, rendered in Blender.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnn3zb1qcjbdmwyyswpll.webp&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnn3zb1qcjbdmwyyswpll.webp&quot; alt=&quot;Gemini 4 Argon&#39;s finished 3D car in Blender, turntable render&quot; loading=&quot;lazy&quot; width=&quot;800&quot; height=&quot;450&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  &lt;a name=&quot;what-did-it-cost&quot; href=&quot;https://dev.to/akartit/gemini-4-argon-vs-opus-55-vs-gpt-6-astra-same-prompt-real-bills-1dd9#what-did-it-cost&quot;&gt;
  &lt;/a&gt;
  What did it cost?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;$22.13 on my Gemini API key&lt;/strong&gt;, counted by opencode: 61 steps, &lt;strong&gt;10,203,143 input tokens&lt;/strong&gt;, 126,819 output tokens, 41,620 reasoning tokens and 419,360 tokens read from cache (about 4%). Every step resent the whole conversation, images included. Keep agent sessions short and keep the start of the prompt the same so implicit caching can help (Google applies it to shared prefixes of 6,144 tokens or more).&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;the-lamborghini-test-three-coding-agents-one-prompt&quot; href=&quot;https://dev.to/akartit/gemini-4-argon-vs-opus-55-vs-gpt-6-astra-same-prompt-real-bills-1dd9#the-lamborghini-test-three-coding-agents-one-prompt&quot;&gt;
  &lt;/a&gt;
  The Lamborghini test: three coding agents, one prompt
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Same prompt, three agents side by side in AnvilTerm:&lt;/strong&gt; Argon in opencode, Opus 5.5 in Claude Code, Astra in Codex. The prompt: a detailed 3D Lamborghini-style supercar made entirely in three.js code (no model files) driving down an endless neon highway, with a chase camera, speedometer, turbo with exhaust flames, 6 paint colours and an orbit mode.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frvybzijfmjljq1168m2f.webp&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frvybzijfmjljq1168m2f.webp&quot; alt=&quot;The Lamborghini test: Gemini 4 Argon, Claude Opus 5.5 and GPT-6 Astra cars with times and line counts&quot; loading=&quot;lazy&quot; width=&quot;800&quot; height=&quot;450&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class=&quot;table-wrapper-paragraph&quot;&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Agent&lt;/th&gt;
&lt;th&gt;Time&lt;/th&gt;
&lt;th&gt;Lines&lt;/th&gt;
&lt;th&gt;Billing&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;GPT-6 Astra (Codex)&lt;/td&gt;
&lt;td&gt;9 min 17 s&lt;/td&gt;
&lt;td&gt;193&lt;/td&gt;
&lt;td&gt;subscription (about $3.30 at OpenRouter list prices)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Claude Opus 5.5 (Claude Code)&lt;/td&gt;
&lt;td&gt;14 min 39 s&lt;/td&gt;
&lt;td&gt;1,166&lt;/td&gt;
&lt;td&gt;subscription (about $14.14 at list prices)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gemini 4 Argon (opencode)&lt;/td&gt;
&lt;td&gt;first file in about 7 min, then 17 min of self-testing&lt;/td&gt;
&lt;td&gt;2,540&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;$2.45&lt;/strong&gt; charged on my API key&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;My pick for car design is Argon: the wedge, the Y-shaped lights and the wing. Its driving feel is where it is weakest.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;two-opencode-settings-for-gemini-4-argon&quot; href=&quot;https://dev.to/akartit/gemini-4-argon-vs-opus-55-vs-gpt-6-astra-same-prompt-real-bills-1dd9#two-opencode-settings-for-gemini-4-argon&quot;&gt;
  &lt;/a&gt;
  Two opencode settings for Gemini 4 Argon
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Argon did not work in opencode on the first try, and both fixes are one line.&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Argon can think for more than 5 minutes before its first token, and opencode gave up with &lt;code&gt;ProviderHeaderTimeoutError&lt;/code&gt;. In &lt;code&gt;~/.config/opencode/opencode.json&lt;/code&gt;: &lt;code&gt;&quot;provider&quot;: {&quot;google&quot;: {&quot;options&quot;: {&quot;headerTimeout&quot;: 1800000, &quot;chunkTimeout&quot;: 1800000}}}&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;opencode (1.19.0) caps every reply at &lt;code&gt;min(model limit, 32000)&lt;/code&gt; output tokens. Argon writes the whole file in one reply, so three runs ended with &lt;code&gt;finish: length&lt;/code&gt; at exactly 32,000 tokens and the file was silently dropped. Start it with &lt;code&gt;OPENCODE_EXPERIMENTAL_OUTPUT_TOKEN_MAX=65536 opencode -m google/gemini-4-argon&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyczeanybnp4jomsvel2n.webp&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyczeanybnp4jomsvel2n.webp&quot; alt=&quot;The two opencode settings for Gemini 4 Argon: header timeout and output token cap&quot; loading=&quot;lazy&quot; width=&quot;800&quot; height=&quot;450&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With both settings the next run wrote the 2,540-line car.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update for opencode v2:&lt;/strong&gt; in opencode v2 (I checked the 2.0.28 code) the reply limit is the model&#39;s own &lt;code&gt;limit.output&lt;/code&gt; (capped at 256,000) instead of a fixed 32,000, so the environment variable is no longer needed: set &lt;code&gt;&quot;gemini-4-argon&quot;: {&quot;limit&quot;: {&quot;output&quot;: 65536}}&lt;/code&gt; under &lt;code&gt;provider.google.models&lt;/code&gt; in &lt;code&gt;opencode.json&lt;/code&gt;. Google&#39;s default output limit for Argon is 65,536.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;gemini-4-argon-vs-opus-55-vs-gpt6-astra-on-a-oneshot-kart-game&quot; href=&quot;https://dev.to/akartit/gemini-4-argon-vs-opus-55-vs-gpt-6-astra-same-prompt-real-bills-1dd9#gemini-4-argon-vs-opus-55-vs-gpt6-astra-on-a-oneshot-kart-game&quot;&gt;
  &lt;/a&gt;
  Gemini 4 Argon vs Opus 5.5 vs GPT-6 Astra on a one-shot kart game
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Argon was the fastest and cheapest; Astra was the most complete.&lt;/strong&gt; One API call each through OpenRouter, reasoning on, max 32,000 tokens, cost from OpenRouter&#39;s own &lt;code&gt;usage.cost&lt;/code&gt;.&lt;/p&gt;

&lt;div class=&quot;table-wrapper-paragraph&quot;&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Seconds&lt;/th&gt;
&lt;th&gt;Cost&lt;/th&gt;
&lt;th&gt;Result&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Gemini 4 Argon&lt;/td&gt;
&lt;td&gt;220.6&lt;/td&gt;
&lt;td&gt;$0.306&lt;/td&gt;
&lt;td&gt;works, 9.5/10&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GPT-6 Astra&lt;/td&gt;
&lt;td&gt;323.4&lt;/td&gt;
&lt;td&gt;$0.704&lt;/td&gt;
&lt;td&gt;10/10&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Claude Opus 5.5&lt;/td&gt;
&lt;td&gt;307.6&lt;/td&gt;
&lt;td&gt;$0.641&lt;/td&gt;
&lt;td&gt;cut off at 32,000 tokens (20,770 of them reasoning)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftnnur1wt5ldvtgf43smp.webp&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftnnur1wt5ldvtgf43smp.webp&quot; alt=&quot;One-shot 3D kart game by Gemini 4 Argon, GPT-6 Astra and Claude Opus 5.5&quot; loading=&quot;lazy&quot; width=&quot;800&quot; height=&quot;450&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For long one-shot code with Opus, give it a smaller thinking budget so the answer fits.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;which-model-drew-the-best-lamborghini-svg&quot; href=&quot;https://dev.to/akartit/gemini-4-argon-vs-opus-55-vs-gpt-6-astra-same-prompt-real-bills-1dd9#which-model-drew-the-best-lamborghini-svg&quot;&gt;
  &lt;/a&gt;
  Which model drew the best Lamborghini SVG?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Argon, at high thinking.&lt;/strong&gt; Opus drew a clean retro wedge and Astra a tidy sports coupe; Argon&#39;s drawing had the sharp cut lines and a blue exhaust flame (263.7 s, 16,271 output tokens).&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdz9190edo5h0nke4ad3m.webp&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdz9190edo5h0nke4ad3m.webp&quot; alt=&quot;Animated Lamborghini SVGs by Claude Opus 5.5, GPT-6 Astra and Gemini 4 Argon&quot; loading=&quot;lazy&quot; width=&quot;800&quot; height=&quot;450&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;how-accurate-is-gemini-4-argon-on-simple-decisions&quot; href=&quot;https://dev.to/akartit/gemini-4-argon-vs-opus-55-vs-gpt-6-astra-same-prompt-real-bills-1dd9#how-accurate-is-gemini-4-argon-on-simple-decisions&quot;&gt;
  &lt;/a&gt;
  How accurate is Gemini 4 Argon on simple decisions?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;82 out of 82.&lt;/strong&gt; 82 labelled questions, one exact word expected, same harness as my decision-model video.&lt;/p&gt;

&lt;div class=&quot;table-wrapper-paragraph&quot;&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Correct&lt;/th&gt;
&lt;th&gt;Median time&lt;/th&gt;
&lt;th&gt;Cost for 82&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Gemini 4 Argon&lt;/td&gt;
&lt;td&gt;82/82&lt;/td&gt;
&lt;td&gt;3.355 s&lt;/td&gt;
&lt;td&gt;$0.220&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GPT-6 Astra&lt;/td&gt;
&lt;td&gt;82/82&lt;/td&gt;
&lt;td&gt;1.701 s&lt;/td&gt;
&lt;td&gt;$0.105&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Claude Opus 5.5&lt;/td&gt;
&lt;td&gt;81/82&lt;/td&gt;
&lt;td&gt;2.410 s&lt;/td&gt;
&lt;td&gt;$0.069&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Opus&#39;s one miss was format, not logic: it explained the answer before giving it.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;what-does-googles-own-table-say&quot; href=&quot;https://dev.to/akartit/gemini-4-argon-vs-opus-55-vs-gpt-6-astra-same-prompt-real-bills-1dd9#what-does-googles-own-table-say&quot;&gt;
  &lt;/a&gt;
  What does Google&#39;s own table say?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Google reports Argon ahead on agentic coding and long context, not everywhere.&lt;/strong&gt; These are vendor-reported numbers from Google&#39;s launch page.&lt;/p&gt;

&lt;div class=&quot;table-wrapper-paragraph&quot;&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Benchmark (Google)&lt;/th&gt;
&lt;th&gt;Argon&lt;/th&gt;
&lt;th&gt;Opus 5.5&lt;/th&gt;
&lt;th&gt;Astra&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;DeepSWE v1.1&lt;/td&gt;
&lt;td&gt;77.9%&lt;/td&gt;
&lt;td&gt;74.2%&lt;/td&gt;
&lt;td&gt;74.1%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GraphWalks 256k-1M&lt;/td&gt;
&lt;td&gt;84.2%&lt;/td&gt;
&lt;td&gt;66.8%&lt;/td&gt;
&lt;td&gt;71.8%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Terminal-bench 4.0&lt;/td&gt;
&lt;td&gt;57.4%&lt;/td&gt;
&lt;td&gt;66.4%&lt;/td&gt;
&lt;td&gt;58.2%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;FrontierSWE v2&lt;/td&gt;
&lt;td&gt;55.0%&lt;/td&gt;
&lt;td&gt;62.3%&lt;/td&gt;
&lt;td&gt;65.5%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  &lt;a name=&quot;caveats&quot; href=&quot;https://dev.to/akartit/gemini-4-argon-vs-opus-55-vs-gpt-6-astra-same-prompt-real-bills-1dd9#caveats&quot;&gt;
  &lt;/a&gt;
  Caveats
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The three agents ran in different tools (opencode, Claude Code, Codex) with each tool&#39;s own system prompt, so the Lamborghini test compares agent setups, not bare models.&lt;/li&gt;
&lt;li&gt;Claude Code and Codex ran on subscriptions; their dollar figures are the same tokens at OpenRouter list prices. Argon&#39;s costs are what my API key was charged.&lt;/li&gt;
&lt;li&gt;Argon needed 6 fresh opencode sessions before a file landed: 2 hit the timeout and 3 hit the 32,000-token cap described above.&lt;/li&gt;
&lt;li&gt;One run each per test; model outputs vary from run to run.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  &lt;a name=&quot;my-take&quot; href=&quot;https://dev.to/akartit/gemini-4-argon-vs-opus-55-vs-gpt-6-astra-same-prompt-real-bills-1dd9#my-take&quot;&gt;
  &lt;/a&gt;
  My take
&lt;/h2&gt;

&lt;p&gt;For anything visual (3D scenes, Blender, drawings) Argon gave me the best-looking results, and it was the fastest on the one-shot game. For a complete, polished app in one reply, Astra was the most reliable. Opus in Claude Code was the one that just worked with no settings. If you run Argon as an agent, watch the bill: the same session that made the Blender car resent ten million tokens.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;sources&quot; href=&quot;https://dev.to/akartit/gemini-4-argon-vs-opus-55-vs-gpt-6-astra-same-prompt-real-bills-1dd9#sources&quot;&gt;
  &lt;/a&gt;
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Google, &quot;Gemini 4 Argon: Built to solve your hardest problems&quot;, October 13, 2026 (benchmark table, vendor-reported)&lt;/li&gt;
&lt;li&gt;Gemini API model page and pricing page for &lt;code&gt;gemini-4-argon&lt;/code&gt; (read October 13, 2026)&lt;/li&gt;
&lt;li&gt;My logs: opencode session database, Claude Code and Codex session files, OpenRouter &lt;code&gt;usage.cost&lt;/code&gt; for every benchmark call&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Originally published on &lt;a href=&quot;https://www.kartit.net/blog/gemini-4-argon-review&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;kartit.net&lt;/a&gt;. Independent review by Anass Kartit. Not affiliated with Google, Anthropic or OpenAI.&lt;/em&gt;&lt;/p&gt;


            </description><link>https://dev.to/akartit/gemini-4-argon-vs-opus-55-vs-gpt-6-astra-same-prompt-real-bills-1dd9</link><guid isPermaLink="false">https://dev.to/akartit/gemini-4-argon-vs-opus-55-vs-gpt-6-astra-same-prompt-real-bills-1dd9</guid><pubDate>Wed, 14 Oct 2026 07:56:35 GMT</pubDate><author>akartit</author><enclosure url="https://media2.dev.to/dynamic/image/width=1000,height=420,fit=cover,gravity=auto/https%3A%2F%2Fwww.kartit.net%2Fimages%2Fblog%2Fgemini-4-argon%2Fhero.webp" type="image/jpeg"></enclosure><category>ai</category><category>gemini</category><category>programming</category><category>blender</category></item><item><title>¿Qué es REA (Reverse Engineer Anything)? El servidor MCP que alcanzó 115.000 estrellas en GitHub ...</title><description>&lt;h1&gt;
  &lt;a name=&quot;qu%C3%A9-es-rea-reverse-engineer-anything-el-servidor-mcp-que-alcanz%C3%B3-115000-estrellas-en-github-en-una-semana&quot; href=&quot;https://dev.to/roobia/que-es-rea-reverse-engineer-anything-el-servidor-mcp-que-alcanzo-115000-estrellas-en-github-en-4311#qu%C3%A9-es-rea-reverse-engineer-anything-el-servidor-mcp-que-alcanz%C3%B3-115000-estrellas-en-github-en-una-semana&quot;&gt;
  &lt;/a&gt;
  ¿Qué es REA (Reverse Engineer Anything)? El servidor MCP que alcanzó 115.000 estrellas en GitHub en una semana
&lt;/h1&gt;

&lt;p&gt;REA, abreviatura de Reverse Engineer Anything, es un servidor MCP y una CLI de código abierto que proporcionan a un agente de programación las herramientas para desmontar software sin su código fuente. Apunta a Claude Code, Codex, Cursor u otro agente hacia un binario nativo, una aplicación Electron, un ensamblado .NET, un APK de Android, un sitio web o una captura de red guardada, pregunta cómo funciona una función y REA devuelve pseudocódigo, gráficos de módulos, registros de solicitudes y la evidencia detrás de cada afirmación. Después, el agente explica el comportamiento o lo reconstruye.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://apidog.com/?utm_source=dev.to&amp;amp;utm_medium=wanda&amp;amp;utm_content=n8n-post-automation&quot; class=&quot;crayons-btn crayons-btn--primary&quot; role=&quot;button&quot;&gt;Prueba Apidog hoy&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;El &lt;a href=&quot;https://github.com/morluto/rea&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;repositorio morluto/rea&lt;/a&gt; se creó en abril de 2026 y permaneció casi inadvertido hasta la primera semana de octubre. El 12 de octubre ya había superado las 115.000 estrellas y los 25.000 forks, una de las subidas más rápidas que GitHub ha visto. Esta guía cubre qué hace REA, cómo instalarlo, dónde es fuerte, dónde el bombo supera la realidad y la parte que la mayoría de la cobertura omite: REA lee capturas HAR y mitmproxy, lo que lo convierte en un front end para la ingeniería inversa de APIs que puedes terminar en &lt;a href=&quot;https://apidog.com/?utm_source=dev.to&amp;amp;utm_medium=wanda&amp;amp;utm_content=n8n-post-automation&quot;&gt;Apidog&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;los-n%C3%BAmeros-detr%C3%A1s-del-bombo&quot; href=&quot;https://dev.to/roobia/que-es-rea-reverse-engineer-anything-el-servidor-mcp-que-alcanzo-115000-estrellas-en-github-en-4311#los-n%C3%BAmeros-detr%C3%A1s-del-bombo&quot;&gt;
  &lt;/a&gt;
  Los números detrás del bombo
&lt;/h2&gt;

&lt;p&gt;El seguimiento diario de Trendshift muestra la forma del pico. REA apareció por primera vez en la lista de tendencias el 4 de octubre con unas 1.400 estrellas nuevas en un día. Después creció de forma compuesta durante una semana.&lt;/p&gt;

&lt;div class=&quot;table-wrapper-paragraph&quot;&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Fecha&lt;/th&gt;
&lt;th&gt;Nuevas estrellas ese día&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;4 oct.&lt;/td&gt;
&lt;td&gt;1.373&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;7 oct.&lt;/td&gt;
&lt;td&gt;5.602&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;9 oct.&lt;/td&gt;
&lt;td&gt;19.375&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10 oct.&lt;/td&gt;
&lt;td&gt;26.572&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;11 oct.&lt;/td&gt;
&lt;td&gt;31.255&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;El repositorio mantuvo el primer puesto en GitHub Trending durante cinco de los siete días del 6 al 12 de octubre. Las versiones siguieron el mismo ritmo: la 3.2 llegó el 3 de octubre, la 4.0 el 5, la 5.0 el 7, la 6.0 el 8 y de la 6.1 a la 6.4 entre el 9 y el 11 de octubre. Ese ritmo importa para quien lo adopta, y volveremos a ello.&lt;/p&gt;

&lt;p&gt;Ningún tuit ni publicación de lanzamiento explica el salto por sí solo. El argumento hizo el trabajo: “Ve una función que te gusta. Entiende cómo funciona, hasta el nivel del binario”. Los vídeos de agentes reconstruyendo aplicaciones de escritorio desde sus binarios se difundieron rápido, junto con las afirmaciones habituales de que el software está acabado. La lectura más útil es más estrecha. REA es un conector bien empaquetado entre agentes y herramientas de ingeniería inversa que ya existían.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;qu%C3%A9-hace-rea&quot; href=&quot;https://dev.to/roobia/que-es-rea-reverse-engineer-anything-el-servidor-mcp-que-alcanzo-115000-estrellas-en-github-en-4311#qu%C3%A9-hace-rea&quot;&gt;
  &lt;/a&gt;
  Qué hace REA
&lt;/h2&gt;

&lt;p&gt;REA se ejecuta como un servidor MCP local. Tu agente llama a sus herramientas, REA inspecciona el objetivo con el motor adecuado y el agente recibe hallazgos estructurados junto con sus limitaciones e incógnitas. Los mismos flujos de trabajo están disponibles como comandos CLI, así puedes automatizarlos sin ningún agente.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhlyq05f1kgsgm0p804l4.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhlyq05f1kgsgm0p804l4.png&quot; alt=&quot;REA&quot; loading=&quot;lazy&quot; width=&quot;799&quot; height=&quot;455&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Lo que analiza, según la tabla de objetivos del README:&lt;/p&gt;

&lt;div class=&quot;table-wrapper-paragraph&quot;&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Objetivo&lt;/th&gt;
&lt;th&gt;Qué devuelve REA&lt;/th&gt;
&lt;th&gt;Necesita&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Binarios nativos&lt;/td&gt;
&lt;td&gt;Pseudocódigo, ensamblador, cadenas, símbolos, referencias cruzadas&lt;/td&gt;
&lt;td&gt;Hopper, Ghidra o IDA&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Binarios Go&lt;/td&gt;
&lt;td&gt;Versión del compilador, módulos, ajustes de compilación&lt;/td&gt;
&lt;td&gt;Nada adicional&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Aplicaciones JavaScript y Electron&lt;/td&gt;
&lt;td&gt;Módulos, importaciones, source maps, rutas, límites IPC&lt;/td&gt;
&lt;td&gt;Solo Node.js&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sitios web&lt;/td&gt;
&lt;td&gt;Estructura de la página, scripts, observaciones de red, capturas de pantalla&lt;/td&gt;
&lt;td&gt;Un navegador de la familia Chrome&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Capturas de red guardadas&lt;/td&gt;
&lt;td&gt;Solicitudes, respuestas, payloads, ubicaciones de origen&lt;/td&gt;
&lt;td&gt;HAR; mitmdump en Linux para mitmproxy&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ensamblados .NET&lt;/td&gt;
&lt;td&gt;Metadatos, CIL, dependencias nativas&lt;/td&gt;
&lt;td&gt;Nada adicional&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;APKs y dispositivos Android&lt;/td&gt;
&lt;td&gt;Manifiesto, métodos descompilados, registros, capturas de pantalla&lt;/td&gt;
&lt;td&gt;JADX más un JDK; adb&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Firmware&lt;/td&gt;
&lt;td&gt;Regiones, resultados de extracción&lt;/td&gt;
&lt;td&gt;Binwalk o Unblob en Linux&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Bytecode WASM y EVM&lt;/td&gt;
&lt;td&gt;Secciones, importaciones y exportaciones, selectores de dispatch&lt;/td&gt;
&lt;td&gt;WABT; Linux x64&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;La decisión de diseño que distingue a REA de un envoltorio delgado es el modelo de evidencia. Cada resultado lleva su procedencia: resúmenes de archivos, rangos de bytes, punteros JSON hacia la captura y una lista explícita de lo que el análisis no pudo establecer. El proyecto lo repite en su documentación. El análisis se ejecuta en tu máquina, pero el FAQ del README es directo: el proveedor del modelo del agente sigue recibiendo los resultados de las herramientas según su propia política de datos.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;c%C3%B3mo-instalar-rea&quot; href=&quot;https://dev.to/roobia/que-es-rea-reverse-engineer-anything-el-servidor-mcp-que-alcanzo-115000-estrellas-en-github-en-4311#c%C3%B3mo-instalar-rea&quot;&gt;
  &lt;/a&gt;
  Cómo instalar REA
&lt;/h2&gt;

&lt;p&gt;Necesitas Node.js 22.19 o posterior (23 y 25 no son compatibles) y npm. Un comando registra el servidor MCP e instala las instrucciones de skill correspondientes para tu agente:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight shell&quot;&gt;&lt;code&gt;npx rea-agents setup
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;La configuración muestra un plan, hace una copia de seguridad de la configuración existente y solo escribe después de tu aprobación. Según la &lt;a href=&quot;https://github.com/morluto/rea/blob/main/docs/installation.md&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;guía de instalación&lt;/a&gt;, es compatible con Claude Code, Claude Desktop, Codex, Cursor, Gemini CLI, Windsurf, Devin, OpenCode, Antigravity, GitHub Copilot CLI, VS Code, Grok Build, Hermes y más, seleccionables con un marcador &lt;code&gt;--client&lt;/code&gt;. Reinicia el agente después y pregúntale algo como:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;Understand how search works in the Notes app, show me the evidence,
and build a similar feature for my project.
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Para una CLI global:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight shell&quot;&gt;&lt;code&gt;npm &lt;span class=&quot;nb&quot;&gt;install&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;--global&lt;/span&gt; rea-agents
rea doctor &lt;span class=&quot;nt&quot;&gt;--json&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;El análisis de JavaScript estático, .NET, sitios web y capturas funciona sin ningún motor adicional. El análisis nativo profundo necesita Hopper, Ghidra 12.1 con JDK 21 o superior, o IDA. La configuración puede instalar Hopper con tu aprobación, pero Hopper es un software comercial independiente con su propia licencia. Ghidra en Windows está marcado como experimental.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;en-qu%C3%A9-es-bueno-seg%C3%BAn-los-ejemplos-destacados&quot; href=&quot;https://dev.to/roobia/que-es-rea-reverse-engineer-anything-el-servidor-mcp-que-alcanzo-115000-estrellas-en-github-en-4311#en-qu%C3%A9-es-bueno-seg%C3%BAn-los-ejemplos-destacados&quot;&gt;
  &lt;/a&gt;
  En qué es bueno, según los ejemplos destacados
&lt;/h2&gt;

&lt;p&gt;Los casos de estudio del propio proyecto son el punto de referencia más honesto. En el estudio de DX-Boll, el agente siguió una llamada de sonido hasta su helper de posición a panorámica, convirtió pseudocódigo incompleto en C y la reconstrucción superó los 3.205 casos de prueba x86 originales mientras reproducía los 63 bytes de la función compilada. En el estudio de Notion, rastreó la API del portapapeles desde el renderer, a través de preload e IPC, hasta el proceso principal de Electron. Un tercero recuperó un cálculo de ángulo de anillo de balas a partir de instrucciones de 16 bits de un juego para PC-98 de los años noventa.&lt;/p&gt;

&lt;p&gt;Observa el patrón. Son preguntas con un alcance estrecho sobre una función o una ruta de datos, con una forma de verificar la respuesta. Ahí funciona hoy la ingeniería inversa dirigida por agentes. Las demostraciones de “reconstruye esta aplicación completa” lucen bien en vídeo y producen algo parecido al objetivo, pero una reseña temprana que comparó REA con un agente básico en una aplicación Mac sencilla encontró una diferencia pequeña y una ejecución más lenta con REA. El valor aparece cuando la pregunta es específica y el objetivo es complejo.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;rea-para-trabajo-con-apis-de-la-captura-a-una-especificaci%C3%B3n-probada&quot; href=&quot;https://dev.to/roobia/que-es-rea-reverse-engineer-anything-el-servidor-mcp-que-alcanzo-115000-estrellas-en-github-en-4311#rea-para-trabajo-con-apis-de-la-captura-a-una-especificaci%C3%B3n-probada&quot;&gt;
  &lt;/a&gt;
  REA para trabajo con APIs: de la captura a una especificación probada
&lt;/h2&gt;

&lt;p&gt;Aquí está la parte relevante para cualquiera que construya contra APIs. La herramienta &lt;code&gt;inspect_web_network_capture&lt;/code&gt; de REA lee un archivo HAR (o una captura nativa de mitmproxy en Linux) sin conexión. Nunca vuelve a solicitar las URLs grabadas. Valida cada entrada, conserva los cuerpos de solicitud y respuesta con sus resúmenes criptográficos y excluye estructuralmente de la evidencia los encabezados de autorización, las cookies y las credenciales de la URL.&lt;/p&gt;

&lt;p&gt;Luego hace algo que un equipo de APIs reconocerá de inmediato. Pasa la evidencia retenida a &lt;code&gt;inspect_analysis_view&lt;/code&gt; con la vista &lt;code&gt;api-surface&lt;/code&gt; y REA agrupa cada solicitud por método, origen y plantilla de ruta inferida. Los IDs numéricos se convierten en &lt;code&gt;{numeric}&lt;/code&gt;, los UUID en &lt;code&gt;{uuid}&lt;/code&gt;, las cadenas hexadecimales largas en &lt;code&gt;{hex}&lt;/code&gt; y las fechas en &lt;code&gt;{iso-date}&lt;/code&gt;. Cada grupo cita los registros de los que proviene y marca estados o tipos de contenido mixtos. La &lt;a href=&quot;https://github.com/morluto/rea/blob/main/docs/web-network-captures.md&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;guía de capturas&lt;/a&gt; tiene cuidado al decir que la vista no hace afirmaciones sobre esquemas ni manejadores. Es un inventario inferido, no una especificación.&lt;/p&gt;

&lt;p&gt;Ese inventario es exactamente el punto de partida del flujo de nuestra &lt;a href=&quot;https://apidog.com/es/blog/reverse-engineering-apis?utm_source=dev.to&amp;amp;utm_medium=wanda&amp;amp;utm_content=n8n-post-automation&quot;&gt;guía de ingeniería inversa de APIs&lt;/a&gt;, y Apidog lo termina:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Captura una vez.&lt;/strong&gt; En Chrome DevTools, reproduce el flujo y guarda todas las solicitudes como un HAR con contenido. Registra con una cuenta de prueba; un HAR incluye tokens activos.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deja que el agente lo mapee.&lt;/strong&gt; Pide a tu agente que ejecute REA sobre el HAR y resuma la superficie de la API. Obtienes la lista de endpoints, los patrones de ID y qué llamadas devolvieron errores, con punteros de vuelta a los registros originales.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Importa el mismo HAR en Apidog.&lt;/strong&gt; Apidog convierte las solicitudes capturadas en endpoints, con una opción para generar un caso de prueba predeterminado por endpoint y descartar recursos estáticos al importar. Nuestra &lt;a href=&quot;https://apidog.com/es/blog/how-to-import-har-file-apidog?utm_source=dev.to&amp;amp;utm_medium=wanda&amp;amp;utm_content=n8n-post-automation&quot;&gt;guía de importación de HAR&lt;/a&gt; cubre la limpieza.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Promueve las plantillas inferidas a parámetros de ruta reales.&lt;/strong&gt; Los marcadores &lt;code&gt;{numeric}&lt;/code&gt; y &lt;code&gt;{uuid}&lt;/code&gt; de REA te indican qué segmentos parametrizar en las definiciones de endpoints de Apidog.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Simula y prueba.&lt;/strong&gt; Activa el smart mock de Apidog para que tu código cliente pueda ejecutarse contra la API reconstruida antes de tocar la real; luego escribe aserciones sobre las formas de respuesta capturadas y ejecútalas desde la CLI de Apidog en CI.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;La división es limpia. REA es bueno leyendo evidencia y explicándola. Apidog es donde los endpoints se convierten en un contrato documentado, simulado y probado que tu equipo puede compartir. Ninguno hace el trabajo del otro.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;advertencias-antes-de-adoptarlo&quot; href=&quot;https://dev.to/roobia/que-es-rea-reverse-engineer-anything-el-servidor-mcp-que-alcanzo-115000-estrellas-en-github-en-4311#advertencias-antes-de-adoptarlo&quot;&gt;
  &lt;/a&gt;
  Advertencias antes de adoptarlo
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;La velocidad de versiones corta en ambos sentidos.&lt;/strong&gt; Siete versiones menores se publicaron en nueve días, y la política &lt;code&gt;always-bump-minor&lt;/code&gt; del proyecto significa que un aumento menor puede ser disruptivo. La &lt;a href=&quot;https://github.com/morluto/rea/blob/main/docs/migration-6.2.md&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;guía de migración a 6.2&lt;/a&gt; cambió la forma de cada resultado MCP. Si escribes scripts contra la salida JSON de REA, fija una versión y lee el changelog antes de actualizar.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Es un conector, no un sandbox.&lt;/strong&gt; La política de seguridad del proyecto afirma que su puente local de proveedores no es un sandbox y que abrir un binario no confiable ejecuta su análisis con tus permisos de usuario. Analiza objetivos no confiables en un entorno aislado, igual que &lt;a href=&quot;https://apidog.com/es/blog/what-is-cubesandbox-for-ai-agents?utm_source=dev.to&amp;amp;utm_medium=wanda&amp;amp;utm_content=n8n-post-automation&quot;&gt;aislarías las llamadas de herramientas de cualquier agente&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Las limitaciones de plataforma son específicas.&lt;/strong&gt; La decodificación nativa de mitmproxy necesita exactamente mitmdump 12.2.3, en Linux y suministrado por ti. Las rutas de extracción de firmware, EVM y WASM son para Linux x64. Hopper no tiene versión para Windows.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;La responsabilidad legal sigue siendo tuya.&lt;/strong&gt; El README limita REA a investigación, análisis y reconstrucción legales, y dice que tú eres responsable de la autorización. Copiar una función de la competencia sigue siendo la misma cuestión legal que antes de que existiera la herramienta. El proyecto también ha tenido que declarar que no ha emitido ningún token y que las monedas que usan su nombre no están afiliadas.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Está en una etapa temprana.&lt;/strong&gt; Más de 100 colaboradores y más de 170 issues y pull requests abiertos al escribir esto. La documentación es exhaustiva, pero espera asperezas fuera de los caminos destacados.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;preguntas-frecuentes&quot; href=&quot;https://dev.to/roobia/que-es-rea-reverse-engineer-anything-el-servidor-mcp-que-alcanzo-115000-estrellas-en-github-en-4311#preguntas-frecuentes&quot;&gt;
  &lt;/a&gt;
  Preguntas frecuentes
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;¿REA es gratis?&lt;/strong&gt; Sí. El código tiene licencia MIT y el paquete npm es gratuito. Hopper es un producto de pago si lo eliges para análisis nativo; Ghidra es gratis.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;¿REA sube mi aplicación o binario?&lt;/strong&gt; No. El análisis se ejecuta localmente. Los resultados de las herramientas van al modelo que use tu agente, por lo que se aplica la política de datos de ese proveedor.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;¿Necesito Ghidra o IDA para empezar?&lt;/strong&gt; No para análisis de JavaScript, Electron, .NET, sitios web o capturas. Solo la descompilación de binarios nativos necesita un motor.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;¿Puede REA producir una especificación OpenAPI a partir del tráfico?&lt;/strong&gt; No. Su vista api-surface es un inventario inferido con plantillas de ruta. Importa el HAR en Apidog para obtener definiciones editables de endpoints y exporta OpenAPI desde allí. &lt;a href=&quot;https://apidog.com/download?utm_source=dev.to&amp;amp;utm_medium=wanda&amp;amp;utm_content=n8n-post-automation&quot;&gt;Descarga Apidog&lt;/a&gt; para probar la importación con una captura que ya tengas.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;d%C3%B3nde-te-deja-esto&quot; href=&quot;https://dev.to/roobia/que-es-rea-reverse-engineer-anything-el-servidor-mcp-que-alcanzo-115000-estrellas-en-github-en-4311#d%C3%B3nde-te-deja-esto&quot;&gt;
  &lt;/a&gt;
  Dónde te deja esto
&lt;/h2&gt;

&lt;p&gt;REA se ganó sus estrellas al empaquetar motores reales de ingeniería inversa detrás de un servidor MCP y documentar la evidencia que devuelve. Úsalo para preguntas con alcance definido: cómo funciona una función, qué canal IPC transporta un mensaje, qué aspecto tiene el tráfico de una aplicación. Trata las demostraciones de reconstruirlo todo como demostraciones.&lt;/p&gt;

&lt;p&gt;Para los equipos de APIs, la ventaja práctica es la ruta de captura. Deja que el agente lea el HAR con REA, importa el mismo archivo en Apidog y convierte el inventario en endpoints que puedes simular, probar y documentar.&lt;/p&gt;


            </description><link>https://dev.to/roobia/que-es-rea-reverse-engineer-anything-el-servidor-mcp-que-alcanzo-115000-estrellas-en-github-en-4311</link><guid isPermaLink="false">https://dev.to/roobia/que-es-rea-reverse-engineer-anything-el-servidor-mcp-que-alcanzo-115000-estrellas-en-github-en-4311</guid><pubDate>Tue, 13 Oct 2026 03:03:04 GMT</pubDate><author>Roobia</author><enclosure url="https://media2.dev.to/dynamic/image/width=1000,height=420,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fassets.apidog.com%2Fblog-next%2F2026%2F10%2Fheader-32.png" type="image/jpeg"></enclosure><category>agents</category><category>github</category><category>mcp</category><category>opensource</category></item><item><title>REA: Let Your AI Agent Reverse Engineer the App Features You Wish You Had</title><description>&lt;p&gt;You are using an app and notice a feature that just works. Instant offline search. A clever sync behavior. A smooth update flow. You want something similar in your own product, but you have no source code, no docs, and no idea where to start.&lt;/p&gt;

&lt;p&gt;Traditionally, the answer was &quot;learn reverse engineering.&quot; That means picking a disassembler, learning its API, digging through strings and symbols, following call graphs by hand, and copying findings between tools. It is a deep skill, and most application developers never have the time to pick it up.&lt;/p&gt;

&lt;p&gt;REA takes a different approach: it hands that work to your AI coding agent.&lt;/p&gt;

&lt;p&gt;In this post we will cover what REA is, how it works, how to set it up, and whether it is worth your time.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;what-is-rea&quot; href=&quot;https://dev.to/arshtechpro/rea-let-your-ai-agent-reverse-engineer-the-app-features-you-wish-you-had-3en7#what-is-rea&quot;&gt;
  &lt;/a&gt;
  What is REA?
&lt;/h2&gt;

&lt;p&gt;REA is an open-source (MIT) tool, written in TypeScript, that gives AI agents a consistent way to investigate software. It ships as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A CLI&lt;/strong&gt; (&lt;code&gt;rea&lt;/code&gt;) you can run from your terminal&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;An MCP server&lt;/strong&gt; that agents like Claude Code, Cursor, Codex, Gemini CLI, Windsurf, and Claude Desktop can call directly&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The pitch is simple: point your agent at an app, ask how a feature works, and the agent uses REA to inspect the app, explain the feature with evidence, and then build a version adapted to your stack.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fo8qri1jzrdmw14novgbk.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fo8qri1jzrdmw14novgbk.png&quot; alt=&quot;REA running an analysis inside Hopper&quot; loading=&quot;lazy&quot; width=&quot;799&quot; height=&quot;455&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;the-mental-model-decompile-understand-recreate&quot; href=&quot;https://dev.to/arshtechpro/rea-let-your-ai-agent-reverse-engineer-the-app-features-you-wish-you-had-3en7#the-mental-model-decompile-understand-recreate&quot;&gt;
  &lt;/a&gt;
  The mental model: Decompile, Understand, Recreate
&lt;/h2&gt;

&lt;p&gt;REA frames every investigation in three stages:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Decompile&lt;/strong&gt; - open the app and recover readable code, strings, symbol names, and other clues.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Understand&lt;/strong&gt; - follow the code from one part of the app to another until the agent can explain how the feature actually works.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recreate&lt;/strong&gt; - turn what was learned into a feature for your own product, in your language and framework.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;One thing worth stating up front: REA does not claim to recover the original source code, and it does not clone apps. It gives the agent pseudocode, assembly, symbols, strings, and relationships, and it shows the evidence behind every conclusion.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;what-a-real-investigation-looks-like&quot; href=&quot;https://dev.to/arshtechpro/rea-let-your-ai-agent-reverse-engineer-the-app-features-you-wish-you-had-3en7#what-a-real-investigation-looks-like&quot;&gt;
  &lt;/a&gt;
  What a real investigation looks like
&lt;/h2&gt;

&lt;p&gt;Say you ask your agent:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;Reverse engineer the Notes app. Find how offline search works, explain it,
and build a version for my project using TypeScript and SQLite.
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Behind the scenes, the agent works through roughly these steps using REA tools:&lt;/p&gt;

&lt;div class=&quot;table-wrapper-paragraph&quot;&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Step&lt;/th&gt;
&lt;th&gt;What the agent does&lt;/th&gt;
&lt;th&gt;Example REA tools&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;Opens and identifies the binary&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;open_binary&lt;/code&gt;, &lt;code&gt;binary_overview&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Looks for search-related clues&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;search_strings&lt;/code&gt;, &lt;code&gt;search_procedures&lt;/code&gt;, &lt;code&gt;list_names&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;Connects clues to actual code&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;find_xrefs_to_name&lt;/code&gt;, &lt;code&gt;xrefs&lt;/code&gt;, &lt;code&gt;procedure_callers&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;Rebuilds the control flow&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;get_call_graph&lt;/code&gt;, &lt;code&gt;procedure_callees&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;Decompiles the important functions&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;procedure_pseudo_code&lt;/code&gt;, &lt;code&gt;batch_decompile&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;Writes the feature in your project&lt;/td&gt;
&lt;td&gt;Your agent&#39;s normal editing and test tools&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;REA handles steps 1 through 5. Step 6 is your agent doing what it already does well: writing code.&lt;/p&gt;

&lt;p&gt;If you have done any manual reverse engineering, you will recognize this workflow. The difference is that the agent drives it instead of you.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;how-it-works-under-the-hood&quot; href=&quot;https://dev.to/arshtechpro/rea-let-your-ai-agent-reverse-engineer-the-app-features-you-wish-you-had-3en7#how-it-works-under-the-hood&quot;&gt;
  &lt;/a&gt;
  How it works under the hood
&lt;/h2&gt;

&lt;p&gt;REA itself is not a disassembler. It is an orchestration layer that sits between your agent and real analysis tools.&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;Agent / Terminal
      |
      v
  REA (CLI + MCP server)
      |
      +--&amp;gt; Deep analysis providers: Hopper, Ghidra
      +--&amp;gt; Native macOS utilities (Mach-O, code signatures, plists, Swift demangling)
      +--&amp;gt; Artifact provider (ZIP, APK, IPA, ASAR, MSIX inventory)
      +--&amp;gt; Browser provider (passive Chrome DevTools Protocol observation)
      +--&amp;gt; Process capture provider (controlled terminal sessions)
      |
      v
  Evidence records you can export, compare, and reuse
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;A few design choices stand out:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Providers do the heavy lifting.&lt;/strong&gt; Hopper is the main deep-analysis provider, and Ghidra is supported as a read-only, bring-your-own option on Linux (plus an experimental Windows x64 mode).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Everything produces evidence.&lt;/strong&gt; Each successful result is stored as a structured &quot;Evidence v2&quot; record that includes the provider, confidence, and known limitations. You can export these bundles, import them later, and diff them across app versions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unknowns stay unknown.&lt;/strong&gt; REA is strict about not presenting guesses as facts. Static inference and runtime observation are labeled separately, and incomplete data is reported as incomplete.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local by design.&lt;/strong&gt; There is no hosted analysis service. The app you analyze stays on your machine (though your AI model provider still has its own data policy).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Same engine for CLI and MCP.&lt;/strong&gt; Whatever your agent can do, you can also do from the terminal.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  &lt;a name=&quot;what-it-can-analyze-today&quot; href=&quot;https://dev.to/arshtechpro/rea-let-your-ai-agent-reverse-engineer-the-app-features-you-wish-you-had-3en7#what-it-can-analyze-today&quot;&gt;
  &lt;/a&gt;
  What it can analyze today
&lt;/h2&gt;

&lt;p&gt;Native binaries get the deepest support, but REA covers more than that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Native apps&lt;/strong&gt;: Mach-O, ELF, PE, and macOS &lt;code&gt;.app&lt;/code&gt; bundles, including Swift and Objective-C metadata&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Packages and archives&lt;/strong&gt;: ZIP, APK, IPA, ASAR, plus file-level inventory without extraction&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Electron and JavaScript apps&lt;/strong&gt;: static mapping of entry points, modules, IPC channels, preload scripts, and source maps, without executing anything&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Websites&lt;/strong&gt;: passive observation of a browser you already control, over a local Chrome DevTools endpoint&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;.NET (managed PE/CLI)&lt;/strong&gt;: execution-free triage of metadata, members, and native boundaries&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Version diffs&lt;/strong&gt;: compare two releases of an app and get a report of what changed&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  &lt;a name=&quot;getting-started&quot; href=&quot;https://dev.to/arshtechpro/rea-let-your-ai-agent-reverse-engineer-the-app-features-you-wish-you-had-3en7#getting-started&quot;&gt;
  &lt;/a&gt;
  Getting started
&lt;/h2&gt;

&lt;h3&gt;
  &lt;a name=&quot;requirements&quot; href=&quot;https://dev.to/arshtechpro/rea-let-your-ai-agent-reverse-engineer-the-app-features-you-wish-you-had-3en7#requirements&quot;&gt;
  &lt;/a&gt;
  Requirements
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;macOS 12+, or Ubuntu 24.04+, Fedora 41+, or 64-bit Arch Linux (Windows x64 is experimental and Ghidra-only)&lt;/li&gt;
&lt;li&gt;Node.js 22.19+ or 24.11+&lt;/li&gt;
&lt;li&gt;A deep-analysis provider: Hopper (setup can install it, and the free demo mode works) or your own Ghidra 12.1.2 with JDK 21&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  &lt;a name=&quot;install-and-run-setup&quot; href=&quot;https://dev.to/arshtechpro/rea-let-your-ai-agent-reverse-engineer-the-app-features-you-wish-you-had-3en7#install-and-run-setup&quot;&gt;
  &lt;/a&gt;
  Install and run setup
&lt;/h3&gt;

&lt;p&gt;The quickest path:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight shell&quot;&gt;&lt;code&gt;npx &lt;span class=&quot;nt&quot;&gt;--yes&lt;/span&gt; rea-agents@latest setup
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Or install the CLI globally:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight shell&quot;&gt;&lt;code&gt;npm &lt;span class=&quot;nb&quot;&gt;install&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;--global&lt;/span&gt; rea-agents
rea setup
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Setup is careful. It detects which agents you have installed, asks which capabilities you want, shows the exact files it will change, and defaults to &quot;No&quot; before applying anything. Use &lt;code&gt;rea setup --dry-run&lt;/code&gt; if you want to preview the plan first.&lt;/p&gt;

&lt;p&gt;When setup finishes, restart your agent so it picks up the new MCP server.&lt;/p&gt;

&lt;h3&gt;
  &lt;a name=&quot;check-your-environment&quot; href=&quot;https://dev.to/arshtechpro/rea-let-your-ai-agent-reverse-engineer-the-app-features-you-wish-you-had-3en7#check-your-environment&quot;&gt;
  &lt;/a&gt;
  Check your environment
&lt;/h3&gt;



&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight shell&quot;&gt;&lt;code&gt;rea doctor
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;This tells you whether something is missing, misconfigured, or unsupported on your machine.&lt;/p&gt;

&lt;h3&gt;
  &lt;a name=&quot;try-it-from-the-terminal&quot; href=&quot;https://dev.to/arshtechpro/rea-let-your-ai-agent-reverse-engineer-the-app-features-you-wish-you-had-3en7#try-it-from-the-terminal&quot;&gt;
  &lt;/a&gt;
  Try it from the terminal
&lt;/h3&gt;



&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight shell&quot;&gt;&lt;code&gt;rea analyze /Applications/Notes.app
rea search /Applications/Notes.app &lt;span class=&quot;s2&quot;&gt;&quot;offline&quot;&lt;/span&gt;
rea trace /Applications/Notes.app &lt;span class=&quot;s2&quot;&gt;&quot;offline&quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;h3&gt;
  &lt;a name=&quot;or-just-ask-your-agent&quot; href=&quot;https://dev.to/arshtechpro/rea-let-your-ai-agent-reverse-engineer-the-app-features-you-wish-you-had-3en7#or-just-ask-your-agent&quot;&gt;
  &lt;/a&gt;
  Or just ask your agent
&lt;/h3&gt;



&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;Understand how search works in the Notes app, show me the evidence,
and build a similar feature for my project.
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;h3&gt;
  &lt;a name=&quot;manual-mcp-configuration&quot; href=&quot;https://dev.to/arshtechpro/rea-let-your-ai-agent-reverse-engineer-the-app-features-you-wish-you-had-3en7#manual-mcp-configuration&quot;&gt;
  &lt;/a&gt;
  Manual MCP configuration
&lt;/h3&gt;

&lt;p&gt;If your agent supports local MCP servers but is not auto-detected, add this to its config:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight json&quot;&gt;&lt;code&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;mcpServers&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;rea&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;command&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;npx&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;args&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;-y&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;rea-agents@3.1.0&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;mcp&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Pin to the latest published version from &lt;a href=&quot;https://www.npmjs.com/package/rea-agents&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;npm&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;safety-and-permissions&quot; href=&quot;https://dev.to/arshtechpro/rea-let-your-ai-agent-reverse-engineer-the-app-features-you-wish-you-had-3en7#safety-and-permissions&quot;&gt;
  &lt;/a&gt;
  Safety and permissions
&lt;/h2&gt;

&lt;p&gt;Reverse-engineering tools can be risky if they run code you do not trust. REA leans heavily toward caution:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Dynamic features (process capture, browser observation, runtime inspection) are &lt;strong&gt;disabled by default&lt;/strong&gt; and need explicit environment variables plus per-call approval.&lt;/li&gt;
&lt;li&gt;File-based evidence commands only work inside directories you approve, using variables like &lt;code&gt;REA_EVIDENCE_ROOTS_JSON&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Static JavaScript analysis parses code without running it.&lt;/li&gt;
&lt;li&gt;REA never calls &lt;code&gt;sudo&lt;/code&gt;, and it uses authenticated local sockets for provider communication.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The flip side: providers and launched targets still run with your user permissions. REA is not a security sandbox, so do not treat it as one when handling malware.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;is-it-worth-a-try&quot; href=&quot;https://dev.to/arshtechpro/rea-let-your-ai-agent-reverse-engineer-the-app-features-you-wish-you-had-3en7#is-it-worth-a-try&quot;&gt;
  &lt;/a&gt;
  Is it worth a try?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Yes, if:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You are on macOS or Linux and already use an MCP-capable agent like Claude Code or Cursor.&lt;/li&gt;
&lt;li&gt;You want to understand how a feature works in an app you use, especially a native or Electron app.&lt;/li&gt;
&lt;li&gt;You are curious about reverse engineering but never had time to learn Hopper or Ghidra.&lt;/li&gt;
&lt;li&gt;You need to document an undocumented file format, protocol, or interface for interoperability.&lt;/li&gt;
&lt;li&gt;You maintain software and want to diff behavior across versions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Maybe hold off if:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You are on Windows. Support there is experimental and limited.&lt;/li&gt;
&lt;li&gt;You want a quick, zero-config tool. REA has a lot of opt-in switches and environment variables, which is good for safety but takes time to learn.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;A few practical notes:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hopper is separate commercial software. The demo mode works, but has vendor-defined limits.&lt;/li&gt;
&lt;li&gt;Deep investigations can use a lot of agent tokens, so watch your model costs.&lt;/li&gt;
&lt;li&gt;Respect the law and the software license. Reverse engineering for learning and interoperability is common, but some license agreements and jurisdictions restrict it. Recreate ideas and behavior, not copyrighted code or assets.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  &lt;a name=&quot;summary&quot; href=&quot;https://dev.to/arshtechpro/rea-let-your-ai-agent-reverse-engineer-the-app-features-you-wish-you-had-3en7#summary&quot;&gt;
  &lt;/a&gt;
  Summary
&lt;/h2&gt;

&lt;p&gt;REA turns reverse engineering from a specialist skill into something you can delegate to your coding agent. You describe the feature, the agent investigates the app, shows you how it reached its conclusions, and then helps you build your own version.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub: &lt;a href=&quot;https://github.com/morluto/rea&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;github.com/morluto/rea&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;


            </description><link>https://dev.to/arshtechpro/rea-let-your-ai-agent-reverse-engineer-the-app-features-you-wish-you-had-3en7</link><guid isPermaLink="false">https://dev.to/arshtechpro/rea-let-your-ai-agent-reverse-engineer-the-app-features-you-wish-you-had-3en7</guid><pubDate>Thu, 08 Oct 2026 11:28:11 GMT</pubDate><author>ArshTechPro</author><enclosure url="https://media2.dev.to/dynamic/image/width=1000,height=420,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpxk736aeksewdpd1sx73.png" type="image/jpeg"></enclosure><category>reverseengineering</category><category>ai</category><category>mcp</category><category>opensource</category></item><item><title>Getting Started with KytyPS5: A Practical Look at PS5 Emulation on PC</title><description>&lt;p&gt;PS5 emulation is fascinating, but a successful download does not mean every game will run. A title might show a logo, reach its menu, enter gameplay with glitches, or fail to boot at all. If you are curious about the current state of the technology, &lt;strong&gt;KytyPS5&lt;/strong&gt; is an open-source project worth exploring with those distinctions in mind.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;what-is-kytyps5&quot; href=&quot;https://dev.to/qpphello1/getting-started-with-kytyps5-a-practical-look-at-ps5-emulation-on-pc-48cg#what-is-kytyps5&quot;&gt;
  &lt;/a&gt;
  What is KytyPS5?
&lt;/h2&gt;

&lt;p&gt;KytyPS5 is a C++ PlayStation 5 emulator based on a heavily modified version of &lt;a href=&quot;https://github.com/InoriRus/Kyty&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;Kyty&lt;/a&gt;. It has its own PS5-focused development and releases, so it should not be confused with an older Kyty download. The project is available under the GPL-2.0 license, and its source code and releases are on the &lt;a href=&quot;https://github.com/KytyPS5/KytyPS5&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;KytyPS5 GitHub repository&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The desktop launcher gives you a familiar starting point: add a folder containing your game library, find a title in the list, adjust its settings if needed, and launch it. There are controls for keyboard and mouse mapping, graphics options, and settings for individual games. You can also launch supported game content from the command line.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;what-do-you-need-to-try-it&quot; href=&quot;https://dev.to/qpphello1/getting-started-with-kytyps5-a-practical-look-at-ps5-emulation-on-pc-48cg#what-do-you-need-to-try-it&quot;&gt;
  &lt;/a&gt;
  What do you need to try it?
&lt;/h2&gt;

&lt;p&gt;The checked releases provide Windows x64 and Linux x86_64 builds. macOS support is experimental; its available archive is an x86_64 build that can run on Apple Silicon through Rosetta 2, with MoltenVK bundled. The graphics renderer requires a Vulkan 1.3-capable driver. Check the &lt;a href=&quot;https://github.com/KytyPS5/KytyPS5#system-requirements&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;project&#39;s requirements&lt;/a&gt; and the release assets for your platform before downloading, since available builds can change.&lt;/p&gt;

&lt;p&gt;The emulator download does not include games. You need your own legally obtained game content in a supported format. For the graphical launcher, a useful first step is to add the &lt;strong&gt;parent library folder&lt;/strong&gt; rather than the folder for a single game, then refresh the game list. A game directory needs its &lt;code&gt;eboot.bin&lt;/code&gt; at the expected root; the project also supports certain ELF and ZArchive inputs.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;read-compatibility-reports-as-test-results&quot; href=&quot;https://dev.to/qpphello1/getting-started-with-kytyps5-a-practical-look-at-ps5-emulation-on-pc-48cg#read-compatibility-reports-as-test-results&quot;&gt;
  &lt;/a&gt;
  Read compatibility reports as test results
&lt;/h2&gt;

&lt;p&gt;A compatibility label is a starting point, not a promise. “In game” tells you that a tester reached gameplay on a particular build and setup. It does not necessarily mean the game runs at full speed or can be completed without issues.&lt;/p&gt;

&lt;p&gt;When checking a report, look at four details together:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Platform and build:&lt;/strong&gt; A Windows result may not apply to Linux or macOS, and a later build can behave differently.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Game version and settings:&lt;/strong&gt; Some results depend on a particular update or patch.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hardware:&lt;/strong&gt; GPU drivers and device features can affect the result.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The tester&#39;s notes:&lt;/strong&gt; A menu, a few minutes of gameplay, and a full playthrough are very different outcomes.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That context is especially useful when you troubleshoot. If a game behaves differently on your machine, compare your setup with the report before assuming the emulator or the game is universally broken.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;a-guide-for-the-first-run&quot; href=&quot;https://dev.to/qpphello1/getting-started-with-kytyps5-a-practical-look-at-ps5-emulation-on-pc-48cg#a-guide-for-the-first-run&quot;&gt;
  &lt;/a&gt;
  A guide for the first run
&lt;/h2&gt;

&lt;p&gt;I put together an &lt;a href=&quot;https://www.kytyps5emu.com/&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;independent KytyPS5 guide&lt;/a&gt; that brings the practical steps into one place. It links to the original release files and includes platform-specific setup instructions, recorded SHA-256 hashes, first-run guidance, controls, troubleshooting, and searchable game compatibility reports. You can &lt;a href=&quot;https://www.kytyps5emu.com/compatibility/&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;browse the compatibility list&lt;/a&gt; before choosing a title to test.&lt;/p&gt;

&lt;p&gt;The guide is &lt;strong&gt;not the official KytyPS5 project site&lt;/strong&gt;. For source code, release notes, and project issues, go directly to &lt;a href=&quot;https://github.com/KytyPS5/KytyPS5&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;the developers&#39; GitHub repository&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you experiment with KytyPS5, keep track of the build, game version, operating system, GPU, and the point where a game stops or starts working. Those details make your own comparisons more useful and help turn a vague “it doesn&#39;t work” into a report other people can learn from.&lt;/p&gt;


            </description><link>https://dev.to/qpphello1/getting-started-with-kytyps5-a-practical-look-at-ps5-emulation-on-pc-48cg</link><guid isPermaLink="false">https://dev.to/qpphello1/getting-started-with-kytyps5-a-practical-look-at-ps5-emulation-on-pc-48cg</guid><pubDate>Tue, 06 Oct 2026 01:12:00 GMT</pubDate><author>Qpphello1</author><category>emulation</category><category>opensource</category></item><item><title>Why you still need a Website Portfolio, even though everyone can Vibe Code it.</title><description>&lt;p&gt;If you have been following me for a long time, you already know that I have been holding off on my Portfolio review for several months.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbf73chzata9xufbcdh2l.gif&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbf73chzata9xufbcdh2l.gif&quot; alt=&quot; &quot; loading=&quot;lazy&quot; width=&quot;320&quot; height=&quot;320&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Before you ask, yes, I will finally show my portfolio website.&lt;/strong&gt; First, I want to write about something we all may have been thinking about at some point.&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Everyone needs a developer portfolio.&lt;/strong&gt; It&#39;s one of the big ways to stand out in the tech market because it shows your work and experience to recruiters in a friendly UI format. Some may say it&#39;s a great alternative to review a candidate&#39;s work &lt;strong&gt;(Source: Trust me bro).&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdy3guuj41zgqg2ark6qm.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdy3guuj41zgqg2ark6qm.png&quot; alt=&quot; &quot; loading=&quot;lazy&quot; width=&quot;165&quot; height=&quot;197&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;However, in the age of AI, it seems that it&#39;s almost impossible to create a portfolio that stands out. &lt;strong&gt;Why is that the case?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;ai-can-doanything&quot; href=&quot;https://dev.to/francistrdev/why-you-still-need-a-website-portfolio-even-though-everyone-can-vibe-code-it-e63#ai-can-doanything&quot;&gt;
  &lt;/a&gt;
  AI Can do...anything?
&lt;/h2&gt;

&lt;p&gt;We all (probably) have tried using AI at some point and even still use AI in our daily lives. Whether how much you have used it, you probably already know its capabilities.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AI is trained so well that it can potentially one-shot a website portfolio.&lt;/strong&gt; Even better, if the person decides, it can add features and other stuff to make the website look like it was built in months (even though it was built in minutes). We even got to the point where &lt;strong&gt;Claude was able to merge two games into one in a matter of a few weeks!&lt;/strong&gt;&lt;/p&gt;


&lt;div style=&quot;max-width: 315px; margin: 0 auto;&quot;&gt;
    &lt;iframe src=&quot;https://www.youtube.com/embed/xo3vpvbA8p8&quot; width=&quot;315&quot; height=&quot;560&quot; style=&quot;width: 100%; height: auto; aspect-ratio: 9 / 16;&quot; allowfullscreen=&quot;&quot; loading=&quot;lazy&quot; referrerpolicy=&quot;no-referrer&quot;&gt;
    &lt;/iframe&gt;
  &lt;/div&gt;


&lt;p&gt;&lt;strong&gt;It&#39;s crazy isn&#39;t it.&lt;/strong&gt; AI development has been rapidly growing in the last few years to the point where it is accomplishing tasks that may have taken months to do.&lt;/p&gt;

&lt;p&gt;With that said, I thought to myself: &lt;strong&gt;&quot;Why consider building a portfolio if everyone can vibe code their way into making their perfect portfolio?&quot;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To be honest, it&#39;s a valid question. The market has been difficult because &lt;strong&gt;everyone is using AI to their advantage to stand out from the market.&lt;/strong&gt; I have seen a lot of Website Portfolios and Resumes that have been assisted with AI. &lt;strong&gt;As a result, the bar has never been higher.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;However, I still believe having a portfolio still matters, even in this age where it seems impossible. &lt;strong&gt;Here&#39;s my reasoning.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;


&lt;hr&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;ai-portfolios-may-look-different-but-they-are-the-same&quot; href=&quot;https://dev.to/francistrdev/why-you-still-need-a-website-portfolio-even-though-everyone-can-vibe-code-it-e63#ai-portfolios-may-look-different-but-they-are-the-same&quot;&gt;
  &lt;/a&gt;
  AI Portfolios may look different, but they are the same.
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What do I mean by this?&lt;/strong&gt; I am talking about &lt;strong&gt;&quot;style&quot;.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you try to vibe code a portfolio, people can tell that the portfolio is vibe coded. Sure, it&#39;s not the EXACT replica compare to 100 portfolios out there, but you can easily tell by seeing some UI features that are defaulted if you vaguely prompt it.&lt;/p&gt;

&lt;p&gt;A small example is this:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu06ccw4udca10bjutm2h.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu06ccw4udca10bjutm2h.png&quot; alt=&quot; &quot; loading=&quot;lazy&quot; width=&quot;353&quot; height=&quot;47&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I have reviewed a lot of portfolios that has this (or something similar). Sure this may be a coincidence, but I want you to try to vibe code a sample website portfolio. Most of the time, they will add this feature.&lt;/p&gt;

&lt;p&gt;This matters because if you think about it, a lot of portfolios out there are simply the same, &lt;strong&gt;even though it may not look like it.&lt;/strong&gt; You have to have good &quot;attention to detail&quot; to see this for sure. However, at this point, coming from a person who has reviewed candidates before, it tends to be &lt;strong&gt;really repetitive.&lt;/strong&gt; Hence, making it harder in the hiring process since everyone is doing the same thing and more research needs to be accounted for.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F65uh0ek9kz91vj6ijnxm.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F65uh0ek9kz91vj6ijnxm.png&quot; alt=&quot; &quot; loading=&quot;lazy&quot; width=&quot;300&quot; height=&quot;234&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This leads to the next point.&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;new-mask-same-task&quot; href=&quot;https://dev.to/francistrdev/why-you-still-need-a-website-portfolio-even-though-everyone-can-vibe-code-it-e63#new-mask-same-task&quot;&gt;
  &lt;/a&gt;
  &quot;New Mask, Same Task&quot;
&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyzngw8qe32if3w35l8hr.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyzngw8qe32if3w35l8hr.png&quot; alt=&quot; &quot; loading=&quot;lazy&quot; width=&quot;640&quot; height=&quot;800&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Yes, I took this straight up from RDJ.&lt;/strong&gt; Though the whole point is that even though he plays a different character, &lt;strong&gt;he is still RDJ.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What does this mean in this context?&lt;/strong&gt; Just because you have pretty portfolio, &lt;strong&gt;it does not mean your work reflects that.&lt;/strong&gt; You can create many different portfolios under your name. At the end of the day, &lt;strong&gt;it&#39;s still you that needs to improve and not the portfolio.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Portfolio is used as a presentation.&lt;/strong&gt; If you are presenting your portfolio and it looks good, I would assume you have a lot of work experience and projects that are noticeable based on your portfolio design and how you are selling yourself.&lt;/p&gt;

&lt;p&gt;For example, you have a front-end developer portfolio, &lt;strong&gt;but if I were to investigate further into your GitHub, I may see the following things:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You just joined as of this year on GitHub.&lt;/li&gt;
&lt;li&gt;You claimed you did Open-Source, but there is no PR that reflects that.&lt;/li&gt;
&lt;li&gt;Your Portfolio has good UI, your project doesn&#39;t.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fy3b8d2kciblwvz44sqgs.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fy3b8d2kciblwvz44sqgs.png&quot; alt=&quot; &quot; loading=&quot;lazy&quot; width=&quot;800&quot; height=&quot;1021&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I can list a lot of things, but the main point is that if you have a good portfolio with a good list of projects you have done, &lt;strong&gt;you better hope that your projects and work reflects on how you built this portfolio.&lt;/strong&gt; This is &lt;strong&gt;ESPECIALLY&lt;/strong&gt; true if you tried to become a front-end developer. If your UI is good, you better hope your projects reflects that.&lt;/p&gt;

&lt;p&gt;It&#39;s something to keep in mind when building your portfolio. Of course, if you are applying for a back-end developer role, having a good UI on your website portfolio isn&#39;t really required, but it&#39;s a nice to have. &lt;strong&gt;The whole point is to not misrepresent yourself. Be careful on what you add on your portfolio. Always assume people will have questions on your work.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;br&gt;
&amp;nbsp;&lt;/p&gt;

&lt;p&gt;Those are the two main things. Though you may be asking &lt;strong&gt;&quot;How do I make my portfolio stand out&quot;?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Here are some key things that you can do (and yes, I am now showing my portfolio lol).&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;hr&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;
  &lt;a name=&quot;1-start-with-a-basic-portfolio-template-then-use-ai-to-add-onto-it&quot; href=&quot;https://dev.to/francistrdev/why-you-still-need-a-website-portfolio-even-though-everyone-can-vibe-code-it-e63#1-start-with-a-basic-portfolio-template-then-use-ai-to-add-onto-it&quot;&gt;
  &lt;/a&gt;
  1. Start with a basic portfolio template, then use AI to add onto it.
&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftw4mgod3tr3gv0vpi8sq.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftw4mgod3tr3gv0vpi8sq.png&quot; alt=&quot; &quot; loading=&quot;lazy&quot; width=&quot;800&quot; height=&quot;450&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For my case, I have used an existing portfolio from &lt;strong&gt;&quot;brittanychiang.com and meikopoulos.com&quot;&lt;/strong&gt;. From there, I grab existing features using AI and put them together into a portfolio I am proud of. Additionally, I added some new features that are not distracting, but is something I want to add onto my portfolio to make it unique to me:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvxzhgghsg73182n7hn1r.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvxzhgghsg73182n7hn1r.png&quot; alt=&quot; &quot; loading=&quot;lazy&quot; width=&quot;800&quot; height=&quot;397&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Instead of building it from scratch, I encourage you to find a portfolio that already exists (Bonus points: Proven that it stands out in the tech market) and build it on top of it.&lt;/strong&gt; This allows the portfolio to be unique and that &lt;strong&gt;reflects you.&lt;/strong&gt; Additionally, building on to of a template is a good starting point because it already has the fundamentals on what makes a portfolio &quot;good&quot;. In this case, I added a feature where the &quot;Skills&quot; section reveals Pokemon in each Skill Card, though I am not sharing how it works. &lt;strong&gt;Can you find the Easter egg that does that?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4bzc05l2sv8eajlpofa0.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4bzc05l2sv8eajlpofa0.png&quot; alt=&quot; &quot; loading=&quot;lazy&quot; width=&quot;800&quot; height=&quot;766&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;
  &lt;a name=&quot;2-usability-and-accessibility&quot; href=&quot;https://dev.to/francistrdev/why-you-still-need-a-website-portfolio-even-though-everyone-can-vibe-code-it-e63#2-usability-and-accessibility&quot;&gt;
  &lt;/a&gt;
  2. Usability and Accessibility!
&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8g9gkgubhpr8jcn79zbq.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8g9gkgubhpr8jcn79zbq.png&quot; alt=&quot; &quot; loading=&quot;lazy&quot; width=&quot;500&quot; height=&quot;625&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This is the most OVERLOOK aspect of making a portfolio.&lt;/strong&gt; Even though you can make your portfolio look nice, it&#39;s most likely that it&#39;s &lt;strong&gt;not accessible.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For example, it can be very laggy on low-end devices, not responsive on mobile, not following best practices, etc.&lt;/strong&gt; There are a lot of things that is overlooked because we focus on building the best looking portfolio where we should be focusing on making our website portfolio optimized.&lt;/p&gt;

&lt;p&gt;I would recommend spending time using AI to optimize your portfolio. In other words: &lt;strong&gt;&quot;Boil the lake to make the portfolio, but boil the ocean for website optimization and accessibility&quot;.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3980o06nz6b1tnftyft8.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3980o06nz6b1tnftyft8.png&quot; alt=&quot; &quot; loading=&quot;lazy&quot; width=&quot;220&quot; height=&quot;150&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For mine, I spend countless prompts where I tell the AI to make sure my portfolio is less &quot;laggy&quot; and being able to run on mobile.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This will allow to make a much cleaner portfolio and being able to be used by many people such as people who have disabilities, devices that are not powerful, etc.&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;
  &lt;a name=&quot;3-simplicity-beats-complexity&quot; href=&quot;https://dev.to/francistrdev/why-you-still-need-a-website-portfolio-even-though-everyone-can-vibe-code-it-e63#3-simplicity-beats-complexity&quot;&gt;
  &lt;/a&gt;
  3. Simplicity beats Complexity!
&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8d8zk6mtf7j69zzct8la.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8d8zk6mtf7j69zzct8la.png&quot; alt=&quot; &quot; loading=&quot;lazy&quot; width=&quot;800&quot; height=&quot;888&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A lot of portfolios we have seen tends to be very complex where there are a lot of animations and such.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;However, the more you think about it, the more you realized that you can &lt;strong&gt;stand out easily.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fy0t0imh2zk2c2em47cjj.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fy0t0imh2zk2c2em47cjj.png&quot; alt=&quot; &quot; loading=&quot;lazy&quot; width=&quot;800&quot; height=&quot;400&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I have seen a lot of portfolios that are REALLY complex and have a lot of animations, but what people fail to realized is that: &lt;strong&gt;You are doing what everyone else is doing.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;At the end of the day, you are not standing out, even if you THINK that you are.&lt;/strong&gt; If I see a portfolio that is heavily designed using AI, I can guarantee that I can find the exact same person who can one-up that.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The best advice is making it simple.&lt;/strong&gt; Yes, it&#39;s boring and yes it&#39;s common. But..that&#39;s the whole point.&lt;/p&gt;

&lt;p&gt;I rarely see any portfolio that is simply built. &lt;strong&gt;Usually the ones that are simple tends to stand out because it shows a lot of information really quickly.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5po0o7x2awqnfrw104vz.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5po0o7x2awqnfrw104vz.png&quot; alt=&quot; &quot; loading=&quot;lazy&quot; width=&quot;320&quot; height=&quot;180&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This is huge because recruiters tends to review portfolios and resumes in seconds.&lt;/strong&gt; They will not have time to look over your awesome UI and animation you have Vibe Coded. The UI should be the icing on the cake, not the whole cake. &lt;strong&gt;The most important parts is your work and experience.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Then why design your portfolio? It makes it much easier for people to navigate your work and experience than reading your resume line-by-line of course lol. The point is not spending time making the UI look nice, but &lt;strong&gt;spending more time on making sure they are able to access your work and experience within a small amount of clicks.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;
  &lt;a name=&quot;4-networking-aka-show-your-portfolio&quot; href=&quot;https://dev.to/francistrdev/why-you-still-need-a-website-portfolio-even-though-everyone-can-vibe-code-it-e63#4-networking-aka-show-your-portfolio&quot;&gt;
  &lt;/a&gt;
  4. Networking (AKA show your portfolio)
&lt;/h2&gt;

&lt;p&gt;This is the biggest thing. &lt;strong&gt;SHOW YOUR PORTFOLIO.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4qw4po0rgc3gy1vfuy7v.gif&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4qw4po0rgc3gy1vfuy7v.gif&quot; alt=&quot; &quot; loading=&quot;lazy&quot; width=&quot;220&quot; height=&quot;223&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;&lt;sub&gt;Don&#39;t know what your talking about lol&lt;/sub&gt;&lt;/center&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What&#39;s the point of making a portfolio if no one is going to see it.&lt;/strong&gt; You can share it to your family, friends, your LinkedIn connections, and even on DEV!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;With that said, here is my portfolio. Give it a review and let me know what you think!&lt;/strong&gt;&lt;/p&gt;


&lt;div class=&quot;crayons-card c-embed text-styles text-styles--secondary&quot;&gt;
    &lt;div class=&quot;c-embed__content&quot;&gt;
        &lt;div class=&quot;c-embed__cover&quot;&gt;
          &lt;a href=&quot;https://francistrdev.github.io/&quot; class=&quot;c-link align-middle&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;
            &lt;img alt=&quot;&quot; src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Ffrancistrdev.github.io%2FGreatBall.png&quot; height=&quot;801&quot; loading=&quot;lazy&quot; class=&quot;m-0&quot; width=&quot;800&quot; referrerpolicy=&quot;no-referrer&quot;&gt;
          &lt;/a&gt;
        &lt;/div&gt;
      &lt;div class=&quot;c-embed__body&quot;&gt;
        &lt;h2 class=&quot;fs-xl lh-tight&quot;&gt;
          &lt;a href=&quot;https://francistrdev.github.io/&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; class=&quot;c-link&quot;&gt;
            Francis Tran
          &lt;/a&gt;
        &lt;/h2&gt;
          &lt;p class=&quot;truncate-at-3&quot;&gt;
            Francis Tran is a Senior Full-Stack Developer and a Community Curator at DEV!
          &lt;/p&gt;
        &lt;div class=&quot;color-secondary fs-s flex items-center&quot;&gt;
            &lt;img alt=&quot;favicon&quot; class=&quot;c-embed__favicon m-0 mr-2 radius-0&quot; src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Ffrancistrdev.github.io%2Ffavicon.ico%3Ffavicon.210v8li5uw10f.ico&quot; loading=&quot;lazy&quot; width=&quot;48&quot; height=&quot;48&quot; referrerpolicy=&quot;no-referrer&quot;&gt;
          francistrdev.github.io
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;&amp;nbsp;&lt;/p&gt;


&lt;hr&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Speaking of, if you have a portfolio that has been sitting around, feel free to share your portfolio in the comments. I would love to see your portfolio and review them!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;That is all! Cya :D&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw0hxp5u8xjkina7wzazg.gif&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw0hxp5u8xjkina7wzazg.gif&quot; loading=&quot;lazy&quot; width=&quot;450&quot; height=&quot;400&quot; data-animated=&quot;true&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;


            </description><link>https://dev.to/francistrdev/why-you-still-need-a-website-portfolio-even-though-everyone-can-vibe-code-it-e63</link><guid isPermaLink="false">https://dev.to/francistrdev/why-you-still-need-a-website-portfolio-even-though-everyone-can-vibe-code-it-e63</guid><pubDate>Mon, 05 Oct 2026 15:09:58 GMT</pubDate><author>FrancisTRᴅᴇᴠ</author><enclosure url="https://media2.dev.to/dynamic/image/width=1000,height=420,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F79tl6zqq4x0zaplgo6t2.jpg" type="image/jpeg"></enclosure><category>discuss</category><category>community</category><category>showdev</category><category>a11y</category></item><item><title>LongCat 2.5 Preview vs Space Bunny Alpha: My Experience Building Real Projects</title><description>&lt;p&gt;Over the past few days, I&#39;ve been comparing LongCat 2.5 Preview and Space Bunny Alpha across actual software projects rather than isolated benchmark prompts.&lt;/p&gt;

&lt;p&gt;The projects included:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A minimal website with navigation&lt;/li&gt;
&lt;li&gt;An enterprise ServiceNow demo instance connected to an internal MCP server used by thousands of engineers and non-engineers&lt;/li&gt;
&lt;li&gt;A Chrome extension with complex wiring involving its own backend and UI while also integrating with existing UI components&lt;/li&gt;
&lt;li&gt;Homebrew installer development&lt;/li&gt;
&lt;li&gt;General automation and scripting tasks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After using both extensively, I found LongCat 2.5 Preview consistently outperforming Space Bunny Alpha in areas that matter during day-to-day development.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;1-context-understanding&quot; href=&quot;https://dev.to/prakh_r/longcat-25-preview-vs-space-bunny-alpha-my-experience-building-real-projects-5an1#1-context-understanding&quot;&gt;
  &lt;/a&gt;
  1. Context Understanding
&lt;/h2&gt;

&lt;p&gt;The biggest difference was context retention and understanding.&lt;/p&gt;

&lt;p&gt;LongCat generally understood project goals, architecture, and previous discussions much faster. It required less repetition and fewer corrective prompts.&lt;/p&gt;

&lt;p&gt;Space Bunny often needed additional iterations before it reached the same understanding, which translated into higher token usage and slower progress.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;2-tool-usage-and-orchestration&quot; href=&quot;https://dev.to/prakh_r/longcat-25-preview-vs-space-bunny-alpha-my-experience-building-real-projects-5an1#2-tool-usage-and-orchestration&quot;&gt;
  &lt;/a&gt;
  2. Tool Usage and Orchestration
&lt;/h2&gt;

&lt;p&gt;Modern development workflows increasingly rely on tools.&lt;/p&gt;

&lt;p&gt;In my experience, LongCat was significantly better at tool calling and coordinating workflows involving multiple tools.&lt;/p&gt;

&lt;p&gt;Space Bunny struggled more frequently when several tools were available, occasionally choosing the wrong path or becoming confused about which tool should be used next.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;3-nextstep-recommendations&quot; href=&quot;https://dev.to/prakh_r/longcat-25-preview-vs-space-bunny-alpha-my-experience-building-real-projects-5an1#3-nextstep-recommendations&quot;&gt;
  &lt;/a&gt;
  3. Next-Step Recommendations
&lt;/h2&gt;

&lt;p&gt;A surprisingly important capability is recommending what should happen next.&lt;/p&gt;

&lt;p&gt;LongCat regularly suggested logical follow-up actions, implementation steps, validation strategies, and improvements without requiring additional prompting.&lt;/p&gt;

&lt;p&gt;Space Bunny&#39;s suggestions were often generic and required more guidance from me.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;4-architecture-feedback&quot; href=&quot;https://dev.to/prakh_r/longcat-25-preview-vs-space-bunny-alpha-my-experience-building-real-projects-5an1#4-architecture-feedback&quot;&gt;
  &lt;/a&gt;
  4. Architecture Feedback
&lt;/h2&gt;

&lt;p&gt;When discussing system design and architecture, LongCat provided stronger and more actionable recommendations.&lt;/p&gt;

&lt;p&gt;It identified improvement opportunities, implementation concerns, and alternative approaches more consistently.&lt;/p&gt;

&lt;p&gt;Space Bunny was capable of providing architectural feedback, but the recommendations generally felt less comprehensive.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;5-design-understanding&quot; href=&quot;https://dev.to/prakh_r/longcat-25-preview-vs-space-bunny-alpha-my-experience-building-real-projects-5an1#5-design-understanding&quot;&gt;
  &lt;/a&gt;
  5. Design Understanding
&lt;/h2&gt;

&lt;p&gt;LongCat also demonstrated a stronger understanding of design intent.&lt;/p&gt;

&lt;p&gt;Whether discussing UI flows, product behavior, or implementation trade-offs, it often required fewer prompts to arrive at the desired outcome.&lt;/p&gt;

&lt;p&gt;With Space Bunny, I found myself spending more time clarifying requirements and refining prompts.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;6-understanding-intent&quot; href=&quot;https://dev.to/prakh_r/longcat-25-preview-vs-space-bunny-alpha-my-experience-building-real-projects-5an1#6-understanding-intent&quot;&gt;
  &lt;/a&gt;
  6. Understanding Intent
&lt;/h2&gt;

&lt;p&gt;One of the less obvious but highly valuable differences was intent recognition.&lt;/p&gt;

&lt;p&gt;LongCat frequently inferred the objective behind my request even when instructions were incomplete.&lt;/p&gt;

&lt;p&gt;Space Bunny performed adequately, but it required more explicit direction before reaching the same understanding.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;7-handling-roadblocks&quot; href=&quot;https://dev.to/prakh_r/longcat-25-preview-vs-space-bunny-alpha-my-experience-building-real-projects-5an1#7-handling-roadblocks&quot;&gt;
  &lt;/a&gt;
  7. Handling Roadblocks
&lt;/h2&gt;

&lt;p&gt;Development rarely goes exactly as planned.&lt;/p&gt;

&lt;p&gt;When encountering blockers, LongCat was better at proposing workarounds, alternative implementations, and recovery paths.&lt;/p&gt;

&lt;p&gt;Space Bunny was more likely to get stuck, make abrupt decisions, or defer the next step back to the user.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;summary&quot; href=&quot;https://dev.to/prakh_r/longcat-25-preview-vs-space-bunny-alpha-my-experience-building-real-projects-5an1#summary&quot;&gt;
  &lt;/a&gt;
  Summary
&lt;/h2&gt;

&lt;p&gt;Here&#39;s the simplest way I&#39;d describe the experience:&lt;/p&gt;

&lt;div class=&quot;table-wrapper-paragraph&quot;&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Area&lt;/th&gt;
&lt;th&gt;LongCat 2.5 Preview&lt;/th&gt;
&lt;th&gt;Space Bunny Alpha&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Context Understanding&lt;/td&gt;
&lt;td&gt;Excellent&lt;/td&gt;
&lt;td&gt;Slower to converge&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tool Calling&lt;/td&gt;
&lt;td&gt;Strong&lt;/td&gt;
&lt;td&gt;Can struggle with multiple tools&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Next-Step Suggestions&lt;/td&gt;
&lt;td&gt;Highly actionable&lt;/td&gt;
&lt;td&gt;Often generic&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Architecture Guidance&lt;/td&gt;
&lt;td&gt;Strong&lt;/td&gt;
&lt;td&gt;Moderate&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Design Understanding&lt;/td&gt;
&lt;td&gt;Strong&lt;/td&gt;
&lt;td&gt;Requires more prompting&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Intent Recognition&lt;/td&gt;
&lt;td&gt;Strong&lt;/td&gt;
&lt;td&gt;Average&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Handling Blockers&lt;/td&gt;
&lt;td&gt;Finds workarounds&lt;/td&gt;
&lt;td&gt;More likely to get stuck&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  &lt;a name=&quot;final-thoughts&quot; href=&quot;https://dev.to/prakh_r/longcat-25-preview-vs-space-bunny-alpha-my-experience-building-real-projects-5an1#final-thoughts&quot;&gt;
  &lt;/a&gt;
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;For my specific workflows, LongCat 2.5 Preview felt noticeably more intelligent than Space Bunny Alpha, even when Space Bunny was configured with High Thinking mode enabled.&lt;/p&gt;

&lt;p&gt;This isn&#39;t a benchmark-driven conclusion. It&#39;s based on practical use across real projects involving web development, enterprise systems, browser extensions, automation, and tooling.&lt;/p&gt;

&lt;p&gt;Your mileage may vary depending on your workflow, but for development-heavy tasks, LongCat was the clear winner in my testing.&lt;/p&gt;


            </description><link>https://dev.to/prakh_r/longcat-25-preview-vs-space-bunny-alpha-my-experience-building-real-projects-5an1</link><guid isPermaLink="false">https://dev.to/prakh_r/longcat-25-preview-vs-space-bunny-alpha-my-experience-building-real-projects-5an1</guid><pubDate>Mon, 28 Sep 2026 10:12:26 GMT</pubDate><author>Prakhar Yadav</author><enclosure url="https://media2.dev.to/dynamic/image/width=1000,height=420,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcp7c19d6mzka5089czbk.jpg" type="image/jpeg"></enclosure><category>ai</category><category>mcp</category><category>programming</category><category>discuss</category></item><item><title>Not Another LLM: I Tried Laya, a 421M-Parameter AI Decision Engine</title><description>&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1djp8is7ua5zkea3njvw.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1djp8is7ua5zkea3njvw.png&quot; alt=&quot; &quot; loading=&quot;lazy&quot; width=&quot;800&quot; height=&quot;400&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  &lt;a name=&quot;what-happened-when-i-tried-a-model-that-doesnt-generate-text-at-all&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#what-happened-when-i-tried-a-model-that-doesnt-generate-text-at-all&quot;&gt;
  &lt;/a&gt;
  What happened when I tried a model that doesn&#39;t generate text at all
&lt;/h3&gt;

&lt;p&gt;I spend a lot of time trying different AI models, especially models that can run locally. Usually, the process is pretty familiar: download the model, give it a prompt, and wait for it to generate something.&lt;/p&gt;

&lt;p&gt;Laya caught my attention because it doesn&#39;t work that way.&lt;/p&gt;

&lt;p&gt;It isn&#39;t built to write an answer, generate code, or have a conversation. Instead, you give it some text or a piece of information and ask it specific questions. It then returns a decision and a probability for that decision.&lt;/p&gt;

&lt;p&gt;That sounded simple, but also quite different from the models I normally experiment with.&lt;/p&gt;

&lt;p&gt;So I decided to install Laya on my Mac mini M4 with 16GB memory and see how it actually performs. I wanted to start from the basics, run it locally, try a few real examples, and understand where a small decision-focused model makes sense compared with using a much larger language model for everything.&lt;/p&gt;

&lt;p&gt;This post is my hands-on experience with that process, from installation and the first prediction to multilingual input, model routing, and some of the limitations I found along the way.&lt;/p&gt;

&lt;h3&gt;
  &lt;a name=&quot;tldr&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#tldr&quot;&gt;
  &lt;/a&gt;
  TL;DR:
&lt;/h3&gt;

&lt;p&gt;Laya is a 322M–421M parameter decision model that works very differently from a traditional LLM. It doesn&#39;t generate text; it takes an input, answers typed questions, and returns structured decisions with probabilities. I installed it on my M4 Mac mini, tested English, Hindi, multiple decisions, longer inputs, and larger choice sets, and also built a simple Gradio interface. The interesting part is that Laya could work as a lightweight decision layer alongside a larger LLM rather than replacing one.&lt;/p&gt;

&lt;h3&gt;
  &lt;a name=&quot;so-what-exactly-is-laya&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#so-what-exactly-is-laya&quot;&gt;
  &lt;/a&gt;
  So, What Exactly Is Laya?
&lt;/h3&gt;

&lt;p&gt;Before installing it, it helps to understand what makes Laya different from the models I usually run locally.&lt;/p&gt;

&lt;p&gt;Most language models are built around generating text. You send them a prompt, they process it one token at a time, and eventually you get a response. That makes sense for chat, coding, writing, summarization, and many other tasks.&lt;/p&gt;

&lt;p&gt;Laya takes a different approach.&lt;/p&gt;

&lt;p&gt;It is a non-autoregressive decision model. Instead of generating a response, it looks at the information you provide and answers a set of questions about it. It returns the answers in a structured format, along with probabilities.&lt;/p&gt;

&lt;p&gt;For example, imagine I receive this support message:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;Hi, we were charged twice for March.
Please refund the duplicate payment today.
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;With a normal LLM, I might ask:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;Which department should handle this request?
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;and get a natural-language response such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;This looks like a billing issue, so it should be handled
by the billing department.
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;With Laya, I can define the possible decisions beforehand:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight json&quot;&gt;&lt;code&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;billing&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;invoices, payments, refunds&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;technical&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;bugs, outages, system errors&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;other&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;everything else&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Laya can then return the selected option and its probability rather than generating an explanation.&lt;/p&gt;

&lt;p&gt;That&#39;s the part I found interesting.&lt;/p&gt;

&lt;p&gt;There is no long response to parse, no generated paragraph sitting between the model and my application, and no need to ask the model to format its answer as JSON after the fact.&lt;/p&gt;

&lt;p&gt;It&#39;s a small model too&lt;/p&gt;

&lt;p&gt;Laya currently comes with three checkpoints.&lt;/p&gt;

&lt;p&gt;The main English model has 421 million parameters, while the multilingual checkpoint has 322 million parameters. There is also a 421M-parameter checkpoint fine-tuned for typed decision tasks.&lt;/p&gt;

&lt;p&gt;For comparison, the local language models I normally experiment with are measured in billions of parameters. Laya is operating on a completely different scale.&lt;/p&gt;

&lt;p&gt;But the parameter count isn&#39;t really the main story here.&lt;/p&gt;

&lt;p&gt;The important thing is that Laya is designed for a much narrower job.&lt;/p&gt;

&lt;p&gt;It isn&#39;t trying to write an email for me or build an application from a prompt. It is trying to answer questions such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;Which category is this?

How urgent is this?

Does the user want a refund?

Should this request be routed to another system?

&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;That makes it feel less like a chatbot and more like a decision layer that can sit inside a larger application.&lt;/p&gt;

&lt;p&gt;And that was enough to make me want to try it locally.&lt;/p&gt;

&lt;h3&gt;
  &lt;a name=&quot;installing-laya-on-my-mac-mini&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#installing-laya-on-my-mac-mini&quot;&gt;
  &lt;/a&gt;
  Installing Laya on My Mac Mini
&lt;/h3&gt;

&lt;p&gt;Once I understood what Laya was actually built for, the next step was simply getting it running.&lt;/p&gt;

&lt;p&gt;I wanted to keep the setup clean, so I used a separate Python virtual environment instead of installing everything directly into my system Python.&lt;/p&gt;

&lt;p&gt;My Mac mini has an M4 chip with 16GB of unified memory, so I wasn&#39;t expecting the model to be particularly demanding. The main Laya checkpoint is also only a few hundred million parameters, which makes it much smaller than the local language models I usually work with.&lt;/p&gt;

&lt;h4&gt;
  &lt;a name=&quot;step-1-create-a-virtual-environment&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#step-1-create-a-virtual-environment&quot;&gt;
  &lt;/a&gt;
  Step 1: Create a virtual environment
&lt;/h4&gt;

&lt;p&gt;I started by creating a new folder for the experiment:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight shell&quot;&gt;&lt;code&gt;&lt;span class=&quot;nb&quot;&gt;mkdir &lt;/span&gt;laya-test
&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;laya-test
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Then I created a virtual environment:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight shell&quot;&gt;&lt;code&gt;python3 &lt;span class=&quot;nt&quot;&gt;-m&lt;/span&gt; venv .venv
&lt;span class=&quot;nb&quot;&gt;source&lt;/span&gt; .venv/bin/activate

&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Once the environment was active, my terminal showed (.venv) at the beginning of the command line.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsnndx8sxllrqtz8jeuwe.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsnndx8sxllrqtz8jeuwe.png&quot; alt=&quot; &quot; loading=&quot;lazy&quot; width=&quot;800&quot; height=&quot;354&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  &lt;a name=&quot;step-2-install-laya&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#step-2-install-laya&quot;&gt;
  &lt;/a&gt;
  Step 2: Install Laya
&lt;/h4&gt;

&lt;p&gt;The installation itself is surprisingly simple:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight shell&quot;&gt;&lt;code&gt;python &lt;span class=&quot;nt&quot;&gt;-m&lt;/span&gt; pip &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;laya

&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F85x7s0bjibily2cb7f8z.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F85x7s0bjibily2cb7f8z.png&quot; alt=&quot; &quot; loading=&quot;lazy&quot; width=&quot;800&quot; height=&quot;1011&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That&#39;s it.&lt;/p&gt;

&lt;p&gt;There was no separate model download command at this stage. The package installs first, and the actual checkpoint is downloaded the first time I use it.&lt;/p&gt;

&lt;h4&gt;
  &lt;a name=&quot;step-3-check-the-installation&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#step-3-check-the-installation&quot;&gt;
  &lt;/a&gt;
  Step 3: Check the installation
&lt;/h4&gt;

&lt;p&gt;Before loading a model, I wanted to make sure the package was installed correctly:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight shell&quot;&gt;&lt;code&gt;python &lt;span class=&quot;nt&quot;&gt;-c&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;import laya; print(laya.__version__)&quot;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fi27lpqg74ftwabcyy5pl.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fi27lpqg74ftwabcyy5pl.png&quot; alt=&quot; &quot; loading=&quot;lazy&quot; width=&quot;800&quot; height=&quot;582&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is a useful little check because it confirms that Python can find the package and tells me which version I&#39;m actually running.&lt;/p&gt;

&lt;p&gt;A small thing worth knowing&lt;/p&gt;

&lt;p&gt;Laya doesn&#39;t download every checkpoint immediately.&lt;/p&gt;

&lt;p&gt;The project has three checkpoints, but the one I request is what gets loaded. This is useful on a machine like mine because I don&#39;t need to spend storage space downloading models that I haven&#39;t decided to use yet.&lt;/p&gt;

&lt;p&gt;The English checkpoint is around 843 MB, while the multilingual checkpoint is around 647 MB. That&#39;s tiny compared with many of the local models I&#39;ve worked with.&lt;/p&gt;

&lt;p&gt;So even with limited free space on my internal drive, Laya itself wasn&#39;t going to be the problem.&lt;/p&gt;

&lt;p&gt;Now for the interesting part&lt;/p&gt;

&lt;p&gt;The package was installed, the environment was ready, and there was only one thing left to do:&lt;/p&gt;

&lt;p&gt;Actually make Laya take a decision.&lt;/p&gt;

&lt;h4&gt;
  &lt;a name=&quot;step-4-create-the-python-file&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#step-4-create-the-python-file&quot;&gt;
  &lt;/a&gt;
  Step 4: Create the Python File
&lt;/h4&gt;

&lt;p&gt;Now that Laya is installed, I wanted to run a small example and see how it handles a real decision.&lt;/p&gt;

&lt;p&gt;Inside the laya-test folder, I created a Python file:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight shell&quot;&gt;&lt;code&gt;&lt;span class=&quot;nb&quot;&gt;touch &lt;/span&gt;test_laya.py
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Then I opened the file and added the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight shell&quot;&gt;&lt;code&gt;nano test_laya.py
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;I added this code:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight python&quot;&gt;&lt;code&gt;&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;laya&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Router&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;router&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Router&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;state&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;
Hi, we were billed twice for March.
Please refund the duplicate payment today.
&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&quot;&quot;&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;questions&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;department&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;choice&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;instructions&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Which department should handle this?&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;criteria&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;billing&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;invoices, payments, refunds&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;technical&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;bugs, outages, system errors&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;other&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;everything else&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;result&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;router&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;predict&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;state&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;questions&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;nf&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;After adding the code, I saved the file and closed the editor.&lt;/p&gt;

&lt;p&gt;The example is intentionally simple. I give Laya a short customer-support message and define three possible departments. Laya then has to decide which department is the right one.&lt;/p&gt;

&lt;h4&gt;
  &lt;a name=&quot;step-5-run-laya&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#step-5-run-laya&quot;&gt;
  &lt;/a&gt;
  Step 5: Run Laya
&lt;/h4&gt;

&lt;p&gt;With the file ready, I ran it from the same terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight shell&quot;&gt;&lt;code&gt;python test_laya.py

&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;On the first run, Laya downloaded the required model checkpoint from Hugging Face. In my case, the download was around 846 MB.&lt;/p&gt;

&lt;p&gt;After the model finished loading, Laya processed the message and returned a structured result.&lt;/p&gt;

&lt;p&gt;The important part of my output was:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;department → billing

&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;It also returned probabilities for all three choices, rather than generating a normal text response.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fypyuhefgrmfs5jqgo1qs.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fypyuhefgrmfs5jqgo1qs.png&quot; alt=&quot; &quot; loading=&quot;lazy&quot; width=&quot;799&quot; height=&quot;523&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This was my first successful Laya inference running locally on my M4 Mac mini.&lt;/p&gt;

&lt;h4&gt;
  &lt;a name=&quot;step-6-understanding-the-result&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#step-6-understanding-the-result&quot;&gt;
  &lt;/a&gt;
  Step 6: Understanding the Result
&lt;/h4&gt;

&lt;p&gt;The first test was successful, but the output from Laya contains more information than just the final category.&lt;/p&gt;

&lt;p&gt;My terminal returned a result similar to this:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight json&quot;&gt;&lt;code&gt;&lt;span class=&quot;err&quot;&gt;&#39;answers&#39;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&#39;department&#39;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&#39;type&#39;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&#39;choice&#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&#39;choice&#39;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&#39;billing&#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&#39;probabilities&#39;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
            &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&#39;billing&#39;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;0.9875&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
            &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&#39;technical&#39;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;0.0063&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
            &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&#39;other&#39;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;0.0062&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&#39;confidence&#39;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;0.9309&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&#39;answer_confidence&#39;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;0.9875&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;The first thing to look at is:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;choice: billing
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;That&#39;s the actual decision Laya made.&lt;/p&gt;

&lt;p&gt;Then there are the probabilities:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;billing   → 0.9875
technical → 0.0063
other     → 0.0062

&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;So, for this particular input, the model strongly preferred the billing category.&lt;/p&gt;

&lt;p&gt;Another interesting part of the result is:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;output_tokens: 0
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;This is one of the easiest ways to see how Laya differs from a traditional text-generating model. It didn&#39;t generate a sentence explaining its answer. It evaluated the input and returned the structured result.&lt;/p&gt;

&lt;p&gt;The response also included routing information:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;model: english
reason: English Latin text
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;This means the built-in Router detected my input as English and selected the English checkpoint automatically.&lt;/p&gt;

&lt;p&gt;One thing I noticed during this test was a warning about calibration. The runtime reported that one temperature value was outside its allowed range and was adjusted. Because of that, I won&#39;t treat the displayed probability as a guaranteed measure of real-world accuracy. It is better to validate and calibrate these probabilities on the data you&#39;re actually using.&lt;/p&gt;

&lt;p&gt;For a first local test, though, the important part was clear: Laya was installed, the model loaded successfully, and it made a structured decision on my Mac mini.&lt;/p&gt;

&lt;h4&gt;
  &lt;a name=&quot;step-7-asking-laya-multiple-questions&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#step-7-asking-laya-multiple-questions&quot;&gt;
  &lt;/a&gt;
  Step 7: Asking Laya Multiple Questions
&lt;/h4&gt;

&lt;p&gt;After the first test worked, I wanted to see what would happen if I asked Laya more than one question about the same message.&lt;/p&gt;

&lt;p&gt;The nice thing here is that I don&#39;t have to send the same text to the model again and again. I can define several questions and pass them together.&lt;/p&gt;

&lt;p&gt;I kept the same customer-support example and added two more decisions: urgency and churn risk.&lt;/p&gt;

&lt;p&gt;I updated test_laya.py with this:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight python&quot;&gt;&lt;code&gt;&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;laya&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Router&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;router&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Router&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;state&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;
Hi, we were billed twice for March.
Please refund the duplicate payment today
or we will cancel our plan.
&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&quot;&quot;&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;questions&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;department&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;choice&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;instructions&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Which department should handle this?&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;criteria&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;billing&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;invoices, payments, refunds&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;technical&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;bugs, outages, system errors&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;other&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;everything else&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;

    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;urgency&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;score&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;instructions&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;How urgent is this?&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;criteria&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;not urgent&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;soon&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;critical&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;

    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;churn_risk&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;noul&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;instructions&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Does the user threaten to cancel or leave?&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;result&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;router&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;predict&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;state&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;questions&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;nf&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;The input now contains three things at once:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;Department
Urgency
Churn risk
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;So instead of asking Laya:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Which department should handle this?&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;I&#39;m also asking:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;How urgent is this?&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;and:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Is the customer threatening to leave?&lt;/code&gt;&lt;/p&gt;

&lt;h5&gt;
  &lt;a name=&quot;running-the-updated-test&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#running-the-updated-test&quot;&gt;
  &lt;/a&gt;
  Running the updated test
&lt;/h5&gt;

&lt;p&gt;I saved the file and ran it again:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight shell&quot;&gt;&lt;code&gt;python test_laya.py
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fezcpeqrdu9n4q2555r7f.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fezcpeqrdu9n4q2555r7f.png&quot; alt=&quot; &quot; loading=&quot;lazy&quot; width=&quot;799&quot; height=&quot;509&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This time, the result included answers for all three questions.&lt;/p&gt;

&lt;h5&gt;
  &lt;a name=&quot;the-result&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#the-result&quot;&gt;
  &lt;/a&gt;
  The result
&lt;/h5&gt;

&lt;p&gt;This time, Laya returned all three decisions from the same input.&lt;/p&gt;

&lt;p&gt;For the department, it selected:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;billing
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;with:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;billing   → 0.9801
technical → 0.0113
other     → 0.0086

&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;The model&#39;s reported confidence was 0.8989.&lt;/p&gt;

&lt;p&gt;For urgency, the result was:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;score: 1.2514

&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;The three possible levels had these probabilities:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;not urgent → 0.1502
soon       → 0.4482
critical   → 0.4016
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;So the model leaned toward “soon”, although the probabilities were much closer here than they were for the department decision.&lt;/p&gt;

&lt;p&gt;Finally, for churn risk, Laya returned:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;0.8553
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;So in this particular test, it assigned an 85.53% probability to the user threatening to cancel or leave.&lt;/p&gt;

&lt;p&gt;One detail that stood out was:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;input_tokens: 179
output_tokens: 0

&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Even though I asked three different questions, there was still no generated text output.&lt;/p&gt;

&lt;p&gt;That&#39;s probably the simplest way to explain what makes Laya interesting. I&#39;m giving it one piece of information and several decisions to make, and it returns those decisions in a structured format.&lt;/p&gt;

&lt;p&gt;The Router also reported:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;model: english
reason: English Latin text
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;So the English checkpoint was selected automatically.&lt;/p&gt;

&lt;p&gt;One thing I noticed&lt;/p&gt;

&lt;p&gt;The runtime again showed the warning about an invalid temperature value and said the affected confidence should be treated as uncalibrated. So while these probabilities are useful for seeing what the model is doing, I wouldn&#39;t present them as a measure of actual accuracy.&lt;/p&gt;

&lt;p&gt;For me, the more interesting result was the shape of the output: one input, three decisions, and zero generated tokens.&lt;/p&gt;

&lt;h4&gt;
  &lt;a name=&quot;step-8-testing-laya-with-hindi&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#step-8-testing-laya-with-hindi&quot;&gt;
  &lt;/a&gt;
  Step 8: Testing Laya with Hindi
&lt;/h4&gt;

&lt;p&gt;After testing the English example, I wanted to see what happens when I give Laya a message in another language.&lt;/p&gt;

&lt;p&gt;I used a simple Hindi sentence:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;मुझसे दो बार शुल्क लिया गया, कृपया पैसे वापस करें।
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;The meaning is roughly:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;I was charged twice; please refund the money.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This is where the Router becomes useful. I don&#39;t have to manually decide which checkpoint to load. Laya can inspect the input and choose the appropriate model.&lt;/p&gt;

&lt;p&gt;I updated my test_laya.py file and replaced the English state with the Hindi example:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight python&quot;&gt;&lt;code&gt;&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;laya&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Router&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;router&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Router&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;state&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;
मुझसे दो बार शुल्क लिया गया,
कृपया पैसे वापस करें।
&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&quot;&quot;&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;questions&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;department&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;choice&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;instructions&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Which department should handle this?&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;criteria&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;billing&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;invoices, payments, refunds&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;technical&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;bugs, outages, system errors&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;other&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;everything else&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;result&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;router&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;predict&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;state&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;questions&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;nf&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;I kept the same billing question and ran the file again:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight shell&quot;&gt;&lt;code&gt;python test_laya.py
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0ymtfpvxxmz4m5xlg20s.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0ymtfpvxxmz4m5xlg20s.png&quot; alt=&quot; &quot; loading=&quot;lazy&quot; width=&quot;800&quot; height=&quot;466&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This time, Laya had to download its multilingual checkpoint. The download was around 653 MB, and the reconstructed checkpoint was about 678 MB.&lt;/p&gt;

&lt;p&gt;The prediction itself was:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;department → billing
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;with these probabilities:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;billing   → 0.9923
technical → 0.0026
other     → 0.0051

&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;The reported confidence was 0.9544.&lt;/p&gt;

&lt;p&gt;But the part I was really interested in was the routing information.&lt;/p&gt;

&lt;p&gt;Laya returned:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;model: multilingual
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;and gave the reason:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;non-Latin script (devanagari, 100% of letters);
the English checkpoint cannot read it

&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;So the Router recognized the script as Devanagari and automatically sent the request to the multilingual checkpoint.&lt;/p&gt;

&lt;p&gt;The routing metadata also showed:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;script: devanagari
language: None
is_english: False

&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;That last part is interesting. Laya didn&#39;t need to identify the exact language as Hindi first. The script itself was enough for the Router to decide that the English checkpoint shouldn&#39;t be used.&lt;/p&gt;

&lt;p&gt;The complete flow looked like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;Hindi text
    ↓
Router
    ↓
Devanagari detected
    ↓
Multilingual checkpoint
    ↓
Billing decision
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;And once again, the model reported:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;input_tokens: 55
output_tokens: 0
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;So even with the multilingual model, there was still no text generation involved.&lt;/p&gt;

&lt;h5&gt;
  &lt;a name=&quot;one-small-observation&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#one-small-observation&quot;&gt;
  &lt;/a&gt;
  One small observation
&lt;/h5&gt;

&lt;p&gt;The multilingual checkpoint was a little smaller on disk than the English one in my tests:&lt;/p&gt;

&lt;p&gt;English checkpoint      → ~846 MB&lt;br&gt;
Multilingual checkpoint → ~678 MB reconstructed&lt;/p&gt;

&lt;p&gt;That made this test even more interesting for my setup, because both checkpoints are small enough to work comfortably on my Mac mini.&lt;/p&gt;
&lt;h4&gt;
  &lt;a name=&quot;step-9-looking-at-how-laya-routes-the-input&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#step-9-looking-at-how-laya-routes-the-input&quot;&gt;
  &lt;/a&gt;
  Step 9: Looking at How Laya Routes the Input
&lt;/h4&gt;

&lt;p&gt;The Hindi test gave me the prediction I expected, but I was more curious about what happened before the prediction.&lt;/p&gt;

&lt;p&gt;Laya&#39;s Router doesn&#39;t just return the final answer. It also gives back information about the checkpoint it selected and why it selected it.&lt;/p&gt;

&lt;p&gt;I already had this in my result:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight python&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;result&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;router&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;predict&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;state&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;questions&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;So I added a couple of simple print statements to see the routing details more clearly:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight python&quot;&gt;&lt;code&gt;&lt;span class=&quot;nf&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Selected model:&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;routing&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;][&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;model&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Reason:&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;routing&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;][&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;reason&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Detection:&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;routing&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;][&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;detection&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;For my Hindi test, the output showed:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;Selected model: multilingual

Reason:
non-Latin script (devanagari, 100% of letters);
the English checkpoint cannot read it
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;And the detection information looked like:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;script: devanagari
language: None
is_english: False
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;That was useful because it showed me that the Router didn&#39;t need to first figure out that the sentence was specifically Hindi. It could see that the text was written in Devanagari, which was enough to avoid sending it to the English checkpoint.&lt;/p&gt;

&lt;p&gt;I can also check the route separately&lt;/p&gt;

&lt;p&gt;Another thing I found useful is that routing can be inspected without actually running the model.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight python&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;route&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;router&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;route&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;state&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;questions&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;nf&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Model:&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;route&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;model&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Reason:&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;route&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;reason&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;This gives me the routing decision before inference happens.&lt;/p&gt;

&lt;p&gt;That means the overall flow is roughly:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;Input
  ↓
Router
  ↓
Detect script / language
  ↓
Select checkpoint
  ↓
Run inference
  ↓
Return decision

&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;I like this separation because it makes the behavior easier to understand when you&#39;re building a real application. The routing step isn&#39;t hidden inside some giant prompt. You can actually see which checkpoint was selected and the reason for it.&lt;/p&gt;

&lt;p&gt;English and Hindi side by side&lt;/p&gt;

&lt;p&gt;After running both tests, I had a simple comparison:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;English
  ↓
English / Laya checkpoint

Hindi
  ↓
Devanagari detected
  ↓
Multilingual checkpoint
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;So far, the whole thing had been surprisingly lightweight.&lt;/p&gt;

&lt;p&gt;I had one model around 846 MB, another around 678 MB in my local test, and both were running directly on my Mac mini without needing a remote API.&lt;/p&gt;

&lt;h4&gt;
  &lt;a name=&quot;step-10-building-a-more-realistic-laya-test&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#step-10-building-a-more-realistic-laya-test&quot;&gt;
  &lt;/a&gt;
  Step 10: Building a More Realistic Laya Test
&lt;/h4&gt;

&lt;p&gt;The first few tests were intentionally simple. I wanted to make sure the installation worked, understand the output, and see how the Router handled different languages.&lt;/p&gt;

&lt;p&gt;Now I wanted to make the example a little closer to something I might actually use in an application.&lt;/p&gt;

&lt;p&gt;Instead of asking Laya only for the department, I decided to extract several useful decisions from the same support message.&lt;/p&gt;

&lt;p&gt;I used this example:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;Hi, we were billed twice for March.
Please refund the duplicate payment today
or we will cancel our plan.

&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;From that single message, I wanted Laya to determine:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which department should handle it?&lt;/li&gt;
&lt;li&gt;How urgent is it?&lt;/li&gt;
&lt;li&gt;Has the customer requested a refund?&lt;/li&gt;
&lt;li&gt;Is there a possible churn risk?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I updated test_laya.py with:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight python&quot;&gt;&lt;code&gt;&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;laya&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Router&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;router&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Router&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;state&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;
Hi, we were billed twice for March.
Please refund the duplicate payment today
or we will cancel our plan.
&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&quot;&quot;&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;questions&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;department&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;choice&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;instructions&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Which department should handle this?&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;criteria&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;billing&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;invoices, payments, refunds&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;technical&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;bugs, outages, system errors&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;other&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;everything else&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;

    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;urgency&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;score&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;instructions&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;How urgent is this?&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;criteria&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;not urgent&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;soon&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;critical&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;

    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;refund_requested&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;noul&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;instructions&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Does the user explicitly request a refund?&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;

    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;churn_risk&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;noul&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;instructions&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Does the user threaten to cancel or leave?&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;result&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;router&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;predict&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;state&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;questions&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;nf&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;I updated my test_laya.py file with the four questions and ran:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight shell&quot;&gt;&lt;code&gt;python test_laya.py
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fb6q1n6n4k21wixbegjay.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fb6q1n6n4k21wixbegjay.png&quot; alt=&quot; &quot; loading=&quot;lazy&quot; width=&quot;799&quot; height=&quot;509&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The result was interesting.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Department&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Laya selected:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;billing
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;The probabilities were:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;billing   → 0.9801
technical → 0.0113
other     → 0.0086

&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;So the model clearly associated the message with a billing issue.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Urgency&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;For urgency, I defined three levels:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;0 → not urgent
1 → soon
2 → critical
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Laya returned:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;score: 1.2514

&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;with:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;not urgent → 0.1502
soon       → 0.4482
critical   → 0.4016
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;The model leaned toward “soon”, although the probabilities were much closer together than they were for the department decision.&lt;/p&gt;

&lt;p&gt;The reported confidence here was also quite low at 0.0799, which is a good reminder not to treat every model output as equally certain.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Refund requested&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;For the refund question, Laya returned:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;0.8822
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;So it assigned an 88.22% probability to the user explicitly requesting a refund.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Churn risk&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The final question was whether the customer was threatening to leave.&lt;/p&gt;

&lt;p&gt;Laya returned:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;0.8553
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;That corresponds to an 85.53% probability for that decision.&lt;/p&gt;

&lt;h5&gt;
  &lt;a name=&quot;one-input-four-decisions&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#one-input-four-decisions&quot;&gt;
  &lt;/a&gt;
  One input, four decisions
&lt;/h5&gt;

&lt;p&gt;The overall result can be summarized like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;                    Customer message
                           ↓
                         Laya
                           ↓
        ┌──────────┬──────────┬───────────┬──────────┐
        ↓          ↓          ↓           ↓
     Billing     Urgency    Refund      Churn
      98.01%      1.25      88.22%      85.53%
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;There was another detail I found useful in the output:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;input_tokens: 239
output_tokens: 0
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Even with four separate decisions, Laya still generated zero output tokens.&lt;/p&gt;

&lt;p&gt;That is probably the clearest practical difference I&#39;ve seen so far between Laya and a conventional text-generating model. I give it a piece of text, define the decisions I care about, and it returns structured results instead of generating a response.&lt;/p&gt;

&lt;p&gt;The Router also continued to select the English checkpoint automatically:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;model: english
reason: English Latin text
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;At this point, Laya was starting to look less like a small chatbot and more like a component I could put inside a larger application.&lt;/p&gt;

&lt;p&gt;There is still one limitation worth keeping in mind. The runtime again warned about an out-of-range temperature value and said the affected confidence values should be treated as uncalibrated. So these numbers are useful for understanding this particular prediction, but I wouldn&#39;t use them as evidence that the model is 98% or 85% accurate in general.&lt;/p&gt;

&lt;p&gt;For a local experiment, though, this was a useful result: one input, four decisions, and no generated text.&lt;/p&gt;

&lt;h4&gt;
  &lt;a name=&quot;step-11-testing-laya-with-a-longer-input&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#step-11-testing-laya-with-a-longer-input&quot;&gt;
  &lt;/a&gt;
  Step 11: Testing Laya with a Longer Input
&lt;/h4&gt;

&lt;p&gt;So far, most of my tests used short messages. That&#39;s useful for understanding the basics, but real applications rarely receive just two or three lines of text.&lt;/p&gt;

&lt;p&gt;A support ticket can contain the original complaint, previous replies, order details, and a few extra paragraphs. So my next test was to give Laya a longer piece of text and see how it handles it.&lt;/p&gt;

&lt;p&gt;For this test, I kept the same questions but replaced the short message with a more detailed customer request.&lt;/p&gt;

&lt;p&gt;I updated test_laya.py like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight python&quot;&gt;&lt;code&gt;&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;laya&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Router&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;router&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Router&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;state&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;
Hi support team,

I am contacting you because I noticed that my March subscription
payment was charged twice on my account. I checked my bank statement
and can see two separate charges for the same amount on the same day.

I have already checked my account dashboard, but I can only see one
invoice there. I would like the duplicate payment to be refunded as
soon as possible.

This has been quite frustrating because I need the money back before
the end of the week. If this issue cannot be resolved soon, I may have
to cancel my subscription and move to another service.

Please check the payment history, confirm what happened, and let me
know when the duplicate amount will be returned.
&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&quot;&quot;&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;questions&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;department&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;choice&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;instructions&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Which department should handle this?&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;criteria&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;billing&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;invoices, payments, refunds&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;technical&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;bugs, outages, system errors&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;other&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;everything else&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;

    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;urgency&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;score&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;instructions&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;How urgent is this?&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;criteria&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;not urgent&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;soon&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;critical&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;

    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;refund_requested&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;noul&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;instructions&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Does the user explicitly request a refund?&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;

    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;churn_risk&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;noul&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;instructions&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Does the user threaten to cancel or leave?&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;result&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;router&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;predict&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;state&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;questions&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;nf&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Then I ran the same file again:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight shell&quot;&gt;&lt;code&gt;python test_laya.py
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnif8vxu6gumh2tr8zijk.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnif8vxu6gumh2tr8zijk.png&quot; alt=&quot; &quot; loading=&quot;lazy&quot; width=&quot;800&quot; height=&quot;538&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This time, the model processed 751 input tokens and still returned:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;output_tokens: 0
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;That part stayed the same. Even with a much longer input, Laya wasn&#39;t generating a written response.&lt;/p&gt;

&lt;p&gt;The department result was:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;billing → 0.9115
technical → 0.0524
other → 0.0361
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;So Laya still identified the request as a billing issue, although the probability was lower than in my shorter test.&lt;/p&gt;

&lt;p&gt;For urgency, it returned:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;not urgent → 0.2238
soon       → 0.7585
critical   → 0.0177
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;The resulting score was:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;0.7939
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;So this time the model clearly leaned toward “soon.”&lt;/p&gt;

&lt;p&gt;The refund question returned:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;0.8231
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;which means the model assigned an 82.31% probability to the user explicitly requesting a refund.&lt;/p&gt;

&lt;p&gt;Then I got one result that I found quite interesting.&lt;/p&gt;

&lt;p&gt;The churn-risk question returned:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;0.1494
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;So the model assigned only 14.94% probability to the user threatening to cancel, even though the text explicitly included:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;“If this issue cannot be resolved soon, I may have to cancel my subscription.”&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This was a useful reminder that I shouldn&#39;t assume the model will interpret every question exactly the way I expect.&lt;/p&gt;

&lt;p&gt;The Laya documentation also points out that its noul decision can sometimes be affected by the labels used for the two possible outcomes. So this result is something I would want to investigate rather than simply accepting it as a correct or incorrect verdict.&lt;/p&gt;

&lt;p&gt;The longer input changed the results&lt;/p&gt;

&lt;p&gt;Comparing this with my earlier short test was also interesting.&lt;/p&gt;

&lt;p&gt;The shorter version gave me:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;billing → 98.01%
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;while the longer version gave:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;billing → 91.15%
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;The model still selected the same category, but the probability changed once more context was added.&lt;/p&gt;

&lt;p&gt;That&#39;s actually something I wanted to see. A longer input isn&#39;t automatically going to produce the same confidence as a short one, even when the underlying topic hasn&#39;t changed.&lt;/p&gt;

&lt;p&gt;For this particular test, the 751-token input was still handled without any problem by the English checkpoint.&lt;/p&gt;

&lt;p&gt;At this point, I had tested short inputs, multiple questions, different languages, and a longer support ticket.&lt;/p&gt;

&lt;h4&gt;
  &lt;a name=&quot;step-12-what-happens-when-there-are-more-choices&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#step-12-what-happens-when-there-are-more-choices&quot;&gt;
  &lt;/a&gt;
  Step 12: What Happens When There Are More Choices?
&lt;/h4&gt;

&lt;p&gt;So far, I had been giving Laya only a few possible answers.&lt;/p&gt;

&lt;p&gt;That works nicely for a simple example like:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;billing
technical
other
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;But real classification systems can have many more categories. A support system, for example, might have separate labels for refunds, card problems, failed transfers, account access, delivery issues, verification, and many other cases.&lt;/p&gt;

&lt;p&gt;So I wanted to see how Laya behaves when the number of choices starts increasing.&lt;/p&gt;

&lt;p&gt;Instead of changing the whole project, I kept the same setup and created a larger choice question.&lt;/p&gt;

&lt;p&gt;I used this:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight python&quot;&gt;&lt;code&gt;&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;laya&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Router&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;router&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Router&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;state&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;
I tried to transfer money to my bank account this morning.
The transfer failed, but I can see the amount has already
been deducted from my account. I want to know when the money
will be returned.
&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&quot;&quot;&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;questions&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;intent&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;choice&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;instructions&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;What is the main reason for this support request?&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;criteria&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;card_payment&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;problem with a card payment&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;cash_withdrawal&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;problem withdrawing cash&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;bank_transfer&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;problem with a bank transfer&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;refund&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;asking for a refund&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;account_access&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;cannot access the account&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;verification&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;identity or account verification problem&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;subscription&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;subscription or recurring payment problem&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;fees&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;question about fees or charges&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;exchange_rate&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;question about currency exchange rates&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;card_delivery&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;problem with card delivery&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;cash_deposit&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;problem depositing cash&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;other&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;something not covered by the other categories&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;result&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;router&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;predict&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;state&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;questions&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;nf&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;The input was:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;I tried to transfer money to my bank account this morning.
The transfer failed, but I can see the amount has already
been deducted from my account. I want to know when the money
will be returned.
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;I then asked Laya to choose the main reason for the request from these categories:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;card_payment
cash_withdrawal
bank_transfer
refund
account_access
verification
subscription
fees
exchange_rate
card_delivery
cash_deposit
other
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;I ran the same command as before:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight shell&quot;&gt;&lt;code&gt;python test_laya.py
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F53oyqddc5kxe4bv2ly1e.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F53oyqddc5kxe4bv2ly1e.png&quot; alt=&quot; &quot; loading=&quot;lazy&quot; width=&quot;800&quot; height=&quot;495&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h5&gt;
  &lt;a name=&quot;the-result&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#the-result&quot;&gt;
  &lt;/a&gt;
  The result
&lt;/h5&gt;

&lt;p&gt;Laya selected:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;bank_transfer
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;The result was extremely strong:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;bank_transfer → 1.0

&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;The other 11 categories were returned as 0.0 in this particular run.&lt;/p&gt;

&lt;p&gt;The reported confidence was:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;confidence: 0.9998
answer_confidence: 1.0
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;It also processed:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;input_tokens: 174
output_tokens: 0

&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;So once again, there was no generated text.&lt;/p&gt;

&lt;h5&gt;
  &lt;a name=&quot;what-i-found-interesting&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#what-i-found-interesting&quot;&gt;
  &lt;/a&gt;
  What I found interesting
&lt;/h5&gt;

&lt;p&gt;I expected adding more options to make the decision noticeably harder, but with 12 choices, Laya still identified the correct category very clearly.&lt;/p&gt;

&lt;p&gt;That said, there is an important detail here.&lt;/p&gt;

&lt;p&gt;The runtime again showed the warning about an invalid temperature value and said that the affected confidence values were uncalibrated. Because of that, I wouldn&#39;t interpret the 1.0 probability as meaning that the model is literally certain or that it will be correct 100% of the time.&lt;/p&gt;

&lt;p&gt;What I can say from my test is much simpler:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;With this particular 12-option example, Laya selected bank_transfer and assigned virtually all of the probability mass to that category.&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;
&lt;h5&gt;
  &lt;a name=&quot;where-things-get-more-interesting&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#where-things-get-more-interesting&quot;&gt;
  &lt;/a&gt;
  Where things get more interesting
&lt;/h5&gt;

&lt;p&gt;This test also showed me why the number of choices matters.&lt;/p&gt;

&lt;p&gt;Laya has a fixed budget for representing the options in a question. With 12 categories, there is still enough room for the descriptions to remain distinct.&lt;/p&gt;

&lt;p&gt;But what happens when the number jumps from 12 choices to dozens of choices?&lt;/p&gt;

&lt;p&gt;The project&#39;s own benchmarks show that high-cardinality questions can become a problem. The documentation specifically discusses a 77-option Banking77 test, where the available option budget becomes much tighter.&lt;/p&gt;

&lt;p&gt;So my next experiment is going to push this much further.&lt;/p&gt;
&lt;h4&gt;
  &lt;a name=&quot;step-13-testing-laya-with-77-choices&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#step-13-testing-laya-with-77-choices&quot;&gt;
  &lt;/a&gt;
  Step 13: Testing Laya with 77 Choices
&lt;/h4&gt;

&lt;p&gt;After my 12-choice test worked, I wanted to push the model much further.&lt;/p&gt;

&lt;p&gt;The Laya documentation talks about an important limitation with high-cardinality choice questions. When a question has a large number of options, the model has to fit all of those option descriptions into a fixed part of its input budget. With 50 or more choices, this can make the options harder to distinguish. The project&#39;s benchmark specifically uses Banking77, a dataset with 77 banking intents, to demonstrate this limitation.&lt;/p&gt;

&lt;p&gt;So I decided to recreate a similar test locally.&lt;/p&gt;

&lt;p&gt;Setting up the 77 choices&lt;/p&gt;

&lt;p&gt;I used the 77 Banking77 intent names as the choices. Banking77 is a fine-grained banking intent dataset containing 77 categories, including things such as card_arrival, failed_transfer, request_refund, transaction_charged_twice, and verify_my_identity.&lt;/p&gt;

&lt;p&gt;For the experiment, I used a straightforward banking query:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight python&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;I&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;tried&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;to&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;make&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;bank&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;transfer&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;this&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;morning&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;The&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;transfer&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;failed&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;but&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;the&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;money&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;has&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;already&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;been&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;deducted&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;my&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;account&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;I then created a choice question containing all 77 categories.&lt;/p&gt;

&lt;p&gt;The code looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight python&quot;&gt;&lt;code&gt;&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;laya&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Router&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;router&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Router&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;state&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;
I tried to make a bank transfer this morning.
The transfer failed, but the money has already
been deducted from my account.
&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&quot;&quot;&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;intents&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;activate_my_card&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;activating a card&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;age_limit&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;age requirements&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;apple_pay_or_google_pay&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;using Apple Pay or Google Pay&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;atm_support&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;ATM support&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;automatic_top_up&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;automatic top up&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;balance_not_updated_after_bank_transfer&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;balance not updated after bank transfer&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;balance_not_updated_after_cheque_or_cash_deposit&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;balance not updated after cheque or cash deposit&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;beneficiary_not_allowed&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;beneficiary is not allowed&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;cancel_transfer&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;cancelling a transfer&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;card_about_to_expire&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;card is about to expire&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;card_acceptance&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;where a card is accepted&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;card_arrival&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;card arrival&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;card_delivery_estimate&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;estimated card delivery time&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;card_linking&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;linking a card&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;card_not_working&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;card not working&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;card_payment_fee_charged&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;fee charged for a card payment&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;card_payment_not_recognised&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;unrecognised card payment&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;card_payment_wrong_exchange_rate&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;wrong exchange rate for card payment&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;card_swallowed&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;card retained by an ATM&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;cash_withdrawal_charge&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;cash withdrawal charge&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;cash_withdrawal_not_recognised&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;unrecognised cash withdrawal&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;change_pin&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;changing PIN&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;compromised_card&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;compromised card&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;contactless_not_working&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;contactless not working&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;country_support&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;supported countries&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;declined_card_payment&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;declined card payment&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;declined_cash_withdrawal&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;declined cash withdrawal&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;declined_transfer&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;declined transfer&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;direct_debit_payment_not_recognised&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;unrecognised direct debit&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;disposable_card_limits&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;disposable card limits&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;edit_personal_details&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;editing personal details&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;exchange_charge&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;currency exchange charge&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;exchange_rate&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;exchange rate&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;exchange_via_app&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;exchanging currency through the app&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;extra_charge_on_statement&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;extra charge on statement&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;failed_transfer&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;failed bank transfer&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;fiat_currency_support&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;supported fiat currencies&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;get_disposable_virtual_card&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;getting a disposable virtual card&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;get_physical_card&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;getting a physical card&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;getting_spare_card&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;getting a spare card&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;getting_virtual_card&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;getting a virtual card&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;lost_or_stolen_card&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;lost or stolen card&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;lost_or_stolen_phone&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;lost or stolen phone&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;order_physical_card&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;ordering a physical card&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;passcode_forgotten&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;forgotten passcode&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;pending_card_payment&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;pending card payment&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;pending_cash_withdrawal&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;pending cash withdrawal&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;pending_top_up&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;pending top up&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;pending_transfer&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;pending transfer&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;pin_blocked&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;blocked PIN&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;receiving_money&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;receiving money&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;refund_not_showing_up&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;refund not showing up&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;request_refund&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;requesting a refund&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;reverted_card_payment&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;reverted card payment&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;supported_cards_and_currencies&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;supported cards and currencies&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;terminate_account&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;closing the account&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;top_up_by_bank_transfer_charge&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;charge for topping up by bank transfer&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;top_up_by_card_charge&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;charge for topping up by card&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;top_up_by_cash_or_cheque&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;topping up by cash or cheque&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;top_up_failed&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;failed top up&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;top_up_limits&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;top up limits&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;top_up_reverted&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;reverted top up&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;topping_up_by_card&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;topping up by card&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;transaction_charged_twice&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;transaction charged twice&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;transfer_fee_charged&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;fee charged for a transfer&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;transfer_into_account&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;transferring money into the account&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;transfer_not_received_by_recipient&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;recipient did not receive the transfer&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;transfer_timing&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;transfer timing&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;unable_to_verify_identity&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;unable to verify identity&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;verify_my_identity&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;identity verification&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;verify_source_of_funds&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;verifying source of funds&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;verify_top_up&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;top up verification&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;virtual_card_not_working&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;virtual card not working&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;visa_or_mastercard&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Visa or Mastercard&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;why_verify_identity&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;why identity verification is required&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;wrong_amount_of_cash_received&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;wrong amount of cash received&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;wrong_exchange_rate_for_cash_withdrawal&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;wrong exchange rate for cash withdrawal&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;questions&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;intent&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;choice&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;instructions&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;What is the main reason for this banking request?&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;criteria&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;intents&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;result&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;router&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;predict&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;state&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;questions&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;nf&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;h5&gt;
  &lt;a name=&quot;why-this-test-matters&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#why-this-test-matters&quot;&gt;
  &lt;/a&gt;
  Why this test matters
&lt;/h5&gt;

&lt;p&gt;This is very different from my earlier 12-choice experiment.&lt;/p&gt;

&lt;p&gt;With 77 options, the model has to distinguish between many closely related banking intents. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;failed_transfer
declined_transfer
pending_transfer
transfer_not_received_by_recipient
cancel_transfer
transfer_timing
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;These categories are much closer to each other than something obvious like card_arrival versus exchange_rate.&lt;/p&gt;

&lt;p&gt;The Laya documentation says this is where its default option budget becomes a real constraint. In the documented Banking77 comparison, Laya&#39;s 77-choice result was substantially lower than its performance on smaller choice sets, and the authors explain that the option descriptions can become too compressed within the fixed head budget.&lt;/p&gt;

&lt;p&gt;I ran the same command as before:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight shell&quot;&gt;&lt;code&gt;python test_laya.py

&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxd5bik1p4mpmful5t62s.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxd5bik1p4mpmful5t62s.png&quot; alt=&quot; &quot; loading=&quot;lazy&quot; width=&quot;800&quot; height=&quot;786&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The result surprised me&lt;/p&gt;

&lt;p&gt;Laya selected:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;failed_transfer
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;That was the category I would expect from this particular message.&lt;/p&gt;

&lt;p&gt;The probabilities were:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;failed_transfer   → 0.9753
declined_transfer → 0.0056
unable_to_verify_identity → 0.0191
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Most of the remaining categories were returned as 0.0 in this particular run.&lt;/p&gt;

&lt;p&gt;The reported values were:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;confidence: 0.9703
answer_confidence: 0.9753
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;The input contained 350 tokens, while the output was again:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;output_tokens: 0
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;So even with 77 possible choices, Laya still didn&#39;t generate any text.&lt;/p&gt;

&lt;h5&gt;
  &lt;a name=&quot;what-this-test-showed-me&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#what-this-test-showed-me&quot;&gt;
  &lt;/a&gt;
  What this test showed me
&lt;/h5&gt;

&lt;p&gt;I expected the larger choice set to make the result obviously worse, but that didn&#39;t happen with this particular example.&lt;/p&gt;

&lt;p&gt;Laya still selected the correct-looking category and put most of the probability on it.&lt;/p&gt;

&lt;p&gt;However, this doesn&#39;t mean that Laya solves 77-choice classification reliably in general.&lt;/p&gt;

&lt;p&gt;The reason is that this was one manually constructed test. The official project benchmarks report a much more difficult Banking77 evaluation where the model&#39;s performance drops substantially with a large number of options. The project explains that the option descriptions have to share a limited token budget, which becomes increasingly restrictive as the number of choices grows.&lt;/p&gt;

&lt;p&gt;So my local experiment gave me one useful result:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;77 choices did not break the model on this example.&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
But it is not enough to claim that Laya performs well across a full 77-class benchmark.&lt;/p&gt;

&lt;p&gt;That&#39;s an important distinction, especially when writing about model experiments.&lt;/p&gt;
&lt;h5&gt;
  &lt;a name=&quot;another-thing-i-noticed&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#another-thing-i-noticed&quot;&gt;
  &lt;/a&gt;
  Another thing I noticed
&lt;/h5&gt;

&lt;p&gt;The runtime continued to display the same temperature warning:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight python&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;this&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;checkpoint&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ships&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;invalid&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;temperatures&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;...&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;Treat&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;confidence&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;the&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;affected&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;entries&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;uncalibrated&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;So again, I&#39;m treating the probabilities as the output of this particular run, not as a guarantee of real-world accuracy.&lt;/p&gt;

&lt;p&gt;At this point, I had a much better idea of how Laya behaves with different input sizes and different numbers of choices.&lt;/p&gt;

&lt;h4&gt;
  &lt;a name=&quot;step-14-running-laya-in-preload-mode&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#step-14-running-laya-in-preload-mode&quot;&gt;
  &lt;/a&gt;
  Step 14: Running Laya in Preload Mode
&lt;/h4&gt;

&lt;p&gt;Up to this point, I had been using the default Router:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight python&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;router&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Router&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;With that setup, Laya loads a checkpoint when it is needed. That works well when you&#39;re experimenting because you don&#39;t have to load every model into memory at startup.&lt;/p&gt;

&lt;p&gt;For the next test, I wanted to try a different approach.&lt;/p&gt;

&lt;p&gt;Laya also supports preloading, which means the checkpoints are loaded when the Router starts.&lt;/p&gt;

&lt;p&gt;I changed my code to:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight python&quot;&gt;&lt;code&gt;&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;laya&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Router&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;router&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Router&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;preload&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;True&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;state&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;
I tried to make a bank transfer this morning.
The transfer failed, but the money has already
been deducted from my account.
&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&quot;&quot;&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;questions&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;intent&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;choice&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;instructions&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;What is the main reason for this banking request?&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;criteria&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;card_payment&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;problem with a card payment&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;cash_withdrawal&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;problem withdrawing cash&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;bank_transfer&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;problem with a bank transfer&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;refund&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;asking for a refund&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;account_access&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;cannot access the account&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;verification&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;identity or account verification problem&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;subscription&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;subscription or recurring payment problem&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;fees&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;question about fees or charges&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;exchange_rate&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;question about currency exchange rates&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;card_delivery&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;problem with card delivery&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;cash_deposit&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;problem depositing cash&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;other&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;something not covered by the other categories&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;result&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;router&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;predict&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;state&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;questions&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;nf&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Selected intent:&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;answers&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;][&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;intent&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;][&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;choice&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Probabilities:&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;answers&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;][&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;intent&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;][&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;probabilities&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Confidence:&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;answers&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;][&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;intent&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;][&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;confidence&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Routing model:&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;routing&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;][&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;model&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Routing reason:&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;routing&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;][&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;reason&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Input tokens:&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;usage&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;][&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;input_tokens&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Output tokens:&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;usage&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;][&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;output_tokens&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;I then ran:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight shell&quot;&gt;&lt;code&gt;python test_laya.py

&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fttav2y3elrrpvt0ptui6.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fttav2y3elrrpvt0ptui6.png&quot; alt=&quot; &quot; loading=&quot;lazy&quot; width=&quot;800&quot; height=&quot;786&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The result&lt;/p&gt;

&lt;p&gt;The prediction was:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;Selected intent: failed_transfer

&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Laya assigned:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;failed_transfer → 0.9753
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;The other notable probabilities were:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;declined_transfer          → 0.0056
unable_to_verify_identity  → 0.0191
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;The reported confidence was:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;0.9703
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;The request contained 350 input tokens, while the output was again:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;Output tokens: 0
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;The Router also selected:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;Routing model: english
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;with the reason:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;
English Latin text
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;h5&gt;
  &lt;a name=&quot;something-else-i-noticed&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#something-else-i-noticed&quot;&gt;
  &lt;/a&gt;
  Something else I noticed
&lt;/h5&gt;

&lt;p&gt;This time, the terminal didn&#39;t download the model again.&lt;/p&gt;

&lt;p&gt;The fetching step showed:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;5/5
00:00
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;and the download/reconstruction both reported 0.00B.&lt;/p&gt;

&lt;p&gt;That makes sense because the checkpoint had already been downloaded during my earlier experiments. Laya was using the cached files instead of downloading another copy.&lt;/p&gt;

&lt;h5&gt;
  &lt;a name=&quot;what-does-preload-actually-change&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#what-does-preload-actually-change&quot;&gt;
  &lt;/a&gt;
  What does preload actually change?
&lt;/h5&gt;

&lt;p&gt;The important thing to understand is that preload=True doesn&#39;t change the kind of answer Laya produces. It changes how the model is prepared for inference.&lt;/p&gt;

&lt;p&gt;With the normal setup:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;Request
   ↓
Load checkpoint if needed
   ↓
Prediction
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;With preload enabled:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;Application starts
       ↓
Checkpoint(s) loaded
       ↓
Request arrives
       ↓
Prediction
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;That makes more sense for something that is going to stay running, such as a local API, a support-ticket classifier, or another application making repeated decisions.&lt;/p&gt;

&lt;p&gt;There is a trade-off, though. Keeping models ready means using more memory. So preload mode is more useful when the machine has enough RAM to keep the required checkpoints resident.&lt;/p&gt;

&lt;p&gt;For my Mac mini, the interesting thing was that Laya was already operating in a completely different memory class from the large language models I normally experiment with.&lt;/p&gt;

&lt;p&gt;I didn&#39;t measure the exact RAM usage in this run, so I&#39;m not going to make up a number. What I can confirm is that the preloaded setup ran successfully on my M4 Mac mini with 16GB unified memory.&lt;/p&gt;

&lt;p&gt;And at this point, I had tested Laya with short text, long text, multiple decisions, Hindi input, and a wide choice set.&lt;/p&gt;

&lt;h4&gt;
  &lt;a name=&quot;step-15-checking-layas-storage-and-memory-usage&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#step-15-checking-layas-storage-and-memory-usage&quot;&gt;
  &lt;/a&gt;
  Step 15: Checking Laya&#39;s Storage and Memory Usage
&lt;/h4&gt;

&lt;p&gt;After running several different tests, I wanted to check something more practical.&lt;/p&gt;

&lt;p&gt;I already knew the model files were relatively small, but I wanted to see what they actually looked like on my Mac rather than relying only on the numbers from the model page.&lt;/p&gt;

&lt;p&gt;There are two different things to measure here:&lt;/p&gt;

&lt;p&gt;Storage — how much space the downloaded checkpoints occupy on the SSD.&lt;/p&gt;

&lt;p&gt;Memory — how much RAM the Python process needs while Laya is running.&lt;/p&gt;

&lt;p&gt;These are easy to confuse, because an 800 MB model file does not necessarily mean the application will use exactly 800 MB of memory.&lt;/p&gt;

&lt;h5&gt;
  &lt;a name=&quot;checking-the-laya-cache-size&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#checking-the-laya-cache-size&quot;&gt;
  &lt;/a&gt;
  Checking the Laya cache size
&lt;/h5&gt;

&lt;p&gt;Hugging Face keeps downloaded model files in its local cache. I checked the cache with:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;du -sh ~/.cache/huggingface/hub
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;To look specifically for Laya models:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight shell&quot;&gt;&lt;code&gt;&lt;span class=&quot;nb&quot;&gt;du&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-sh&lt;/span&gt; ~/.cache/huggingface/hub/models--convaiinnovations--&lt;span class=&quot;k&quot;&gt;*&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Depending on how the cache is configured on the Mac, the files may be stored in a different location. You can check that with:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight shell&quot;&gt;&lt;code&gt;&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$HF_HOME&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F94l1jmwbg4ode0kiv9zf.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F94l1jmwbg4ode0kiv9zf.png&quot; alt=&quot; &quot; loading=&quot;lazy&quot; width=&quot;800&quot; height=&quot;247&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If nothing is printed, the standard Hugging Face cache location is normally used.&lt;/p&gt;

&lt;h4&gt;
  &lt;a name=&quot;checking-memory-usage&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#checking-memory-usage&quot;&gt;
  &lt;/a&gt;
  Checking memory usage
&lt;/h4&gt;

&lt;p&gt;For the memory side, I used macOS&#39;s built-in /usr/bin/time utility.&lt;/p&gt;

&lt;p&gt;Instead of:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight shell&quot;&gt;&lt;code&gt;python test_laya.py
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;I ran:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight shell&quot;&gt;&lt;code&gt;/usr/bin/time &lt;span class=&quot;nt&quot;&gt;-l&lt;/span&gt; python test_laya.py
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;At the end of the output, macOS reports:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight shell&quot;&gt;&lt;code&gt;maximum resident &lt;span class=&quot;nb&quot;&gt;set &lt;/span&gt;size
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcfhi4kest2fq7becdwgw.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcfhi4kest2fq7becdwgw.png&quot; alt=&quot; &quot; loading=&quot;lazy&quot; width=&quot;800&quot; height=&quot;1426&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That gives me the peak memory used by the Python process during the run.&lt;/p&gt;

&lt;p&gt;This is a much more useful number for my blog than simply saying:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;“The model is 846 MB.”&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
The model file and the actual runtime memory are two different measurements.&lt;/p&gt;
&lt;h4&gt;
  &lt;a name=&quot;step-16-putting-laya-behind-a-gradio-interface&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#step-16-putting-laya-behind-a-gradio-interface&quot;&gt;
  &lt;/a&gt;
  Step 16: Putting Laya Behind a Gradio Interface
&lt;/h4&gt;

&lt;p&gt;After testing Laya from the terminal, I wanted to make the experiment a little more practical.&lt;/p&gt;

&lt;p&gt;Running a Python script every time works, but I wanted a small interface where I could paste a customer message, click a button, and immediately see what Laya thinks about it.&lt;/p&gt;

&lt;p&gt;So I added Gradio on top of the same Laya code.&lt;/p&gt;

&lt;p&gt;The flow now looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;Browser
   ↓
Gradio
   ↓
Laya Router
   ↓
Structured decisions
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;I kept the interface simple. I wanted to see the department, refund request, churn risk, routing information, and token usage without having to read a large JSON response every time.&lt;/p&gt;

&lt;p&gt;Gradio is a simple way to do that.&lt;/p&gt;

&lt;h5&gt;
  &lt;a name=&quot;install-gradio&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#install-gradio&quot;&gt;
  &lt;/a&gt;
  Install Gradio
&lt;/h5&gt;

&lt;p&gt;Inside the same virtual environment:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;python -m pip install gradio
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fawbntshou3t6mwck2hzv.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fawbntshou3t6mwck2hzv.png&quot; alt=&quot; &quot; loading=&quot;lazy&quot; width=&quot;800&quot; height=&quot;626&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h5&gt;
  &lt;a name=&quot;create-the-ui&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#create-the-ui&quot;&gt;
  &lt;/a&gt;
  Create the UI
&lt;/h5&gt;

&lt;p&gt;Create another file:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight shell&quot;&gt;&lt;code&gt;&lt;span class=&quot;nb&quot;&gt;touch &lt;/span&gt;app.py
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Then open it:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight shell&quot;&gt;&lt;code&gt;nano app.py
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fus8pdmvjreyut8gnygrb.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fus8pdmvjreyut8gnygrb.png&quot; alt=&quot; &quot; loading=&quot;lazy&quot; width=&quot;800&quot; height=&quot;495&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Add this:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight python&quot;&gt;&lt;code&gt;&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;gradio&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;gr&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;laya&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Router&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;# Load Laya once when the app starts
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;router&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Router&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;preload&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;True&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;


&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;predict&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;strip&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;():&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Please enter some text.&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;n&quot;&gt;questions&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;department&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;choice&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;instructions&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Which department should handle this?&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;criteria&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;billing&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;invoices, payments, refunds&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;technical&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;bugs, outages, system errors&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;other&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;everything else&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;refund_requested&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;noul&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;instructions&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Does the user explicitly request a refund?&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;churn_risk&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;noul&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;instructions&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Does the user threaten to cancel or leave?&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;n&quot;&gt;result&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;router&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;predict&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;questions&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;department&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;answers&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;][&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;department&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;refund_requested&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;answers&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;][&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;refund_requested&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;churn_risk&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;answers&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;][&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;churn_risk&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;routing&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;routing&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;usage&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;usage&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;


&lt;span class=&quot;k&quot;&gt;with&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;gr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Blocks&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Laya Decision Demo&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;demo&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;gr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Markdown&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;# Laya Decision Demo&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;gr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Markdown&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Enter a message and let Laya make structured decisions.&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

    &lt;span class=&quot;n&quot;&gt;text_input&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;gr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Textbox&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;label&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Input&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;placeholder&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Example: I was charged twice and want a refund.&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;lines&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;6&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

    &lt;span class=&quot;n&quot;&gt;run_button&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;gr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Button&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Run Laya&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

    &lt;span class=&quot;n&quot;&gt;output&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;gr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;JSON&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;label&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Laya Result&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

    &lt;span class=&quot;n&quot;&gt;run_button&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;click&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;fn&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;predict&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;inputs&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;text_input&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;outputs&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;output&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;


&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;__name__&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;__main__&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;demo&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;launch&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffanb86d3oughwbaggzxu.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffanb86d3oughwbaggzxu.png&quot; alt=&quot; &quot; loading=&quot;lazy&quot; width=&quot;800&quot; height=&quot;1555&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h5&gt;
  &lt;a name=&quot;run-the-interface&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#run-the-interface&quot;&gt;
  &lt;/a&gt;
  Run the interface
&lt;/h5&gt;

&lt;p&gt;Now start it with:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight shell&quot;&gt;&lt;code&gt;python app.py
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Gradio will start a local web server and give you a local URL, typically something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;http://127.0.0.1:7860
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flcx9xw9iunx9sxu08vr5.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flcx9xw9iunx9sxu08vr5.png&quot; alt=&quot; &quot; loading=&quot;lazy&quot; width=&quot;799&quot; height=&quot;523&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Open that URL in your browser.&lt;/p&gt;

&lt;p&gt;You&#39;ll get a simple interface where you can enter something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;Hi, I was charged twice for my March subscription.
Please refund the duplicate payment.

&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;and click:&lt;/p&gt;

&lt;p&gt;Run Laya&lt;/p&gt;

&lt;p&gt;The UI will then show the structured result returned by Laya.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frql6dhxmbm1lktu0omwq.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frql6dhxmbm1lktu0omwq.png&quot; alt=&quot; &quot; loading=&quot;lazy&quot; width=&quot;800&quot; height=&quot;442&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h5&gt;
  &lt;a name=&quot;the-result&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#the-result&quot;&gt;
  &lt;/a&gt;
  The result
&lt;/h5&gt;

&lt;p&gt;For one of my tests, I entered a customer-support message and got this result:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;Department: billing
Refund requested: 0.8829
Churn risk: 0.0916
Model: english
Input tokens: 161
Output tokens: 0
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;The department probabilities were:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;billing   → 0.9637
technical → 0.0185
other     → 0.0178
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;The refund decision returned:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;0.8829
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;And the churn-risk value was:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;0.0916
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;One thing I found particularly interesting was the token count:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;input_tokens: 161
output_tokens: 0
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Again, Laya wasn&#39;t generating a paragraph in response to my input. The interface was simply displaying the structured decisions produced by the model.&lt;/p&gt;

&lt;p&gt;The Router also identified the input as English:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;model: english
reason: English Latin text

&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;h4&gt;
  &lt;a name=&quot;step-17-what-the-benchmarks-say&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#step-17-what-the-benchmarks-say&quot;&gt;
  &lt;/a&gt;
  Step 17: What the Benchmarks Say
&lt;/h4&gt;

&lt;p&gt;After playing with Laya locally, I wanted to look beyond my own small experiments and see how the different checkpoints perform on larger benchmark runs.&lt;/p&gt;

&lt;p&gt;The project currently has three checkpoints:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;| Checkpoint               | Parameters |            Context | Main use                 |
| ------------------------ | ---------: | -----------------: | ------------------------ |
| `convaiinnovations/laya` |       421M |                512 | English                  |
| `laya-multilingual`      |       322M | 1,024, up to 8,192 | 100+ languages           |
| `laya-typed-decisions`   |       421M |              1,024 | Typed decision workflows |

&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;The first thing that stands out is how small these models are.&lt;/p&gt;

&lt;p&gt;The main Laya checkpoint is only 421 million parameters, and the multilingual version is even smaller at 322 million. That&#39;s a very different scale from the multi-billion-parameter models I normally think about when talking about local AI.&lt;/p&gt;

&lt;h5&gt;
  &lt;a name=&quot;accuracy&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#accuracy&quot;&gt;
  &lt;/a&gt;
  Accuracy
&lt;/h5&gt;

&lt;p&gt;The project&#39;s benchmark runs on a Tesla T4 show a few interesting numbers.&lt;/p&gt;

&lt;p&gt;For typed decisions, the fine-tuned laya-typed-decisions checkpoint reached 0.766 accuracy across 2,000 decisions.&lt;/p&gt;

&lt;p&gt;The base English and multilingual checkpoints were much lower on this particular benchmark:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;laya                  → 0.362
laya-multilingual     → 0.342
laya-typed-decisions  → 0.766
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;That difference is important.&lt;/p&gt;

&lt;p&gt;It tells me that the impressive 0.766 number shouldn&#39;t be interpreted as what the base Laya model does out of the box. The result comes from a checkpoint that was specifically fine-tuned for those typed-decision workflows.&lt;/p&gt;

&lt;p&gt;That&#39;s actually one of the more useful lessons from the benchmarks: fine-tuning matters a lot for this kind of model.&lt;/p&gt;

&lt;h5&gt;
  &lt;a name=&quot;speed&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#speed&quot;&gt;
  &lt;/a&gt;
  Speed
&lt;/h5&gt;

&lt;p&gt;The speed numbers are also interesting.&lt;/p&gt;

&lt;p&gt;On a Tesla T4, the project reports:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;| Questions in one call |     Laya | Multilingual |
| --------------------: | -------: | -----------: |
|                     1 |  39.5 ms |      32.8 ms |
|                     5 |  84.5 ms |      40.1 ms |
|                    10 | 158.6 ms |      72.3 ms |
|                    50 |   771 ms |       337 ms |

&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Because multiple questions can be answered in one forward pass, the cost per question drops as the batch gets larger.&lt;/p&gt;

&lt;p&gt;For example, the multilingual checkpoint reaches about 7.2 ms per question when 10 questions are processed together.&lt;/p&gt;

&lt;p&gt;That&#39;s one of the places where the smaller decision-oriented architecture starts to make sense.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7bquvcjlbh0i3zjh01pa.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7bquvcjlbh0i3zjh01pa.png&quot; alt=&quot; &quot; loading=&quot;lazy&quot; width=&quot;800&quot; height=&quot;683&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Laya benchmark results across accuracy, latency, calibration, multilingual performance, and application workflows.&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;
&lt;h4&gt;
  &lt;a name=&quot;step-18-what-about-long-documents&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#step-18-what-about-long-documents&quot;&gt;
  &lt;/a&gt;
  Step 18: What About Long Documents?
&lt;/h4&gt;

&lt;p&gt;One of the things I was particularly interested in was how Laya behaves when the input gets much longer.&lt;/p&gt;

&lt;p&gt;The multilingual checkpoint can be configured with:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;max_len=8192
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;The project&#39;s long-context experiment placed the request at the end of documents with different amounts of unrelated text before it.&lt;/p&gt;

&lt;p&gt;The results were:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;| Text before request | Correct | Time per request |
| ------------------- | ------: | ---------------: |
| Short input         | 19 / 20 |           0.02 s |
| ~1,000 tokens       | 16 / 20 |           0.21 s |
| ~2,000 tokens       | 17 / 20 |           0.50 s |
| ~3,000 tokens       | 17 / 20 |           0.90 s |
| ~4,000 tokens       | 18 / 20 |           1.71 s |
| ~5,000 tokens       | 11 / 20 |           2.59 s |
| ~6,000 tokens       | 17 / 20 |           3.50 s |
| ~7,000 tokens       |  8 / 20 |           4.50 s |

&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;The results aren&#39;t perfectly smooth, but they show the basic trade-off clearly: longer context costs more time, and accuracy can become more variable as the document gets very long.&lt;/p&gt;

&lt;p&gt;That matches what I saw in my own test earlier. My 751-token support ticket worked without any issue, but that doesn&#39;t mean I should throw an enormous document at the model and expect the same behavior.&lt;/p&gt;

&lt;p&gt;For a real application, I would test the exact input lengths and document types I care about.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fiqf04oocvxhgc1oy0ab8.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fiqf04oocvxhgc1oy0ab8.png&quot; alt=&quot; &quot; loading=&quot;lazy&quot; width=&quot;800&quot; height=&quot;441&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Long-context test for laya-multilingual with requests placed at different positions inside longer documents.&lt;/code&gt;&lt;/p&gt;

&lt;h4&gt;
  &lt;a name=&quot;step-19-where-laya-does-well-and-where-it-doesnt&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#step-19-where-laya-does-well-and-where-it-doesnt&quot;&gt;
  &lt;/a&gt;
  Step 19: Where Laya Does Well — and Where It Doesn&#39;t
&lt;/h4&gt;

&lt;p&gt;After all the experiments, I think the most useful way to look at Laya is not as a replacement for a large language model.&lt;/p&gt;

&lt;p&gt;It&#39;s a different tool.&lt;/p&gt;

&lt;p&gt;The project reports strong results on some tasks. For example, its benchmark suite reports around 0.993 accuracy for email spam and phishing on the tested data, while several other workflows are considerably weaker.&lt;/p&gt;

&lt;p&gt;The same benchmark also shows an important limitation with large choice sets.&lt;/p&gt;

&lt;p&gt;On Banking77, which has 77 labels, the benchmark reports:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;Laya → 0.425
TypeSafe Jev → 0.870
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;The project attributes Laya&#39;s result to the way the available token budget is shared across the many option descriptions.&lt;/p&gt;

&lt;p&gt;That matches something I started noticing during my own experiments: three or twelve choices are very different from seventy-seven choices.&lt;/p&gt;

&lt;p&gt;So I wouldn&#39;t design a system around hundreds of labels in one giant choice question without testing it carefully.&lt;/p&gt;

&lt;p&gt;There are a few other things I would keep in mind too.&lt;/p&gt;

&lt;p&gt;The base checkpoints are not automatically excellent at every zero-shot decision task. The model&#39;s probability outputs can also require calibration, and some decision types perform better than others.&lt;/p&gt;

&lt;p&gt;For me, that&#39;s actually a positive part of the project rather than something to hide.&lt;/p&gt;

&lt;p&gt;The documentation is fairly open about where the model works and where it needs more care.&lt;/p&gt;

&lt;h4&gt;
  &lt;a name=&quot;step-20-laya-vs-a-traditional-llm&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#step-20-laya-vs-a-traditional-llm&quot;&gt;
  &lt;/a&gt;
  Step 20: Laya vs. a Traditional LLM
&lt;/h4&gt;

&lt;p&gt;After running all these tests, this is the comparison that makes the most sense to me.&lt;/p&gt;

&lt;p&gt;A traditional LLM generally looks like:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;Input
  ↓
Large language model
  ↓
Generate tokens
  ↓
Text response
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Laya looks more like:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;Input
  ↓
Laya
  ↓
Typed decision
  ↓
Probability
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;That&#39;s a much narrower job.&lt;/p&gt;

&lt;p&gt;I wouldn&#39;t use Laya to write a blog post, generate code, summarize a long meeting, or have a conversation.&lt;/p&gt;

&lt;p&gt;But I could imagine using something like Laya for the smaller decisions that happen around those tasks.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;User request
      ↓
     Laya
      ↓
  Is this relevant?
      ↓
  Is it urgent?
      ↓
 Which workflow?
      ↓
    LLM / Tool
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;In other words, the interesting idea isn&#39;t:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;“Laya can replace my LLM.”&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;For me, it&#39;s:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;“Maybe my LLM doesn&#39;t need to make every decision.”&lt;/code&gt;&lt;/p&gt;

&lt;h4&gt;
  &lt;a name=&quot;step-21-what-i-took-away-from-this-experiment&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#step-21-what-i-took-away-from-this-experiment&quot;&gt;
  &lt;/a&gt;
  Step 21: What I Took Away From This Experiment
&lt;/h4&gt;

&lt;p&gt;I started this experiment because Laya looked unusual.&lt;/p&gt;

&lt;p&gt;Most of the local models I come across are trying to become better at generation: better coding, better reasoning, better conversations, better multimodal capabilities.&lt;/p&gt;

&lt;p&gt;Laya went in a different direction.&lt;/p&gt;

&lt;p&gt;It takes a relatively small model, gives it a structured decision problem, and focuses on making that decision quickly.&lt;/p&gt;

&lt;p&gt;I tested it on my M4 Mac mini, ran the English checkpoint, switched to the multilingual model with Hindi input, asked multiple questions against the same text, tried a longer support ticket, increased the number of choices, and finally put the whole thing behind a small Gradio interface.&lt;/p&gt;

&lt;p&gt;What surprised me most was how little infrastructure was needed to get from zero to a working local demo.&lt;/p&gt;

&lt;p&gt;I didn&#39;t need a giant GPU server.&lt;/p&gt;

&lt;p&gt;I didn&#39;t need an API key for inference.&lt;/p&gt;

&lt;p&gt;I didn&#39;t need to run a multi-billion-parameter model.&lt;/p&gt;

&lt;p&gt;I just installed the package, downloaded the checkpoint, and started asking it structured questions.&lt;/p&gt;

&lt;h3&gt;
  &lt;a name=&quot;conclusion&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#conclusion&quot;&gt;
  &lt;/a&gt;
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Maybe Every AI System Doesn&#39;t Need One Giant Model&lt;/p&gt;

&lt;p&gt;After spending so much time experimenting with large language models, I found Laya refreshing simply because it isn&#39;t trying to be one.&lt;/p&gt;

&lt;p&gt;It doesn&#39;t generate a long answer.&lt;/p&gt;

&lt;p&gt;It doesn&#39;t try to write code.&lt;/p&gt;

&lt;p&gt;It doesn&#39;t try to become a chatbot.&lt;/p&gt;

&lt;p&gt;It makes decisions.&lt;/p&gt;

&lt;p&gt;Running a 421M-parameter model locally on my M4 Mac mini made that idea feel much more practical to me.&lt;/p&gt;

&lt;p&gt;For something like customer-support routing, moderation, classification, guardrails, or other structured decisions, using a smaller specialized model can make more sense than sending every single request through a large generative model.&lt;/p&gt;

&lt;p&gt;At the same time, my experiments also showed that Laya isn&#39;t magic. Its performance depends heavily on the task, the number of choices, the input size, and whether the model has been fine-tuned for the problem. The confidence values also need to be treated carefully rather than taken as guaranteed accuracy.&lt;/p&gt;

&lt;p&gt;So I wouldn&#39;t look at Laya and ask:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;“Is this the next replacement for Llama or Qwen?”

&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;That&#39;s the wrong comparison.&lt;/p&gt;

&lt;p&gt;The more interesting question for me is:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;What if we stop expecting one model to do everything?

&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;A large language model can handle generation and reasoning.&lt;/p&gt;

&lt;p&gt;A small decision model can handle a narrow decision.&lt;/p&gt;

&lt;p&gt;A routing model can decide which path to take.&lt;/p&gt;

&lt;p&gt;And an application can combine all of them.&lt;/p&gt;

&lt;p&gt;That feels like a much more interesting direction for local AI.&lt;/p&gt;

&lt;p&gt;Laya may be small, but the idea behind it is much bigger: sometimes the best model for a job isn&#39;t the model that can do everything — it&#39;s the one designed to do that one job well.&lt;/p&gt;

&lt;h3&gt;
  &lt;a name=&quot;thank-you-so-much-for-reading&quot; href=&quot;https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af#thank-you-so-much-for-reading&quot;&gt;
  &lt;/a&gt;
  Thank you so much for reading
&lt;/h3&gt;

&lt;p&gt;Like | Follow | Subscribe to the newsletter.&lt;/p&gt;

&lt;p&gt;Connect with me on: &lt;/p&gt;

&lt;p&gt;GitHub: &lt;a href=&quot;https://github.com/Ayush7614&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;https://github.com/Ayush7614&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;LinkedIn: &lt;a href=&quot;https://www.linkedin.com/in/ayush-kumar-984443191/&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;https://www.linkedin.com/in/ayush-kumar-984443191/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Twitter: &lt;a href=&quot;https://x.com/AYUSHKUMAR82274&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;https://x.com/AYUSHKUMAR82274&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Substack: &lt;a href=&quot;https://substack.com/@felixayush&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;https://substack.com/@felixayush&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Dev.to Blog: &lt;a href=&quot;https://dev.to/ayush7614&quot;&gt;https://dev.to/ayush7614&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Personal Blog: &lt;a href=&quot;https://neural-verse-peach.vercel.app/&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;https://neural-verse-peach.vercel.app/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Website: &lt;a href=&quot;https://ayushbuilds-dev.vercel.app/&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;https://ayushbuilds-dev.vercel.app/&lt;/a&gt;&lt;/p&gt;


            </description><link>https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af</link><guid isPermaLink="false">https://dev.to/ayush7614/not-another-llm-i-tried-laya-a-421m-parameter-ai-decision-engine-6af</guid><pubDate>Fri, 25 Sep 2026 11:42:47 GMT</pubDate><author>Ayush kumar</author><enclosure url="https://media2.dev.to/dynamic/image/width=1000,height=420,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyjjwomp895zxst4vlhez.png" type="image/jpeg"></enclosure><category>laya</category><category>aimodel</category><category>opensource</category><category>ai</category></item><item><title>KDE Plasma crashes after system update on Kubuntu 26.04: fontconfig race condition fix</title><description>&lt;p&gt;Last week I updated a Kubuntu 26.04 LTS workstation and came back to a broken desktop. KDE Plasma would start, the desktop would flash for a second, then disappear. plasmashell kept crashing in a loop. The machine was otherwise fine: Konsole worked, Firefox worked, Thunderbird worked, the system was responsive. Just no desktop.&lt;/p&gt;

&lt;p&gt;This is what I found and how I fixed it permanently.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;what-was-happening&quot; href=&quot;https://dev.to/zerolock/kde-plasma-crashes-after-system-update-on-kubuntu-2604-fontconfig-race-condition-fix-2ebm#what-was-happening&quot;&gt;
  &lt;/a&gt;
  What was happening
&lt;/h2&gt;

&lt;p&gt;The crash was a SIGSEGV in plasmashell, repeating every few seconds with &lt;code&gt;Failed with result &#39;core-dump&#39;&lt;/code&gt; in the service logs. After digging into the stack trace, the culprit was fontconfig.&lt;/p&gt;

&lt;p&gt;The root cause is a race condition at login. When you log in after a system update that touches font packages, plasmashell starts reading the font cache at the same time something else triggers its regeneration. fontconfig ends up writing a new cache while plasmashell is already reading the old one, which causes a segfault inside &lt;code&gt;FcCharSetHasChar&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;It is a timing issue, which is why it does not happen on every update and why a simple restart sometimes appears to fix it temporarily.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;diagnosing&quot; href=&quot;https://dev.to/zerolock/kde-plasma-crashes-after-system-update-on-kubuntu-2604-fontconfig-race-condition-fix-2ebm#diagnosing&quot;&gt;
  &lt;/a&gt;
  Diagnosing
&lt;/h2&gt;

&lt;p&gt;Before touching anything, confirm the crash is what I described:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight shell&quot;&gt;&lt;code&gt;coredumpctl list &lt;span class=&quot;nt&quot;&gt;--since&lt;/span&gt; today &lt;span class=&quot;nt&quot;&gt;--no-pager&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;You should see plasmashell crashes. Then read the stack:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight shell&quot;&gt;&lt;code&gt;coredumpctl info plasmashell &lt;span class=&quot;nt&quot;&gt;--no-pager&lt;/span&gt; | &lt;span class=&quot;nb&quot;&gt;grep&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-A40&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Stack trace of thread&quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Look for &lt;code&gt;FcCharSetHasChar&lt;/code&gt; in the trace. If it is there, you have the same issue.&lt;/p&gt;

&lt;p&gt;Also worth checking the session log:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight shell&quot;&gt;&lt;code&gt;journalctl &lt;span class=&quot;nt&quot;&gt;--user&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-b&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;--no-pager&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-p&lt;/span&gt; warning | &lt;span class=&quot;nb&quot;&gt;grep&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-iE&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;plasmashell|fontconfig&quot;&lt;/span&gt; | &lt;span class=&quot;nb&quot;&gt;tail&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-20&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;h2&gt;
  &lt;a name=&quot;temporary-fix&quot; href=&quot;https://dev.to/zerolock/kde-plasma-crashes-after-system-update-on-kubuntu-2604-fontconfig-race-condition-fix-2ebm#temporary-fix&quot;&gt;
  &lt;/a&gt;
  Temporary fix
&lt;/h2&gt;

&lt;p&gt;This gets the desktop back immediately without a reboot:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight shell&quot;&gt;&lt;code&gt;&lt;span class=&quot;nb&quot;&gt;rm&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-rf&lt;/span&gt; ~/.cache/fontconfig
&lt;span class=&quot;nb&quot;&gt;sudo rm&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-rf&lt;/span&gt; /var/cache/fontconfig/&lt;span class=&quot;k&quot;&gt;*&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;fc-cache &lt;span class=&quot;nt&quot;&gt;-r&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-f&lt;/span&gt;
fc-cache &lt;span class=&quot;nt&quot;&gt;-r&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-f&lt;/span&gt;
systemctl &lt;span class=&quot;nt&quot;&gt;--user&lt;/span&gt; reset-failed plasma-plasmashell
systemctl &lt;span class=&quot;nt&quot;&gt;--user&lt;/span&gt; restart plasma-plasmashell
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;The desktop should come back within a few seconds. This works until the next reboot, at which point the race condition can happen again.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;permanent-fix&quot; href=&quot;https://dev.to/zerolock/kde-plasma-crashes-after-system-update-on-kubuntu-2604-fontconfig-race-condition-fix-2ebm#permanent-fix&quot;&gt;
  &lt;/a&gt;
  Permanent fix
&lt;/h2&gt;

&lt;p&gt;The real solution is to force a font cache regeneration before plasmashell starts. You do this with a systemd drop-in that adds an ExecStartPre directive to the plasmashell service:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight shell&quot;&gt;&lt;code&gt;&lt;span class=&quot;nb&quot;&gt;mkdir&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-p&lt;/span&gt; ~/.config/systemd/user/plasma-plasmashell.service.d
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Then create the drop-in file:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight shell&quot;&gt;&lt;code&gt;&lt;span class=&quot;nb&quot;&gt;cat&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; ~/.config/systemd/user/plasma-plasmashell.service.d/fontcache.conf &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&#39;&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;EOF&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&#39;
[Service]
ExecStartPre=/usr/bin/fc-cache -f
&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;EOF
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Reload systemd and reboot:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight shell&quot;&gt;&lt;code&gt;systemctl &lt;span class=&quot;nt&quot;&gt;--user&lt;/span&gt; daemon-reload
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;reboot
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;After login, verify it worked:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight shell&quot;&gt;&lt;code&gt;systemctl &lt;span class=&quot;nt&quot;&gt;--user&lt;/span&gt; status plasma-plasmashell | &lt;span class=&quot;nb&quot;&gt;head&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-10&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;You want to see this in the output:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight systemd&quot;&gt;&lt;code&gt;&lt;span class=&quot;nt&quot;&gt;Process: ExecStartPre&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;=&lt;/span&gt;/usr/bin/fc-cache -f (code=exited, status=0/SUCCESS)
&lt;span class=&quot;err&quot;&gt;Active:&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;active&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;(running)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;If you see that, the drop-in is working and the font cache is being regenerated before plasmashell touches it on every boot.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;why-this-works&quot; href=&quot;https://dev.to/zerolock/kde-plasma-crashes-after-system-update-on-kubuntu-2604-fontconfig-race-condition-fix-2ebm#why-this-works&quot;&gt;
  &lt;/a&gt;
  Why this works
&lt;/h2&gt;

&lt;p&gt;The systemd drop-in ensures fc-cache completes before plasmashell starts. No race, no partial file reads, no segfault. It adds a second or two to login time, which is a reasonable trade for a stable desktop.&lt;/p&gt;

&lt;p&gt;The drop-in survives updates because it lives in your user config directory, not in the system service file. If a future KDE or fontconfig update changes the timing behavior, you can simply remove the drop-in and check if the issue is gone.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;environment&quot; href=&quot;https://dev.to/zerolock/kde-plasma-crashes-after-system-update-on-kubuntu-2604-fontconfig-race-condition-fix-2ebm#environment&quot;&gt;
  &lt;/a&gt;
  Environment
&lt;/h2&gt;

&lt;p&gt;Kubuntu 26.04 LTS, KDE Plasma 6.6.6, kernel 7.0.0-34, Intel Raptor Lake i915. I deploy Kubuntu 26.04 on client workstations and hit this after a routine update. The fix has held across multiple reboots and subsequent updates.&lt;/p&gt;

&lt;p&gt;If you are seeing something similar but the stack trace does not mention fontconfig, this drop-in will not help. The crash is something else. Check the coredumpctl output carefully before applying anything.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://zerolock.it/&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;zerolock.it&lt;/a&gt;&lt;/p&gt;


            </description><link>https://dev.to/zerolock/kde-plasma-crashes-after-system-update-on-kubuntu-2604-fontconfig-race-condition-fix-2ebm</link><guid isPermaLink="false">https://dev.to/zerolock/kde-plasma-crashes-after-system-update-on-kubuntu-2604-fontconfig-race-condition-fix-2ebm</guid><pubDate>Wed, 23 Sep 2026 14:35:37 GMT</pubDate><author>Mišo Oroz</author><enclosure url="https://media2.dev.to/dynamic/image/width=1000,height=420,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fp6rgihtult1l6oj7p7n8.jpg" type="image/jpeg"></enclosure><category>linux</category><category>kde</category><category>kubuntu</category><category>debugging</category></item><item><title>The Grand Unifying Architecture of Frontend</title><description>&lt;p&gt;I used to joke that the history of frontend development could be retraced by following the argument of who owned the state. And the truth is both sides have gone back and forth on this over the years. We started on the document web where state was on the server. Then we added JavaScript and Applets where we could have stateful things in the client. But developers at the time didn&#39;t like either much and tried to wire state across both sides in their server languages and we got ASP.NET and the like.&lt;/p&gt;

&lt;p&gt;I sit here over 30 years later and it is still going on. Going to replace your React app with HTMX? Maybe. Maybe it isn&#39;t that simple. Although this seems like an endless spiral, I don&#39;t think this is unsolvable. Even though it has been going on so long, I actually think the answer is in front of us.&lt;/p&gt;

&lt;p&gt;The unified model comes down to understanding responsibilities. And they are as old as the web itself. Every time we misalign complexity soars. Every time we ignore part of the puzzle it goes on to bite us. Every solution straddles part of this solution space but we&#39;ve struggled to cover the whole range.&lt;/p&gt;


&lt;hr&gt;

&lt;h2&gt;
  &lt;a name=&quot;core-responsibilities&quot; href=&quot;https://dev.to/playfulprogramming/the-grand-unifying-architecture-of-frontend-bhk#core-responsibilities&quot;&gt;
  &lt;/a&gt;
  Core Responsibilities
&lt;/h2&gt;

&lt;p&gt;My observation is that all frontend architectures come down to layering of three responsibilities. Some are more present than others but they all exist in some form.&lt;/p&gt;

&lt;h4&gt;
  &lt;a name=&quot;1-navigation-client&quot; href=&quot;https://dev.to/playfulprogramming/the-grand-unifying-architecture-of-frontend-bhk#1-navigation-client&quot;&gt;
  &lt;/a&gt;
  1. Navigation (client)
&lt;/h4&gt;

&lt;p&gt;The URL is the basis of the web experience and it belongs to the browser. Orchestration is a client responsibility and every solution from SPA to HTML partial agrees with this. JavaScript in the browser is the root of our application.&lt;/p&gt;

&lt;h4&gt;
  &lt;a name=&quot;2-content-server&quot; href=&quot;https://dev.to/playfulprogramming/the-grand-unifying-architecture-of-frontend-bhk#2-content-server&quot;&gt;
  &lt;/a&gt;
  2. Content (server)
&lt;/h4&gt;

&lt;p&gt;Conversely, content belongs to the server whether it is markup or JSON. The server is the authoritative source. It hangs off of our navigation.&lt;/p&gt;

&lt;h4&gt;
  &lt;a name=&quot;3-affordances-client&quot; href=&quot;https://dev.to/playfulprogramming/the-grand-unifying-architecture-of-frontend-bhk#3-affordances-client&quot;&gt;
  &lt;/a&gt;
  3. Affordances (client)
&lt;/h4&gt;

&lt;p&gt;Affordances find us back in the browser. Local UI state, in progress work, optimistic updates. We need to provide our user feedback faster than a round-trip to the server.&lt;/p&gt;


&lt;hr&gt;

&lt;h2&gt;
  &lt;a name=&quot;following-the-shape&quot; href=&quot;https://dev.to/playfulprogramming/the-grand-unifying-architecture-of-frontend-bhk#following-the-shape&quot;&gt;
  &lt;/a&gt;
  Following the Shape
&lt;/h2&gt;

&lt;p&gt;All web application architectures follow this client -&amp;gt; server -&amp;gt; client layering. A user navigates or performs an action, content comes back from the server, and the client settles it. That&#39;s the Single Page Application(SPA) architecture after load, but it&#39;s also HTMX. And also LiveView, if the server -&amp;gt; client protocol is powerful enough.&lt;/p&gt;

&lt;p&gt;It feels like I&#39;m stating the obvious here. But the web generally maps writes to navigation, and the server only pushes reads. Mutations travel through layer 1 with forms, actions, invalidation, and requests for the content. Layer 2, content, never writes and only publishes.&lt;/p&gt;

&lt;p&gt;This asymmetry is what makes it composable. Breaking that leads to two stateful systems fighting against themselves. Which is why affordances like optimism(layer 3) fit cleanly on top if viewed as an overlay. The client never writes server content directly as it doesn&#39;t own it.&lt;/p&gt;


&lt;hr&gt;

&lt;h2&gt;
  &lt;a name=&quot;revisiting-the-spectrum&quot; href=&quot;https://dev.to/playfulprogramming/the-grand-unifying-architecture-of-frontend-bhk#revisiting-the-spectrum&quot;&gt;
  &lt;/a&gt;
  Revisiting the Spectrum
&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpzb56rtip9b4vtxaz01t.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpzb56rtip9b4vtxaz01t.png&quot; alt=&quot;Unified Quadrants&quot; loading=&quot;lazy&quot; width=&quot;799&quot; height=&quot;601&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I&#39;ve tried many times to map the solution space to a 4 quadrant grid but I never found the right axis. But I&#39;m now seeing how all solutions can sit in the same diagram.&lt;/p&gt;

&lt;p&gt;Obviously this is a rough placement, solutions fit spaces not points, and something like React can be used as a frontend in a sync engine like Zero. Here React represents classic SPAs + JSON API. But most frameworks fix both transport and affordance weight so they don&#39;t move much.&lt;/p&gt;

&lt;p&gt;But if you put it under our lens of responsibility:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;HTMX&lt;/strong&gt;: Minimal layer 1, HTML carries the majority of the work under layer 2, and layer 3 is almost nothing.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;LiveView&lt;/strong&gt;: Layer 2 expands its capability, while layer 3 remains nearly non-existent. Same dance with the read window stretched to the length of the session.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;DataStar&lt;/strong&gt;: More machinery in layer 2 with the addition of server populated Signals allowing for some closer interaction with the client.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Astro(+ View Transitions)&lt;/strong&gt;: navigation(view transition) -&amp;gt; server(markup) -&amp;gt; client(islands). All 3 parts laid out explicitly.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Server Components(Next.js)&lt;/strong&gt;: Like Astro except shared client state is preserved.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;SPA + JSON(React)&lt;/strong&gt;: Layer 3 grows until it merges with layer 1. And layer 2 is delegated to JSON APIs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Sync Engine(Zero)&lt;/strong&gt;: Layer 2 becomes a persistent read of a replicated store, and layer 3 grows to hold a full local copy of it. Optimism over the whole dataset.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every solution, with a bit of coaxing, is capable of expressing all of these. They differ in transport, window length, and how much affordance code you ship. So it comes down to efficiency and authoring. Which means one framework could cover it all, if each responsibility is adjustable.&lt;/p&gt;


&lt;hr&gt;

&lt;h2&gt;
  &lt;a name=&quot;a-modern-take&quot; href=&quot;https://dev.to/playfulprogramming/the-grand-unifying-architecture-of-frontend-bhk#a-modern-take&quot;&gt;
  &lt;/a&gt;
  A Modern Take
&lt;/h2&gt;

&lt;p&gt;Nothing I&#39;ve laid out is any different than how the base platform has always worked, but can we mirror this in a way that encompasses the full spectrum of the past 30 years?&lt;/p&gt;

&lt;p&gt;I&#39;m going to paint a picture using our 3 responsibilities with Solid 2.0.&lt;/p&gt;


&lt;hr&gt;

&lt;h3&gt;
  &lt;a name=&quot;navigation-delegation-and-progressive-enhancement&quot; href=&quot;https://dev.to/playfulprogramming/the-grand-unifying-architecture-of-frontend-bhk#navigation-delegation-and-progressive-enhancement&quot;&gt;
  &lt;/a&gt;
  Navigation: Delegation and progressive enhancement
&lt;/h3&gt;

&lt;p&gt;Solid&#39;s router owns nothing in the render tree. There is no &lt;code&gt;&amp;lt;Link&amp;gt;&lt;/code&gt;(or &lt;code&gt;&amp;lt;A&amp;gt;&lt;/code&gt;) component. Instead our JSX compiler registers a claim on every &lt;code&gt;a[href]&lt;/code&gt; and &lt;code&gt;form[action]&lt;/code&gt; element it creates, and server-streamed content gets the same claims swept over any subtree the runtime renders.&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight typescript&quot;&gt;&lt;code&gt;&lt;span class=&quot;c1&quot;&gt;// lib/users.ts&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;renameUser&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;action&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;async &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;string&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;formData&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;FormData&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;use server&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nf&quot;&gt;updateUser&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;formData&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;// routes/users/[id].tsx — plain HTML. The compiler claims the&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;// anchor and the form. The router intercepts both. Works before &lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;// hydration and after.&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;href&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;`/users/&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;user&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;().&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/a&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&amp;gt;
&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;form&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;action&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;renameUser&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;with&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)}&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;method&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;post&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;input&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;user&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;().&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;sr&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&amp;gt;
&lt;/span&gt;  &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;button&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Rename&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/button&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&amp;gt;
&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/form&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Note: There are no components in this markup.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A SolidJS router consumes those claims to manage &lt;code&gt;aria-current&lt;/code&gt;, active classes, and interception. This means server-rendered markup with zero client components participates fully in client-side navigation. So it works not only with &quot;No JS&quot; but with JavaScript with no interactive components.&lt;/p&gt;

&lt;p&gt;Forms and buttons delegate to server function actions the same way. You hoist your preloads and invalidation correctly and single-flight mutations mean one round trip settles every piece of UI the mutation invalidated whether that UI is JSON-fed client components or server-owned markup.&lt;/p&gt;


&lt;hr&gt;

&lt;h3&gt;
  &lt;a name=&quot;content-reactive-reads-over-the-wire&quot; href=&quot;https://dev.to/playfulprogramming/the-grand-unifying-architecture-of-frontend-bhk#content-reactive-reads-over-the-wire&quot;&gt;
  &lt;/a&gt;
  Content: Reactive reads over the wire
&lt;/h3&gt;

&lt;p&gt;Solid&#39;s powerful protocol for layer 2 stands on our &lt;code&gt;&quot;use server&quot;&lt;/code&gt; functions. Solid serializes across the boundary with Seroval, which handles not just plain data but async structures, like Promises and async iterators. The communication between server and client is about the data, including data that hasn&#39;t settled yet.&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight typescript&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;async&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;report&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;string&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;use server&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;await&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;getTitle&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;// AsyncIterable&amp;lt;string&amp;gt; — crosses the wire as-is&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;progress&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;watchProgress&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; 
  &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;// client: the iterable&#39;s latest yield is just a reactive read&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;r&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;createMemo&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;report&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;props&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;));&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;progress&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;createMemo&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;r&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;().&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;progress&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;h1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;r&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;().&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/h1&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&amp;gt;
&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;progress&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()}&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/p&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;More than that, the reactive graph propagates over the wire. On the server, every expression feeding the client is an open binding for the life of the response. When a promise settles or iterator yields the server re-runs the expression and sends the new value to the client to be replaced or morphed.&lt;/p&gt;

&lt;p&gt;So far I&#39;ve showcased this in examples around the original response, ie what happens during hydration. Even if the content chunks stream in as they initially are ready, we can continue to update the stream in place as long as the request stays open.&lt;/p&gt;

&lt;p&gt;But the same can be true of server function requests after the fact. We can send back would-be static markup, &quot;Server Components&quot;, and have their reactive graph never ship to the client while still doing these streamed pinpoint updates. We will be announcing the preview for our Server Component feature soon (but if you look you can already see &lt;a href=&quot;https://github.com/solidjs/solid/tree/next/examples/hackernews&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;fully working&lt;/a&gt; &lt;a href=&quot;https://github.com/solidjs/solid/tree/next/examples/notes&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;examples&lt;/a&gt; &lt;a href=&quot;https://github.com/solidjs/solid/tree/next/examples/chat&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;in our repo&lt;/a&gt;).&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight typescript&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;async&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;countdown&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;number&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;use server&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;ticks&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;tick&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// AsyncIterable&amp;lt;number&amp;gt;, one per second&lt;/span&gt;

  &lt;span class=&quot;c1&quot;&gt;// returning a function returns a Server Component&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;return &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;count&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;createMemo&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;ticks&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Counted&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;to&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;count&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;of&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/p&amp;gt;&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;;
&lt;/span&gt;  &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;// client — zero component code ships for this&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Counter&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;dynamic&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;countdown&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;));&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Counter&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Because the communication is one-way with a single authoring model, the transport is pluggable. Today we use Request/Response, so it lives as long as the request is open and you reconnect as needed. Swap in something persistent like SSE or a socket and the same server component becomes a non-terminating live component.&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight typescript&quot;&gt;&lt;code&gt;&lt;span class=&quot;c1&quot;&gt;// request/response — left side of the grid&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;getAuction&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;GET&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;async &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;use server&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;read&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;// persistent — right side of the grid&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;liveAuction&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;live&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;async&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;use server&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;while &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;yield&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;read&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;await&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;changed&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;// the consumer doesn&#39;t care which one it got&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;auction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;createOptimisticStore&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;liveAuction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(),&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;What makes this safe is what LiveView&#39;s failure mode teaches us: &lt;strong&gt;The server&#39;s live graph must be a re-derivable projection of durable state.&lt;/strong&gt; It is never the source of truth. Reconnection doesn&#39;t depend on sessions, event replay, or anything that dies with a process.&lt;/p&gt;


&lt;hr&gt;

&lt;h3&gt;
  &lt;a name=&quot;affordances-an-asyncaware-graph-that-hydrates-once&quot; href=&quot;https://dev.to/playfulprogramming/the-grand-unifying-architecture-of-frontend-bhk#affordances-an-asyncaware-graph-that-hydrates-once&quot;&gt;
  &lt;/a&gt;
  Affordances: An async-aware graph that hydrates once
&lt;/h3&gt;

&lt;p&gt;This is an area SolidJS has excelled in. But in 2.0, async became native to the graph. A value arriving from the server content channel and a value computed locally are indistinguishable to the consumer.&lt;/p&gt;

&lt;p&gt;Optimism is a first-class primitive. It isn&#39;t just something bundled with the server functions or query caching library. Optimism represents any uncommitted state predicted over async, whatever the async source. It&#39;s a general concept. It doesn&#39;t just represent what some might consider &quot;lying to the user&quot;, it doesn&#39;t have to masquerade as an invisible success. It represents any predictive ephemeral affordance. It either settles eventually as truth or it is reverted, but it never outlives its transaction. It prevents getting out of sync.&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight typescript&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;auction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;setAuction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;createOptimisticStore&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;liveAuction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(),&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{});&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;placeBid&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;action&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;amount&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;number&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;// overlay — reverts on settle&lt;/span&gt;
  &lt;span class=&quot;nf&quot;&gt;setAuction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;highBid&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;amount&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;// mutation - the write goes up&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;yield&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;bid&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;amount&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;// hold until truth comes back down             &lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;yield&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;until&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;auction&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;highBid&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;amount&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;This all works because we &lt;strong&gt;never hydrate more than once.&lt;/strong&gt; After startup, the server should never render a client component as client state has diverged from anything the server could know. This is a critical naive breaking point in HTML Partial and Islands solutions that share client state. Hydrating after state has updated is a recipe for hydration mismatches. While we can safeguard during the initial streaming progression, that isn&#39;t a realistic proposition over the life of an application.&lt;/p&gt;

&lt;p&gt;A rule like that only holds if the system enforces it. Every piece of server content is keyed by the call that produced it, the function and its arguments, the same key a query cache would use. Content arriving on any transport only ever writes to that address&#39;s store, and mounted UI pulls from the address it&#39;s bound to. There is no direct connection from the network to the DOM. So a hover preload can&#39;t clobber the page you&#39;re looking at, a refetch morphs in place while the client-owned ranges inside it survive, and a stale response doesn&#39;t pass a version check. &lt;/p&gt;

&lt;p&gt;Under this unified model, initial load gets the same treatment without paying serialization twice. Client components claim their server-rendered nodes and boot makes zero requests. The only serialized records are values the client requires. Server-only content ships as HTML or as data, never both. The page markup is the payload. For server components, that means always one copy. View-source and search for any piece of content and you&#39;ll find it exactly once.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ff3pwdopw5mf7zjvk8505.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ff3pwdopw5mf7zjvk8505.png&quot; alt=&quot;serialized once&quot; loading=&quot;lazy&quot; width=&quot;800&quot; height=&quot;434&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I once positioned this as &quot;Facing Frontend&#39;s Existential Crisis&quot;, but now it is a solved problem.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src=&quot;https://www.youtube.com/embed/nzbV0YgSBuo&quot; width=&quot;710&quot; height=&quot;399&quot; style=&quot;width: 100%; height: auto; aspect-ratio: 16 / 9;&quot; allowfullscreen=&quot;&quot; loading=&quot;lazy&quot; referrerpolicy=&quot;no-referrer&quot;&gt;
  &lt;/iframe&gt;
&lt;/p&gt;


&lt;hr&gt;

&lt;h2&gt;
  &lt;a name=&quot;traversing-the-spectrum&quot; href=&quot;https://dev.to/playfulprogramming/the-grand-unifying-architecture-of-frontend-bhk#traversing-the-spectrum&quot;&gt;
  &lt;/a&gt;
  Traversing the Spectrum
&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpzb56rtip9b4vtxaz01t.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpzb56rtip9b4vtxaz01t.png&quot; alt=&quot;Unified Quadrants&quot; loading=&quot;lazy&quot; width=&quot;799&quot; height=&quot;601&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What makes this exciting is with the pieces above you are completely free to move the whole solution space and every point in between.&lt;/p&gt;

&lt;p&gt;If you start in the lower left corner, that would be like a SolidJS app with no client components that just swaps server component chunks on server &lt;code&gt;&quot;use server&quot;&lt;/code&gt; actions bound to &lt;code&gt;&amp;lt;form action&amp;gt;&lt;/code&gt;. Server markup streams and morphs, and navigation is handled without any client components.&lt;/p&gt;

&lt;p&gt;The top left-hand side is when we extend layer 3 until it dominates and you have the SPA and there are no server components or server rendering at all. Just JSON APIs.&lt;/p&gt;

&lt;p&gt;And we can continue to traverse over the top to the right-hand side by the way of persistent &lt;code&gt;&quot;use server&quot;&lt;/code&gt; functions and our granular optimistic layer. Solid&#39;s &lt;code&gt;live&lt;/code&gt; and &lt;code&gt;until&lt;/code&gt; operators help close the gap when the client state is streamed in as available. I&#39;d still use a dedicated sync engine, but the base primitives alone do a good impression.&lt;/p&gt;

&lt;p&gt;Finally, the lower right corner, is closer to where we started. Except this time our server components have reactive bindings and their connection is persistent. No client components, just our same &quot;use server&quot; action protocol to write back, while our reads stream fine-grained markup partials over the wire. In this world, even the server components could be optimistic depending on how you write your actions, and &lt;code&gt;until&lt;/code&gt; again gives us a mechanism for completion acknowledgements.&lt;/p&gt;

&lt;p&gt;The incredible part is that this required nothing that users of Solid 2.0 aren&#39;t already familiar with. Async Signals and &lt;code&gt;use server&lt;/code&gt;. With that, all these experiences are authorable using basically the same patterns, in the same framework, even in the same application.&lt;/p&gt;


&lt;hr&gt;

&lt;h2&gt;
  &lt;a name=&quot;conclusion&quot; href=&quot;https://dev.to/playfulprogramming/the-grand-unifying-architecture-of-frontend-bhk#conclusion&quot;&gt;
  &lt;/a&gt;
  Conclusion
&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fek74ygnjpy4rf4n0gkc3.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fek74ygnjpy4rf4n0gkc3.png&quot; alt=&quot;A Möbius strip: one surface that appears to have two sides&quot; loading=&quot;lazy&quot; width=&quot;800&quot; height=&quot;450&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It goes back to where we started. A few pieces that have been sitting in front of us this whole time.&lt;/p&gt;

&lt;p&gt;The browser owns navigation and affordances. The server owns content. Communication is a loop with writes travelling as navigation and content travelling as one-way reads. And the transport and the response window should be configurable without changing the shape of authoring.&lt;/p&gt;

&lt;p&gt;Everything from HTMX to LiveView to islands to the SPA is a coordinate on this grid. The differences between them are efficiency and ergonomics rather than expressiveness.&lt;/p&gt;

&lt;p&gt;What makes this more than an exercise in categorization is that all the hard pieces are built. We serialize and hydrate once. The reactive graph serializes its own updates. Content is stored by address, so stale hydration can&#39;t be represented.&lt;/p&gt;

&lt;p&gt;It comes as little surprise to me that Signals can act as that common representation on all sides. Sync and async. Server and client. Stateful and stateless.&lt;/p&gt;

&lt;p&gt;This is stupidly ambitious. RSCs only aimed to provide the left half of the grid and many felt they still fell short. The HTML-over-the-wire camp has aimed to provide the bottom half, but ignoring the client is ignoring an entire responsibility.&lt;/p&gt;

&lt;p&gt;And yet, this is a future that I want to live in. One where choosing a framework doesn&#39;t require you to choose a religion. And one, from my perspective, that is already here.&lt;/p&gt;


            </description><link>https://dev.to/playfulprogramming/the-grand-unifying-architecture-of-frontend-bhk</link><guid isPermaLink="false">https://dev.to/playfulprogramming/the-grand-unifying-architecture-of-frontend-bhk</guid><pubDate>Tue, 22 Sep 2026 16:43:06 GMT</pubDate><author>Ryan Carniato</author><enclosure url="https://media2.dev.to/dynamic/image/width=1000,height=420,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzz3id3ryb20mdgc9qac4.png" type="image/jpeg"></enclosure><category>webdev</category><category>javascript</category><category>solidjs</category><category>architecture</category></item><item><title>Claude Code now supports AGENTS.md Natively - Here&#39;s how it actually works</title><description>&lt;p&gt;&lt;strong&gt;Quick answer:&lt;/strong&gt; As of 4 days ago, September 18, Claude Code natively reads &lt;code&gt;AGENTS.md&lt;/code&gt;, the open, cross-tool standard for AI coding agent instructions. By default it&#39;s a &lt;strong&gt;fallback&lt;/strong&gt;, not a merge: Claude Code reads &lt;code&gt;AGENTS.md&lt;/code&gt; only in a project that has no &lt;code&gt;CLAUDE.md&lt;/code&gt; in the working directory or any parent directory. If a &lt;code&gt;CLAUDE.md&lt;/code&gt; exists anywhere in that chain, Claude Code reads that instead and ignores &lt;code&gt;AGENTS.md&lt;/code&gt;. You can change this under &lt;code&gt;/config&lt;/code&gt; → &quot;Project instructions.&quot;&lt;/p&gt;

&lt;p&gt;If you&#39;ve been running more than one coding agent against the same repo, you&#39;ve probably already got a &lt;code&gt;CLAUDE.md&lt;/code&gt;, a &lt;code&gt;.cursorrules&lt;/code&gt;, maybe a &lt;code&gt;.github/copilot-instructions.md&lt;/code&gt;, and a handful of other files that all say roughly the same thing in slightly different dialects. Anthropic just closed one of those gaps. Below is what changed, exactly how the fallback logic works, and what to do if you&#39;re running a monorepo or already have a &lt;code&gt;CLAUDE.md&lt;/code&gt; you want to keep.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;a-reminder-of-what-agentsmd-is&quot; href=&quot;https://dev.to/valyuai/claude-code-now-supports-agentsmd-natively-heres-how-it-actually-works-5nl#a-reminder-of-what-agentsmd-is&quot;&gt;
  &lt;/a&gt;
  A reminder of what AGENTS.md is?
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;AGENTS.md&lt;/code&gt; is an open, tool-agnostic Markdown file, a &quot;README for agents&quot; that tells any AI coding agent how to work in a given repository: build commands, test commands, style rules, off-limits directories, and deploy steps. It sits at the repo root (or nested in subdirectories, for monorepos) and is read by more than twenty coding tools, including Codex, Cursor, Gemini CLI, Copilot, and now Claude Code.&lt;/p&gt;

&lt;p&gt;The pitch behind the standard is simple: instead of every vendor inventing its own instruction file with its own name, its own parsing rules, and its own precedence quirks, agents converge on one plain-Markdown file that any tool can read. No proprietary schema, no lock-in, no special syntax, just Markdown a human can also open and understand.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;the-workaround-era&quot; href=&quot;https://dev.to/valyuai/claude-code-now-supports-agentsmd-natively-heres-how-it-actually-works-5nl#the-workaround-era&quot;&gt;
  &lt;/a&gt;
  The workaround era
&lt;/h2&gt;

&lt;p&gt;Before native support landed in Claude Code, &lt;code&gt;AGENTS.md&lt;/code&gt; and &lt;code&gt;CLAUDE.md&lt;/code&gt; lived side by side, and keeping them in sync was entirely on you. The common patterns looked like this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Symlinks.&lt;/strong&gt; &lt;code&gt;ln -s AGENTS.md CLAUDE.md&lt;/code&gt; so both filenames pointed at one file. Worked until someone&#39;s editor or git config mangled the symlink on checkout, or a Windows teammate&#39;s filesystem didn&#39;t preserve it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Loader scripts.&lt;/strong&gt; Small pre-commit hooks or Makefile targets that concatenated &lt;code&gt;AGENTS.md&lt;/code&gt; into &lt;code&gt;CLAUDE.md&lt;/code&gt; on save, so Claude Code would pick up the content under the name it actually looked for.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Community plugins and skills.&lt;/strong&gt; Wrapper skills whose entire job was &quot;go find &lt;code&gt;AGENTS.md&lt;/code&gt;, read it, and inject it into context&quot; — a workaround built entirely because the CLI didn&#39;t do this itself yet.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Just maintaining both, by hand.&lt;/strong&gt; The most common answer, and the one most likely to drift. Someone updates the build command in &lt;code&gt;AGENTS.md&lt;/code&gt; for the Cursor and Aider users on the team, forgets &lt;code&gt;CLAUDE.md&lt;/code&gt;, and now Claude Code is running stale instructions until someone notices.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of these were catastrophic. All of them were friction that had nothing to do with the actual work, infrastructure tax paid just to keep one CLI aligned with a standard the rest of the ecosystem had already settled on.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;how-does-claude-codes-agentsmd-support-actually-work&quot; href=&quot;https://dev.to/valyuai/claude-code-now-supports-agentsmd-natively-heres-how-it-actually-works-5nl#how-does-claude-codes-agentsmd-support-actually-work&quot;&gt;
  &lt;/a&gt;
  How does Claude Code&#39;s AGENTS.md support actually work?
&lt;/h2&gt;

&lt;p&gt;Claude Code added the feature with characteristically plain wording in the changelog:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&quot;Added AGENTS.md support: in a project with no CLAUDE.md, Claude Code reads AGENTS.md instead; change it under &#39;Project instructions&#39; in &lt;code&gt;/config&lt;/code&gt; (not yet on Bedrock, Vertex or Foundry)&quot;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That sentence matters more than it looks, the default behavior is a &lt;strong&gt;fallback, not a merge&lt;/strong&gt;. Claude Code checks the working directory and every parent above it; if a &lt;code&gt;CLAUDE.md&lt;/code&gt; exists anywhere in that chain, &lt;code&gt;AGENTS.md&lt;/code&gt; is ignored entirely. Only when there&#39;s no &lt;code&gt;CLAUDE.md&lt;/code&gt; in scope does it read &lt;code&gt;AGENTS.md&lt;/code&gt; instead. It&#39;s implemented as a built-in plugin under the hood, which is why it&#39;s configurable rather than hardcoded.&lt;/p&gt;

&lt;h3&gt;
  &lt;a name=&quot;the-four-project-instructions-modes-in-raw-config-endraw-&quot; href=&quot;https://dev.to/valyuai/claude-code-now-supports-agentsmd-natively-heres-how-it-actually-works-5nl#the-four-project-instructions-modes-in-raw-config-endraw-&quot;&gt;
  &lt;/a&gt;
  The four &quot;Project instructions&quot; modes in &lt;code&gt;/config&lt;/code&gt;
&lt;/h3&gt;

&lt;div class=&quot;table-wrapper-paragraph&quot;&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Mode&lt;/th&gt;
&lt;th&gt;Behavior&lt;/th&gt;
&lt;th&gt;When to use it&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;claude-md-or-agents-md&lt;/code&gt; (default)&lt;/td&gt;
&lt;td&gt;Reads &lt;code&gt;CLAUDE.md&lt;/code&gt; if one exists anywhere above the working directory; otherwise falls back to &lt;code&gt;AGENTS.md&lt;/code&gt;.&lt;/td&gt;
&lt;td&gt;You have no &lt;code&gt;CLAUDE.md&lt;/code&gt; yet, or you&#39;re fine with &lt;code&gt;AGENTS.md&lt;/code&gt; only applying where &lt;code&gt;CLAUDE.md&lt;/code&gt; is absent.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;claude-md-and-agents-md&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Loads both files together; &lt;code&gt;CLAUDE.md&lt;/code&gt; takes precedence on overlapping instructions.&lt;/td&gt;
&lt;td&gt;You want one shared &lt;code&gt;AGENTS.md&lt;/code&gt; to serve every tool, with &lt;code&gt;CLAUDE.md&lt;/code&gt; layered on top for Claude-specific extras.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;claude-md&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Ignores &lt;code&gt;AGENTS.md&lt;/code&gt; entirely — pre-2.1.277 behavior.&lt;/td&gt;
&lt;td&gt;You deliberately want Claude Code isolated from the shared file.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;managed-only&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Drops checked-in and private instruction files; keeps only organization-managed config.&lt;/td&gt;
&lt;td&gt;Enterprise/compliance setups that centrally control agent instructions.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  &lt;a name=&quot;practical-consequences-symlinks-monorepos-and-known-limitations&quot; href=&quot;https://dev.to/valyuai/claude-code-now-supports-agentsmd-natively-heres-how-it-actually-works-5nl#practical-consequences-symlinks-monorepos-and-known-limitations&quot;&gt;
  &lt;/a&gt;
  Practical consequences: Symlinks, monorepos, and known limitations
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;For a single root file, you can drop the symlink.&lt;/strong&gt; If your only instruction file lived at the repo root and you were symlinking &lt;code&gt;CLAUDE.md → AGENTS.md&lt;/code&gt; purely so Claude Code would notice it, that&#39;s no longer necessary under the default fallback mode.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;For monorepos, symlinks aren&#39;t actually replaced — they&#39;re replaced by a different pattern.&lt;/strong&gt; A nested &lt;code&gt;AGENTS.md&lt;/code&gt; in &lt;code&gt;apps/api/&lt;/code&gt; is &lt;em&gt;not&lt;/em&gt; picked up automatically if any &lt;code&gt;CLAUDE.md&lt;/code&gt; exists above it in the tree (including at the repo root), because the fallback check happens per-lookup and a closer or higher &lt;code&gt;CLAUDE.md&lt;/code&gt; wins. If you want Claude Code to respect a nested &lt;code&gt;AGENTS.md&lt;/code&gt; while other tools keep reading it directly, the documented pattern is a small &lt;code&gt;CLAUDE.md&lt;/code&gt; next to it that imports it &lt;code&gt;@AGENTS.md&lt;/code&gt; rather than a symlink. Set &lt;code&gt;instructionFiles&lt;/code&gt; to &lt;code&gt;claude-md-and-agents-md&lt;/code&gt; if you want both loaded everywhere instead.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It&#39;s not available everywhere yet.&lt;/strong&gt; Bedrock, Vertex, and Foundry deployments don&#39;t have it as of this writing. There are also a handful of sharper edges: nested &lt;code&gt;AGENTS.md&lt;/code&gt; files attach on file reads but aren&#39;t restored after context compaction, they don&#39;t show up in &lt;code&gt;/memory&lt;/code&gt;, and directories added via &lt;code&gt;--add-dir&lt;/code&gt; don&#39;t contribute their &lt;code&gt;AGENTS.md&lt;/code&gt; at all. Worth checking &lt;code&gt;/config&lt;/code&gt; and the changelog before you assume parity with &lt;code&gt;CLAUDE.md&lt;/code&gt; in every edge case.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;One less thing to explain to new hires or new agents.&lt;/strong&gt; For the common case, one instruction file at the root, no &lt;code&gt;CLAUDE.md&lt;/code&gt; in the way, point someone (or something) at the repo, and the instructions are just there, under the name every other tool already expects.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  &lt;a name=&quot;why-this-matters-for-teams-standardizing-agent-workflows&quot; href=&quot;https://dev.to/valyuai/claude-code-now-supports-agentsmd-natively-heres-how-it-actually-works-5nl#why-this-matters-for-teams-standardizing-agent-workflows&quot;&gt;
  &lt;/a&gt;
  Why this matters for teams standardizing agent workflows
&lt;/h2&gt;

&lt;p&gt;If your team runs a single agent, none of this changes much, update one file, move on. The value shows up the moment you&#39;re running more than one, which is increasingly the default rather than the exception: Claude Code for one class of task, a Cursor or Codex-based agent for another, a CI-triggered agent doing automated reviews, maybe a background agent doing dependency bumps.&lt;/p&gt;

&lt;p&gt;Every one of those previously needed its own copy of &quot;here&#39;s how this repo works,&quot; or needed you to maintain the sync tooling described above. Native &lt;code&gt;AGENTS.md&lt;/code&gt; support means that gap can close but only if you actually pick the mode that matches your setup. Ship a repo with just &lt;code&gt;AGENTS.md&lt;/code&gt; and nothing else, and Claude Code, Cursor, Codex, and Copilot all read the identical file by default with zero configuration. Keep a &lt;code&gt;CLAUDE.md&lt;/code&gt; around too which most existing Claude Code users will and you need to either explicitly switch &lt;code&gt;/config&lt;/code&gt; to &lt;code&gt;claude-md-and-agents-md&lt;/code&gt;, or accept that &lt;code&gt;CLAUDE.md&lt;/code&gt; is what Claude reads while everyone else reads &lt;code&gt;AGENTS.md&lt;/code&gt;, and keep the two in sync on purpose.&lt;/p&gt;

&lt;p&gt;For a technical lead, that&#39;s the actual decision to make, not just the actual win: treat &lt;code&gt;AGENTS.md&lt;/code&gt; as the cross-tool baseline everyone gets by default, and reserve &lt;code&gt;CLAUDE.md&lt;/code&gt; for Claude-specific extras (hook config, permission modes) layered on top via &lt;code&gt;claude-md-and-agents-md&lt;/code&gt; or an explicit &lt;code&gt;@AGENTS.md&lt;/code&gt; import. Do that once, deliberately, and &quot;which instruction file does this tool actually read&quot; stops being a recurring Slack question.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;a-quick-tip-while-youre-at-it&quot; href=&quot;https://dev.to/valyuai/claude-code-now-supports-agentsmd-natively-heres-how-it-actually-works-5nl#a-quick-tip-while-youre-at-it&quot;&gt;
  &lt;/a&gt;
  A quick tip while you&#39;re at it
&lt;/h2&gt;

&lt;p&gt;If part of your &lt;code&gt;AGENTS.md&lt;/code&gt; includes instructions for agents to look things up, current library versions, API docs, internal runbooks, it&#39;s worth pointing that lookup at something more precise than the model&#39;s default built-in web search. Use &lt;a href=&quot;https://valyu.ai/&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;Valyu&lt;/a&gt; for that in our own agent configs: it&#39;s a search API built specifically for LLM consumption, so an agent grounding itself against your &lt;code&gt;AGENTS.md&lt;/code&gt; instructions gets clean, structured, current results instead of noisy search-result HTML it then has to parse. Small swap, noticeably fewer hallucinated API calls from agents &quot;helpfully&quot; filling gaps with stale training data.&lt;/p&gt;

&lt;p&gt;Here&#39;s an example of an &lt;a href=&quot;https://gist.github.com/unicodevalyu/aafbe33f6431069b79486af7e1ad7407&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;agents.md&lt;/a&gt; file.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;where-this-leaves-you&quot; href=&quot;https://dev.to/valyuai/claude-code-now-supports-agentsmd-natively-heres-how-it-actually-works-5nl#where-this-leaves-you&quot;&gt;
  &lt;/a&gt;
  Where this leaves you
&lt;/h2&gt;

&lt;p&gt;If you&#39;ve been maintaining a root-level symlink purely for Claude Code&#39;s benefit, retire it. If you&#39;ve only had a &lt;code&gt;CLAUDE.md&lt;/code&gt; and never bothered with &lt;code&gt;AGENTS.md&lt;/code&gt; because it only mattered for other tools, check &lt;code&gt;/config&lt;/code&gt; and decide on purpose: switch to &lt;code&gt;claude-md-and-agents-md&lt;/code&gt; if you want one file to genuinely serve everyone, or keep them separate and intentional if &lt;code&gt;CLAUDE.md&lt;/code&gt; carries Claude-specific settings you don&#39;t want other tools tripping over. And if you&#39;re standardizing agent workflows across a team for the first time, this is as good a moment as any to start: one &lt;code&gt;AGENTS.md&lt;/code&gt; at the root, &lt;code&gt;CLAUDE.md&lt;/code&gt; imports (&lt;code&gt;@AGENTS.md&lt;/code&gt;) rather than symlinks anywhere your monorepo needs nested instructions, and a root &lt;code&gt;CLAUDE.md&lt;/code&gt; reserved for what&#39;s actually Claude-specific.&lt;/p&gt;

&lt;p&gt;The instruction-file wars aren&#39;t fully over, there&#39;s still fragmentation elsewhere in the ecosystem but this is one less front to fight on.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;faq-claude-code-and-agentsmd&quot; href=&quot;https://dev.to/valyuai/claude-code-now-supports-agentsmd-natively-heres-how-it-actually-works-5nl#faq-claude-code-and-agentsmd&quot;&gt;
  &lt;/a&gt;
  FAQ: Claude Code and AGENTS.md
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Does Claude Code read AGENTS.md by default?&lt;/strong&gt;&lt;br&gt;
Only as a fallback. If no &lt;code&gt;CLAUDE.md&lt;/code&gt; exists in the working directory or any parent directory, Claude Code reads &lt;code&gt;AGENTS.md&lt;/code&gt; instead. If a &lt;code&gt;CLAUDE.md&lt;/code&gt; exists anywhere above it, &lt;code&gt;AGENTS.md&lt;/code&gt; is ignored unless you change the mode in &lt;code&gt;/config&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do I still need CLAUDE.md if I have AGENTS.md?&lt;/strong&gt;&lt;br&gt;
No, for shared instructions one &lt;code&gt;AGENTS.md&lt;/code&gt; is enough under the default fallback mode. &lt;br&gt;
Keep &lt;code&gt;CLAUDE.md&lt;/code&gt; only if you need Claude-specific settings (like hook or permission config) that other agents wouldn&#39;t understand.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Will Claude Code read a nested AGENTS.md in a monorepo subdirectory?&lt;/strong&gt;&lt;br&gt;
Only if there&#39;s no &lt;code&gt;CLAUDE.md&lt;/code&gt; anywhere above that subdirectory in the tree. Otherwise, the documented pattern is a small &lt;code&gt;CLAUDE.md&lt;/code&gt; next to the nested &lt;code&gt;AGENTS.md&lt;/code&gt; that imports it with &lt;code&gt;@AGENTS.md&lt;/code&gt;, or switching &lt;code&gt;/config&lt;/code&gt; to &lt;code&gt;claude-md-and-agents-md&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Which Claude Code version added AGENTS.md support?&lt;/strong&gt;&lt;br&gt;
Version 2.1.277. It&#39;s not yet available on Bedrock, Vertex, or Foundry deployments.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is AGENTS.md, and who created it?&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;AGENTS.md&lt;/code&gt; is an open Markdown convention for giving AI coding agents repo-level instructions, formalized in August 2025 by OpenAI with Google, Cursor, and Factory. It&#39;s now stewarded by the Linux Foundation&#39;s Agentic AI Foundation alongside Anthropic&#39;s Model Context Protocol and Block&#39;s &lt;code&gt;goose&lt;/code&gt;, and is read by more than twenty coding tools.&lt;/p&gt;


            </description><link>https://dev.to/valyuai/claude-code-now-supports-agentsmd-natively-heres-how-it-actually-works-5nl</link><guid isPermaLink="false">https://dev.to/valyuai/claude-code-now-supports-agentsmd-natively-heres-how-it-actually-works-5nl</guid><pubDate>Tue, 22 Sep 2026 12:55:36 GMT</pubDate><author>Prosper Otemuyiwa</author><enclosure url="https://media2.dev.to/dynamic/image/width=1000,height=420,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4mfc7b17umof87uoi371.png" type="image/jpeg"></enclosure><category>claude</category><category>agents</category><category>ai</category><category>code</category></item><item><title>Jev vs Laya: The Same AI Idea, One Closed and One Open</title><description>&lt;p&gt;A new category of AI model landed this month, and it arrived twice at once. First came Jev, a hosted product from TypeSafe AI. Weeks later, an open-source model called Laya appeared, doing the same job and claiming to be faster. If you route support tickets, filter spam, or score risk with a large language model today, this comparison matters to your bill.&lt;/p&gt;

&lt;p&gt;Both models come from the same observation: most production AI pipelines do not need text generation. They need a label. Your LLM burns 500 milliseconds to 2 seconds streaming tokens like &quot;The correct category is: billing&quot; so your code can parse the label back out. A decision model skips all of that. State goes in, a typed answer with a probability comes out. No prose, no parsing, no hallucinated sentences.&lt;/p&gt;

&lt;p&gt;TypeSafe calls this a System One model, after the fast, instinctive half of the brain. The name fits. Here is how the two contenders actually compare.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;what-they-share&quot; href=&quot;https://dev.to/jamilxt/jev-vs-laya-the-same-ai-idea-one-closed-and-one-open-3c6e#what-they-share&quot;&gt;
  &lt;/a&gt;
  What they share
&lt;/h2&gt;

&lt;p&gt;The interfaces are nearly identical. Both models accept three types of questions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Choice:&lt;/strong&gt; pick one option from a closed list, like &lt;code&gt;billing&lt;/code&gt;, &lt;code&gt;technical&lt;/code&gt;, or &lt;code&gt;other&lt;/code&gt;, with a probability over every option.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Score:&lt;/strong&gt; place the input on an ordered scale, like relevance from 0 to 5.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Noul:&lt;/strong&gt; return the probability that a statement is true.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Neither model generates text, so neither can produce a malformed answer. That is what &quot;zero hallucinations&quot; means here: the output always matches your schema. A wrong classification is still possible, which is why both vendors recommend escalating to a human when confidence drops below roughly 0.3 to 0.5.&lt;/p&gt;

&lt;p&gt;You also feed both models a batch of questions at once, and each question is evaluated independently. This is not a nicety. Batching is the intended usage pattern.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;where-jev-has-the-edge&quot; href=&quot;https://dev.to/jamilxt/jev-vs-laya-the-same-ai-idea-one-closed-and-one-open-3c6e#where-jev-has-the-edge&quot;&gt;
  &lt;/a&gt;
  Where Jev has the edge
&lt;/h2&gt;

&lt;p&gt;Jev launched September 15, 2026, from TypeSafe AI, founded by Diogo Almeida, a co-creator of ChatGPT. You call it over an API at $0.042 per million input tokens (output tokens are free), with typical responses around 150 milliseconds.&lt;/p&gt;

&lt;p&gt;Its clearest win is option count. On the Banking77 benchmark, which requires picking from 77 intent labels, Jev scored 0.870 while Laya managed 0.425. The gap is architectural, not a matter of tuning: Laya shares a fixed token budget of roughly 192 to 256 tokens across all candidate options, so past about 20 choices each option gets only a few tokens of representation. Keep your choice schemas small and this never bites you. Need 50 categories? Jev handles it today; with Laya you would need a coarse-to-fine hierarchy.&lt;/p&gt;

&lt;p&gt;Jev is also calibrated out of the box. On the typed-decisions benchmark its expected calibration error is 0.144 versus Laya&#39;s 0.213, meaning its probabilities can be trusted as probabilities sooner. And there is nothing to host: no GPU, no model files, no cold starts.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;where-laya-has-the-edge&quot; href=&quot;https://dev.to/jamilxt/jev-vs-laya-the-same-ai-idea-one-closed-and-one-open-3c6e#where-laya-has-the-edge&quot;&gt;
  &lt;/a&gt;
  Where Laya has the edge
&lt;/h2&gt;

&lt;p&gt;Laya, from Convai Innovations, is Apache 2.0 licensed with weights on Hugging Face. It is a 421M-parameter encoder (ModernBERT-large, with a 322M multilingual variant covering 100+ languages) that runs on your own hardware.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Latency:&lt;/strong&gt; about 33 milliseconds per query on a single GPU, dropping to 7 milliseconds per question when batched. That is roughly 6 to 8 times faster than Jev&#39;s network round trip.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cost:&lt;/strong&gt; no API fee at all. You pay for the GPU you already own.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Privacy:&lt;/strong&gt; state never leaves your server. Air-gapped deployment works.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Customization:&lt;/strong&gt; you can fine-tune it. Jev&#39;s weights are closed, so this is not an option there. ConvAI ships a Kaggle notebook that fine-tunes Laya on free GPUs in about 4 hours.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There is also a story behind Laya. Its creator published a reinforcement-learning approach to probability prediction in March 2025 (arXiv:2503.23303) and argues Jev arrived at the same idea later and closed. TypeSafe has not responded publicly. The documented facts are that his early work is real and predates Jev, while the Laya model page itself was created after Jev&#39;s launch. Simultaneous invention is plausible; copying is an accusation, not a proven fact. For your purchase decision it matters less than the practical differences below.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;the-honest-benchmark-picture&quot; href=&quot;https://dev.to/jamilxt/jev-vs-laya-the-same-ai-idea-one-closed-and-one-open-3c6e#the-honest-benchmark-picture&quot;&gt;
  &lt;/a&gt;
  The honest benchmark picture
&lt;/h2&gt;

&lt;p&gt;Almost every number in public circulation is self-reported, and the two sides&#39; claims cut against each other. Read them carefully:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Laya&#39;s fine-tuned typed-decisions checkpoint reports 0.766 accuracy versus Jev&#39;s published 0.727. But its own model card admits Jev&#39;s figures are third-party published, sample sizes and prompts differ, and the checkpoint was fine-tuned on that benchmark&#39;s training split. That measures specialization, not superiority.&lt;/li&gt;
&lt;li&gt;The speed comparison (33 ms vs 150 ms) pits local warmed-up GPU inference against hosted API calls including network time. Fair for your cost math, less fair as a pure model comparison.&lt;/li&gt;
&lt;li&gt;The vendor &quot;ceiling&quot; numbers (Jev claims around 400x faster than frontier LLMs; Laya claims 7.8x) are best cases. Realistic independent gains for decision-in-a-pipeline workloads land around 7x to 25x versus a frontier LLM.&lt;/li&gt;
&lt;li&gt;One independent test (Mike Taylor&#39;s) found Jev caught 6 of 7 planted defects where a frontier LLM caught 7, but 25 times slower.&lt;/li&gt;
&lt;li&gt;A separate zero-shot RAG routing benchmark from LargitData is the sharpest warning: their untuned Laya 322M base model got 0% of full multi-turn routing decisions right, while hosted Jev hit 61.4%. Fast and free is worthless if the untuned base model cannot do your task.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The honest summary: Laya wins when the task matches its training or after you fine-tune it. Jev wins out of the box, on wide option sets, and on calibration.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;one-trap-that-deserves-its-own-section&quot; href=&quot;https://dev.to/jamilxt/jev-vs-laya-the-same-ai-idea-one-closed-and-one-open-3c6e#one-trap-that-deserves-its-own-section&quot;&gt;
  &lt;/a&gt;
  One trap that deserves its own section
&lt;/h2&gt;

&lt;p&gt;Laya&#39;s English checkpoint scores 0.080 accuracy on Bengali script while reporting 0.945 confidence. The model cannot read the script, and it has no idea it cannot read it. Confidence gating will not save you, because the confidence itself is wrong. Laya ships a Router that detects the Unicode script and dispatches to the right checkpoint, including a multilingual one. Use it, or route by script yourself before inference. Any decision model tuned on Latin-script data will have some version of this failure mode.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;how-to-choose&quot; href=&quot;https://dev.to/jamilxt/jev-vs-laya-the-same-ai-idea-one-closed-and-one-open-3c6e#how-to-choose&quot;&gt;
  &lt;/a&gt;
  How to choose
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Pick Jev if&lt;/strong&gt; you want zero ops, need more than 20 choice options, trust its calibration, or want to try the category without owning infrastructure. It is self-serve through the Vercel AI Gateway if the official waitlist is slow, and the API cost is negligible at decision volumes: $0.042 per million input tokens means millions of decisions for pocket change.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pick Laya if&lt;/strong&gt; data cannot leave your environment, latency budgets are in tens of milliseconds, volume makes even small API fees add up, or you want to fine-tune on your own labeled decisions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pick neither if&lt;/strong&gt; your task is open-ended generation. These models only answer questions you can define in advance. If you cannot enumerate the categories today, you need a language model, not a decision model.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Whichever you pick, start with a high-volume but reversible task. Keep your current process in shadow mode, log the model version, the full probability distribution, and the actual outcomes, then tune thresholds from real data before you let the model decide anything on its own.&lt;/p&gt;

&lt;p&gt;The System One category is real, and both implementations prove the thesis: a huge share of &quot;AI pipeline&quot; work is classification wearing a generative model as a costume. Now there are two serious ways to take the costume off.&lt;/p&gt;


            </description><link>https://dev.to/jamilxt/jev-vs-laya-the-same-ai-idea-one-closed-and-one-open-3c6e</link><guid isPermaLink="false">https://dev.to/jamilxt/jev-vs-laya-the-same-ai-idea-one-closed-and-one-open-3c6e</guid><pubDate>Tue, 22 Sep 2026 07:35:16 GMT</pubDate><author>jamilxt</author><enclosure url="https://media2.dev.to/dynamic/image/width=1000,height=420,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxjqrrnw1s0xppamc9prj.png" type="image/jpeg"></enclosure><category>ai</category><category>opensource</category><category>machinelearning</category><category>llm</category></item><item><title>JEV assisted LLM Trading</title><description>&lt;h1&gt;
  &lt;a name=&quot;we-gave-our-llm-trading-bot-an-auditor-that-never-sees-the-chart&quot; href=&quot;https://dev.to/nodefiend/jev-assisted-llm-trading-ofa#we-gave-our-llm-trading-bot-an-auditor-that-never-sees-the-chart&quot;&gt;
  &lt;/a&gt;
  We gave our LLM trading bot an auditor that never sees the chart
&lt;/h1&gt;

&lt;p&gt;Every hour, on the hour, a vision model looks at three forex charts and decides whether our bot should buy, sell, or sit out. It has been doing this with real money since May. As of last Saturday, something finally grades its reasoning.&lt;/p&gt;

&lt;p&gt;This post is about the grader.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;the-bot-briefly&quot; href=&quot;https://dev.to/nodefiend/jev-assisted-llm-trading-ofa#the-bot-briefly&quot;&gt;
  &lt;/a&gt;
  The bot, briefly
&lt;/h2&gt;

&lt;p&gt;It&#39;s a Python script called &lt;code&gt;gemini_snap_flash&lt;/code&gt;. Once an hour it sends a one-minute candlestick chart plus daily and weekly context images to Gemini, gets back UP or DOWN and a one-line thesis, and trades EURUSD, GBPUSD, or USDJPY through MT5 on funded prop accounts. One position per pair, fixed stop and take-profit, and hard rails around it: 2% daily loss cap, 0.6% daily profit cap, and an external watchdog that kills the process after four losses in a row.&lt;/p&gt;

&lt;p&gt;The rails matter. The first $10k account blew through its max drawdown on September 9 and is gone. The fleet is two $100k accounts now, run as separate instances with separate state.&lt;/p&gt;

&lt;p&gt;Here&#39;s the part most AI-trading posts skip. The bot already logs a lot. &lt;code&gt;signal_log.csv&lt;/code&gt; has every decision, executed or skipped, with the model&#39;s reasoning attached. &lt;code&gt;trade_analysis.csv&lt;/code&gt; has every close with MFE/MAE in pips and R-multiples. What nothing had was a check on the decision itself: does the thesis actually argue for the direction the model picked? When the account died, I could read every trade and every excuse, and none of it told me whether the reasoning was any good.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;what-jev-is&quot; href=&quot;https://dev.to/nodefiend/jev-assisted-llm-trading-ofa#what-jev-is&quot;&gt;
  &lt;/a&gt;
  What JEV is
&lt;/h2&gt;

&lt;p&gt;JEV is TypeSafe&#39;s System-One model (&lt;code&gt;jev-latest&lt;/code&gt;), served at &lt;code&gt;api.typesafe.ai/v1/systemone&lt;/code&gt;. It&#39;s text-only. No vision, no market opinions. You POST it a &quot;state&quot; string plus a set of questions, each with instructions and pass/fail criteria, and it returns structured verdicts:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight json&quot;&gt;&lt;code&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;state&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&amp;lt;the thing being judged&amp;gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;model&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;jev-latest&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;questions&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;shadow_direction_consistency&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;type&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;noul&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;instructions&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Based only on the provided state (a recorded hourly vision decision for a live FX scalper), is the recorded directional call a clear, self-consistent directional commitment coherent with its own thesis?&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;criteria&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;true&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;The recorded direction is explicit (UP or DOWN) and the recorded thesis is coherent with and supports it.&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;false&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;The direction is ambiguous, contradicts the thesis, or no clear directional commitment is recorded.&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;The shape isn&#39;t an accident. A &lt;code&gt;noul&lt;/code&gt; question is a pass/fail check the model answers one way against criteria you wrote — not an open-ended essay. That&#39;s what makes the verdict usable as a watchdog: it stays binary and countable, so you can line thousands of them up against the trades they judged and watch the incoherence rate move. An essay grader couldn&#39;t do that; it would drown you in prose and give you nothing to plot.&lt;/p&gt;

&lt;p&gt;So it&#39;s a proofreader, not a fortune teller. It can&#39;t tell you whether UP is right about EURUSD. It can tell you when UP arrives with a thesis that quietly argues DOWN.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;the-shadow-harness&quot; href=&quot;https://dev.to/nodefiend/jev-assisted-llm-trading-ofa#the-shadow-harness&quot;&gt;
  &lt;/a&gt;
  The shadow harness
&lt;/h2&gt;

&lt;p&gt;The new file is &lt;code&gt;shadow.py&lt;/code&gt;, about 430 lines, plus tests. The design has one hard rule: the trading path must not know it exists unless we say so.&lt;/p&gt;

&lt;p&gt;Everything is gated behind &lt;code&gt;SHADOW_MODE=1&lt;/code&gt;. When that&#39;s unset, the harness is a complete no-op; the only cost on the hot path is a single &lt;code&gt;os.getenv()&lt;/code&gt; call, and the tests assert that zero network calls happen. When it&#39;s on, for every hourly vision decision the harness:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Dumps the exact chart images that went to the vision model into &lt;code&gt;shadow_out/&amp;lt;instance&amp;gt;/&amp;lt;timestamp&amp;gt;/&lt;/code&gt;, and records a sha256 of the prompt text for later lookup.&lt;/li&gt;
&lt;li&gt;Runs exactly one JEV call over a text rendering of those same inputs, hard-timeboxed at 20 seconds on a daemon thread. The state is capped at 30k characters to stay inside the model&#39;s context.&lt;/li&gt;
&lt;li&gt;Appends one JSON line per decision to &lt;code&gt;shadow_log.jsonl&lt;/code&gt;, including the JEV verdict and its latency.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A little later, an &lt;code&gt;attach_outcome()&lt;/code&gt; call patches the most recent unfinalized line for that pair with what actually happened: EXECUTED, FAILED, or ORDER_FAILED, plus the ticket. It only touches lines written in the last 15 minutes, so a slow hourly cycle can&#39;t corrupt an older decision&#39;s record.&lt;/p&gt;

&lt;p&gt;Each instance writes to its own log, so the fleet&#39;s accounts never mix.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;the-switch-is-currently-off&quot; href=&quot;https://dev.to/nodefiend/jev-assisted-llm-trading-ofa#the-switch-is-currently-off&quot;&gt;
  &lt;/a&gt;
  The switch is currently off
&lt;/h2&gt;

&lt;p&gt;Worth saying plainly: &lt;code&gt;SHADOW_MODE&lt;/code&gt; is not set in any launch config yet, so zero shadow calls have happened in production. The dashboard probe ledger shows nine calls, all from us poking at the API while building the plugin, and the Shadow Harness tab reads NOT ENABLED until the first row lands. The harness is new and the tests are new, and we want a few market-open cycles of confidence before turning on a collector that sits in the decision path.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;what-we-expect-the-data-to-answer&quot; href=&quot;https://dev.to/nodefiend/jev-assisted-llm-trading-ofa#what-we-expect-the-data-to-answer&quot;&gt;
  &lt;/a&gt;
  What we expect the data to answer
&lt;/h2&gt;

&lt;p&gt;Three questions, in order of interest.&lt;/p&gt;

&lt;p&gt;First, the big one: does coherence predict money? Every verdict lands in the same record as the real action and, downstream, the real P&amp;amp;L. If incoherent trades lose measurably more often than coherent ones, JEV graduates from observer to entry filter, and we skip or downsize flagged decisions. If it doesn&#39;t, we drop it. That&#39;s the point of measuring instead of believing.&lt;/p&gt;

&lt;p&gt;How a verdict gets scored is fixed before the first data point. The pass/fail bar is pre-registered in code — minimum sample sizes, a minimum counterfactual edge, a ceiling on JEV errors — and the backend and the dashboard banner read the same constants, so the goalposts can&#39;t move after the data arrives. That same tab is where we watch it: it shows one of five states — NOT ENABLED, INSUFFICIENT, SHIP CANDIDATE, KILL, HOLD — next to the histogram of disagreement edges and a per-day series. The edge itself is computed counterfactually: on rows where JEV withholds endorsement, we flip the sign of what the vision-side trade actually realized. That&#39;s a mirror approximation, not a P&amp;amp;L replay, and it&#39;s labelled as one; orders that never resolved are counted separately, never scored as zero. And if JEV&#39;s disagreements turn out to correlate with winners, the shadow signal dies first.&lt;/p&gt;

&lt;p&gt;Second, drift detection. The bot retries Gemini up to six times with exponential backoff, and we&#39;ve swapped models before (3.5-flash to 3.6-flash in July). Degraded or fallback responses usually get sloppier before they get unprofitable. A rise in inconsistent verdicts is a cheap alarm — a shadow call is text-only, input-only pricing, a fraction of a cent per decision, and every record carries the JEV latency and error status, so degradation shows up in the record itself before the drawdown alert does.&lt;/p&gt;

&lt;p&gt;Third, model comparison. Since the harness records each prompt&#39;s hash and the decision but stays agnostic about which model produced them, the same record can score an OpenRouter alternative against Gemini on identical charts. Evidence beats vibes when picking a model.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;what-it-cant-do&quot; href=&quot;https://dev.to/nodefiend/jev-assisted-llm-trading-ofa#what-it-cant-do&quot;&gt;
  &lt;/a&gt;
  What it can&#39;t do
&lt;/h2&gt;

&lt;p&gt;The limits are real and worth naming. JEV sees the text of the decision, never the chart pixels, so it audits self-consistency only. It will happily bless a confident, well-written, wrong call. It evaluates after the fact, so today it can&#39;t stop a trade, which is deliberate: any gating step is a later change with its own risk to review. And it&#39;s one question right now. Coverage is only as good as the question set, and one question is a start, not a panel. The API shape makes a panel cheap, though: several independent pass/fail checks can ride in a single request and get combined in code, and our dashboard probe already does that. Adding questions to the harness is a config change, not a rewrite.&lt;/p&gt;

&lt;p&gt;The whole thing is built to answer one question, and the answer is allowed to be no. If coherent trades don&#39;t make more money than incoherent ones, JEV gets dropped and we&#39;ve lost a few cents a decision and a couple of weeks. If they do, the auditor stops being a proofreader and becomes a filter. Either way the data decides, and the bar was written before the first verdict landed. That&#39;s the part I&#39;m actually proud of — not the harness, the willingness to let it be wrong.&lt;/p&gt;


            </description><link>https://dev.to/nodefiend/jev-assisted-llm-trading-ofa</link><guid isPermaLink="false">https://dev.to/nodefiend/jev-assisted-llm-trading-ofa</guid><pubDate>Sun, 20 Sep 2026 19:16:39 GMT</pubDate><author>chowderhead</author><enclosure url="https://media2.dev.to/dynamic/image/width=1000,height=420,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhe5l3nuggp0w3wzm3brs.png" type="image/jpeg"></enclosure><category>ai</category><category>jev</category><category>llm</category><category>gemini</category></item><item><title>Orca: The Agent Development Environment for Running AI Coding Agents in Parallel</title><description>&lt;p&gt;If you use Claude Code, Codex, or another AI coding agent in your terminal, you have probably hit this wall: the agent is busy on one task, you want to start a second one, and now you are juggling branches, stashing changes, and opening five terminal windows that all look the same.&lt;/p&gt;

&lt;p&gt;Orca is a desktop app built to solve exactly that. This article explains what it is, how it differs from Cursor, what it costs, and where it falls short.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;what-is-orca&quot; href=&quot;https://dev.to/arshtechpro/orca-explained-the-agent-development-environment-for-running-ai-coding-agents-in-parallel-440n#what-is-orca&quot;&gt;
  &lt;/a&gt;
  What is Orca?
&lt;/h2&gt;

&lt;p&gt;Orca calls itself an &lt;strong&gt;ADE&lt;/strong&gt;, an Agent Development Environment. The idea is simple:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A traditional &lt;strong&gt;IDE&lt;/strong&gt; is built around one human typing code.&lt;/li&gt;
&lt;li&gt;An &lt;strong&gt;ADE&lt;/strong&gt; is built around you &lt;em&gt;supervising several AI agents&lt;/em&gt; that write code at the same time.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In practice, Orca is a desktop app (macOS, Windows, Linux) where every task you start gets:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Its own &lt;strong&gt;git worktree&lt;/strong&gt; (an isolated copy of your repo on its own branch)&lt;/li&gt;
&lt;li&gt;Its own &lt;strong&gt;agent terminal&lt;/strong&gt; (Claude Code, Codex, Gemini, Cursor CLI, and so on)&lt;/li&gt;
&lt;li&gt;Its own &lt;strong&gt;browser tab&lt;/strong&gt; for previewing the app&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  &lt;a name=&quot;a-quick-primer-on-git-worktrees&quot; href=&quot;https://dev.to/arshtechpro/orca-explained-the-agent-development-environment-for-running-ai-coding-agents-in-parallel-440n#a-quick-primer-on-git-worktrees&quot;&gt;
  &lt;/a&gt;
  A quick primer on git worktrees
&lt;/h2&gt;

&lt;p&gt;Worktrees are the core idea behind Orca, so it is worth a 30-second refresher.&lt;/p&gt;

&lt;p&gt;Normally, one repo folder has one checked-out branch. A worktree lets you check out &lt;em&gt;another&lt;/em&gt; branch into a &lt;em&gt;separate folder&lt;/em&gt; that shares the same git history:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight shell&quot;&gt;&lt;code&gt;git worktree add ../fix-login-race &lt;span class=&quot;nt&quot;&gt;-b&lt;/span&gt; fix-login-race
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Now you have two folders, two branches, one repo. No stashing needed.&lt;/p&gt;

&lt;p&gt;Orca automates this. Click &quot;+&quot;, name your task, pick an agent, and Orca creates a real git worktree and launches the agent inside it. Because these are standard worktrees, you can always &lt;code&gt;cd&lt;/code&gt; into one and use plain git.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;what-does-a-typical-workflow-look-like&quot; href=&quot;https://dev.to/arshtechpro/orca-explained-the-agent-development-environment-for-running-ai-coding-agents-in-parallel-440n#what-does-a-typical-workflow-look-like&quot;&gt;
  &lt;/a&gt;
  What does a typical workflow look like?
&lt;/h2&gt;

&lt;p&gt;The Orca docs describe a &quot;first 3-agent session&quot; that sums up the whole product:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Add a repo.&lt;/strong&gt; Point Orca at a local checkout. It uses your default branch (for example &lt;code&gt;origin/main&lt;/code&gt;) as the base for new worktrees.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Create a worktree.&lt;/strong&gt; Give the task a name like &lt;code&gt;fix-login-race&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pick an agent.&lt;/strong&gt; Choose Claude Code, Codex, Cursor CLI, or another supported agent. Orca launches its CLI in the right directory.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Race agents.&lt;/strong&gt; Repeat twice more with different agents and paste the same prompt into each:

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;fix-login-race&lt;/code&gt; with Claude Code&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;fix-login-race-2&lt;/code&gt; with Codex&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;fix-login-race-3&lt;/code&gt; with Cursor CLI&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Split panes&lt;/strong&gt; so you can watch all three working at once.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Review and ship.&lt;/strong&gt; Open each diff, leave inline comments to send back to the best agent, then commit and push from inside Orca. Delete the losing worktrees in one click.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That loop (add, worktree, agent, split, diff, ship) is essentially the whole product. Everything else is a deeper version of one of those steps.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;key-features&quot; href=&quot;https://dev.to/arshtechpro/orca-explained-the-agent-development-environment-for-running-ai-coding-agents-in-parallel-440n#key-features&quot;&gt;
  &lt;/a&gt;
  Key features
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Parallel worktrees.&lt;/strong&gt; Every task is isolated, so five agents can work on the same repo without overwriting each other.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bring your own agent.&lt;/strong&gt; Orca ships preconfigured for a long list of CLI agents, including Claude Code, Codex, Gemini, Cursor CLI, GitHub Copilot, OpenCode, Amp, Goose, Cline, Kiro, and Qwen Code, and any other CLI agent can be added.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Annotate AI diffs.&lt;/strong&gt; Leave markdown comments on specific diff lines, batch them, and send them back to the agent as feedback. You can also inspect CI, resolve conflicts, and open PRs in the app.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Design Mode.&lt;/strong&gt; Each worktree gets a real Chromium window. Click a UI element and Orca sends its HTML, CSS, and a cropped screenshot to your agent. Useful for &quot;fix this button&quot; style front-end work.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Terminal.&lt;/strong&gt; GPU-rendered, with unlimited splits, scrollback that survives restarts, and scrollback search. On first launch it can import your Ghostty settings.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Editor.&lt;/strong&gt; It includes a VS Code-style (Monaco) editor with autosave, so you can make manual edits without leaving the app.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SSH worktrees.&lt;/strong&gt; Run agents on a powerful remote machine with full file editing, git, and terminals, plus auto-reconnect and port forwarding.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitHub, Linear, and Jira integration.&lt;/strong&gt; Browse PRs and issues, open a worktree straight from a task, and review PRs without switching apps.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Orca CLI.&lt;/strong&gt; Agents can drive Orca too, for example creating worktrees themselves, which enables orchestration and scheduled automations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Usage tracking.&lt;/strong&gt; See Claude and Codex usage and rate-limit reset times, and swap between Codex accounts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mobile companion.&lt;/strong&gt; iOS and Android apps let you check agent status, get notifications, and keep terminal work moving when you are away from your desk.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;is-orca-like-cursor&quot; href=&quot;https://dev.to/arshtechpro/orca-explained-the-agent-development-environment-for-running-ai-coding-agents-in-parallel-440n#is-orca-like-cursor&quot;&gt;
  &lt;/a&gt;
  Is Orca like Cursor?
&lt;/h2&gt;

&lt;p&gt;Short answer: &lt;strong&gt;they overlap, but they solve different problems.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cursor&lt;/strong&gt; is an AI-first code editor (a fork of VS Code). The AI lives &lt;em&gt;inside&lt;/em&gt; the editor: autocomplete as you type, chat in a sidebar, and an agent mode. You are the main author, and the AI assists you in one workspace. You pay Cursor for access to the models.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Orca&lt;/strong&gt; is an orchestration layer for &lt;em&gt;CLI agents&lt;/em&gt;. It does not provide its own model. Instead, it runs the agents you already have (including Cursor&#39;s own CLI agent) side by side, each in its own isolated branch, and gives you tools to review and merge their output.&lt;/p&gt;

&lt;div class=&quot;table-wrapper-paragraph&quot;&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Orca&lt;/th&gt;
&lt;th&gt;Cursor&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Core idea&lt;/td&gt;
&lt;td&gt;Manage many agents in parallel&lt;/td&gt;
&lt;td&gt;AI-assisted editor&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Built on&lt;/td&gt;
&lt;td&gt;Desktop app wrapping CLI agents, terminals, browser, editor&lt;/td&gt;
&lt;td&gt;Fork of VS Code&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AI models&lt;/td&gt;
&lt;td&gt;Bring your own (Claude Code, Codex, Gemini, etc.)&lt;/td&gt;
&lt;td&gt;Cursor&#39;s subscription and models&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Parallel agents&lt;/td&gt;
&lt;td&gt;First-class, one worktree per task&lt;/td&gt;
&lt;td&gt;Supported, but not the main workflow&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Inline autocomplete while you type&lt;/td&gt;
&lt;td&gt;Not a headline feature&lt;/td&gt;
&lt;td&gt;Yes, a core feature&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Open source&lt;/td&gt;
&lt;td&gt;Yes, MIT&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Platforms&lt;/td&gt;
&lt;td&gt;macOS, Windows, Linux&lt;/td&gt;
&lt;td&gt;macOS, Windows, Linux&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Price of the tool itself&lt;/td&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;td&gt;Free tier plus paid plans&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;A useful way to think about it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If you mostly &lt;strong&gt;write code yourself&lt;/strong&gt; and want AI help as you type, Cursor (or a similar AI editor) is the more natural fit.&lt;/li&gt;
&lt;li&gt;If you mostly &lt;strong&gt;delegate tasks to agents&lt;/strong&gt; and your job is increasingly to review, compare, and merge their output, Orca is designed for that.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  &lt;a name=&quot;pricing-is-orca-free&quot; href=&quot;https://dev.to/arshtechpro/orca-explained-the-agent-development-environment-for-running-ai-coding-agents-in-parallel-440n#pricing-is-orca-free&quot;&gt;
  &lt;/a&gt;
  Pricing: is Orca free?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Yes. The Orca app is free and open source under the MIT license.&lt;/strong&gt; There is no paid tier listed on the website.&lt;/p&gt;

&lt;p&gt;There are two things to be aware of:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;You pay for the agents.&lt;/strong&gt; Orca is not a model. You need your own Claude, Codex, Gemini, or other subscription or API key. Running three agents in parallel can use your quota roughly three times as fast.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enterprise is &quot;contact us.&quot;&lt;/strong&gt; There is an Enterprise page covering security reviews, self-hosting, rollout help, and SOC 2 readiness, but no public pricing. You have to email the team.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  &lt;a name=&quot;installing-orca&quot; href=&quot;https://dev.to/arshtechpro/orca-explained-the-agent-development-environment-for-running-ai-coding-agents-in-parallel-440n#installing-orca&quot;&gt;
  &lt;/a&gt;
  Installing Orca
&lt;/h2&gt;

&lt;p&gt;Download builds for each platform from the &lt;a href=&quot;https://www.onorca.dev/download&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;download page&lt;/a&gt; or GitHub Releases. On macOS you can also use Homebrew:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight shell&quot;&gt;&lt;code&gt;brew &lt;span class=&quot;nb&quot;&gt;install&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;--cask&lt;/span&gt; stablyai/orca/orca
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;A few notes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;On first launch, Orca offers to import your &lt;code&gt;~/.claude&lt;/code&gt;, &lt;code&gt;~/.codex&lt;/code&gt;, and Ghostty settings.&lt;/li&gt;
&lt;li&gt;On Linux, pick the AppImage if you want automatic updates. The CLI is named &lt;code&gt;orca-ide&lt;/code&gt; so it does not clash with the GNOME Orca screen reader.&lt;/li&gt;
&lt;li&gt;The app auto-updates on a stable channel, with optional release-candidate builds for early features.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  &lt;a name=&quot;who-should-try-orca&quot; href=&quot;https://dev.to/arshtechpro/orca-explained-the-agent-development-environment-for-running-ai-coding-agents-in-parallel-440n#who-should-try-orca&quot;&gt;
  &lt;/a&gt;
  Who should try Orca?
&lt;/h2&gt;

&lt;p&gt;Orca is worth a look if:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You already use one or more CLI coding agents and feel limited by running one task at a time.&lt;/li&gt;
&lt;li&gt;You want to compare how different agents handle the same bug.&lt;/li&gt;
&lt;li&gt;You want a Claude Code or Codex workflow on Windows or Linux with a proper UI around it.&lt;/li&gt;
&lt;li&gt;You like running agents on a remote machine and checking on them from your phone.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can probably skip it if you rarely use agents, prefer AI autocomplete while you type, or want a single all-in-one subscription that handles the models for you.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Links&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub: &lt;a href=&quot;https://github.com/stablyai/orca&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;https://github.com/stablyai/orca&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;


            </description><link>https://dev.to/arshtechpro/orca-explained-the-agent-development-environment-for-running-ai-coding-agents-in-parallel-440n</link><guid isPermaLink="false">https://dev.to/arshtechpro/orca-explained-the-agent-development-environment-for-running-ai-coding-agents-in-parallel-440n</guid><pubDate>Sun, 20 Sep 2026 06:00:36 GMT</pubDate><author>ArshTechPro</author><enclosure url="https://media2.dev.to/dynamic/image/width=1000,height=420,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fy45mqxyofz0hyp0wscvw.png" type="image/jpeg"></enclosure><category>ai</category><category>productivity</category><category>tooling</category><category>agents</category></item><item><title>Jev vs Claude: Who Wins?</title><description>&lt;p&gt;I did not need Jev to beat Claude or Kimi on a benchmark. I needed to know whether I could trust it with a decision I actually make regularly, where a false pass matters and uncertainty cannot just be hidden behind confident prose.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;That is a much harder test of the product claim.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;the-decision-i-actually-needed&quot; href=&quot;https://dev.to/bengreenberg/jev-vs-claude-who-wins-4mln#the-decision-i-actually-needed&quot;&gt;
  &lt;/a&gt;
  The decision I actually needed
&lt;/h2&gt;

&lt;p&gt;A surprising amount of AI work starts with the assumption that the answer should come from a large language model.&lt;/p&gt;

&lt;p&gt;I wanted to challenge that assumption.&lt;/p&gt;

&lt;p&gt;I had a useful test case in a judging workflow that I have iterated upon numerous times and use multiple times a year. The dataset I used for this experiment was from the 2026 Arbitrum Open House London Online Buildathon. One part of that workflow is an &lt;em&gt;Arbitrum Alignment&lt;/em&gt; gate. Given the evidence already collected for a project, the system has to make one bounded decision:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;satisfied, not_satisfied, or insufficient_evidence.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;That is not a writing task.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The broader judging rubric absolutely contains work that benefits from a frontier LLM. There are 0 to 5 scores that require reading code, interpreting implementation quality, and weighing technical evidence. There are also prose fields where useful explanations need to be generated.&lt;/p&gt;

&lt;p&gt;The full workflow never ends with a final score, rather a brief is given back to me, the human reviewer, to thoroughly analyze, source check and make a final call on.&lt;/p&gt;

&lt;p&gt;I was not testing those.&lt;/p&gt;

&lt;p&gt;I isolated the part of the workflow where the model is not being asked to write, brainstorm, explain, or synthesize an open-ended answer. It is being asked to apply a defined policy to a bounded evidence packet and choose one of three states.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;That is almost exactly the territory TypeSafe claims Jev is built for.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;So the question was not whether Jev could replace Claude, GLM, Kimi or Qwen.&lt;/p&gt;

&lt;p&gt;It was whether those models were overkill for this decision in the first place.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;a-fair-fight-deliberately-narrow&quot; href=&quot;https://dev.to/bengreenberg/jev-vs-claude-who-wins-4mln#a-fair-fight-deliberately-narrow&quot;&gt;
  &lt;/a&gt;
  A fair fight, deliberately narrow
&lt;/h2&gt;

&lt;p&gt;I tested 102 archived submissions, anonymized as P-numbers.&lt;/p&gt;

&lt;p&gt;Each system received the same JSON evidence packet and the same four-step written decision procedure. Every configuration ran three times across all 102 submissions, producing 306 decisions per variant. I ran it against Claude Sonnet.&lt;/p&gt;

&lt;p&gt;There was no Jev specific simplification of the policy and no additional context given to Sonnet. Both systems had to answer the same question from the same evidence.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkv6zg4t11l86wn1qmkdx.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkv6zg4t11l86wn1qmkdx.png&quot; alt=&quot;A controlled decision test&quot; loading=&quot;lazy&quot; width=&quot;795&quot; height=&quot;72&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The narrowness of the test is important here because it relates exactly to what TypeSafe claims Jev is all about.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Jev is not a general-purpose text model. TypeSafe positions it as a System One model for structured decisions, with primitives such as Choice, Score, and Noul rather than free-form generation. Choice, the relevant primitive here, selects among a predefined set of outcomes and returns probabilities and confidence alongside the decision.&lt;/p&gt;

&lt;p&gt;The workload also fit within Jev&#39;s current constraints. I was passing a structured evidence packet for one verification gate, not asking it to ingest an entire repository or execute the complete judging workflow.&lt;/p&gt;

&lt;p&gt;That makes this a deliberately unfair place to make a sweeping model comparison.&lt;/p&gt;

&lt;p&gt;It also makes it a very fair place to test Jev&#39;s actual claim.&lt;/p&gt;

&lt;p&gt;If a model built specifically for bounded decisions cannot hold up here, then everything else about Jev pretty much falls to the sidelines.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;same-accuracy-band-radically-different-operating-cost&quot; href=&quot;https://dev.to/bengreenberg/jev-vs-claude-who-wins-4mln#same-accuracy-band-radically-different-operating-cost&quot;&gt;
  &lt;/a&gt;
  Same accuracy band, radically different operating cost
&lt;/h2&gt;

&lt;p&gt;No more suspense, the tl;dr is it held up.&lt;/p&gt;

&lt;p&gt;Jev choice plus four diagnostic Nouls reached 100.0% accuracy against the existing labels across the 306 decisions. It produced zero false passes, zero false flags, and was unanimous across all three runs.&lt;/p&gt;

&lt;p&gt;Claude Sonnet 5 at high reasoning reached 99.0%.&lt;/p&gt;

&lt;p&gt;On the headline metric, that is effectively the same accuracy band: 100.0% versus 99.0%.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Then the economics diverge sharply.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjpbxdjc8l63u1rqo82q9.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjpbxdjc8l63u1rqo82q9.png&quot; alt=&quot;Same accuracy band, different operating model&quot; loading=&quot;lazy&quot; width=&quot;799&quot; height=&quot;411&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Jev&#39;s median latency was 378 milliseconds.&lt;/p&gt;

&lt;p&gt;Sonnet high&#39;s was 3,554 milliseconds.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;That made Sonnet roughly 9.4 times slower on this task.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;At the measured usage and pricing, 10,000 evaluations would cost approximately $2.27 with Jev and $129.74 with Sonnet high.&lt;/p&gt;

&lt;p&gt;That is roughly a 57x difference.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fulpu5pqx88wro99h5t71.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fulpu5pqx88wro99h5t71.png&quot; alt=&quot;Jev vs Sonnet high&quot; loading=&quot;lazy&quot; width=&quot;512&quot; height=&quot;288&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is where the experiment stops being an interesting model comparison and starts becoming a systems-design question.&lt;/p&gt;

&lt;p&gt;If the output I need is one of three known states, and a decision-specific model can deliver comparable accuracy for roughly one-fiftieth the operating cost, what exactly am I buying from the generative model?&lt;/p&gt;

&lt;p&gt;But raw accuracy gives good marks to both systems.&lt;/p&gt;

&lt;p&gt;Of the 102 gold labels, 77 are satisfied, seven are not_satisfied, and 18 are insufficient_evidence.&lt;/p&gt;

&lt;p&gt;A classifier that simply answered satisfied every time would already look pretty good on an accuracy chart while being completely unacceptable for the purpose of this gate.&lt;/p&gt;

&lt;p&gt;The hard part is not recognizing the obvious passes. It is knowing what to do when the evidence is incomplete, ambiguous, or negative.&lt;/p&gt;

&lt;p&gt;That is where the failures became much more interesting than the headline score.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;confidence-that-changes-the-workflow&quot; href=&quot;https://dev.to/bengreenberg/jev-vs-claude-who-wins-4mln#confidence-that-changes-the-workflow&quot;&gt;
  &lt;/a&gt;
  Confidence that changes the workflow
&lt;/h2&gt;

&lt;p&gt;This was the result that changed how I thought about Jev.&lt;/p&gt;

&lt;p&gt;Jev Choice alone made two incorrect decisions across the 306 runs. Both landed in its 0.2 to 0.3 confidence range.&lt;/p&gt;

&lt;p&gt;Sonnet high made three incorrect decisions. All three landed in its 0.9 to 1.0 confidence bin.&lt;/p&gt;

&lt;p&gt;Jev&#39;s Expected Calibration Error was 0.037. Sonnet high&#39;s was 0.058.&lt;/p&gt;

&lt;p&gt;Those numbers matter, but the workflow implication matters more.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxnrajk6zic3zumvqxpba.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxnrajk6zic3zumvqxpba.png&quot; alt=&quot;Confidence changes the workflow&quot; loading=&quot;lazy&quot; width=&quot;800&quot; height=&quot;800&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At a Jev confidence threshold of 0.5, I could have automated 98% of the decisions in this dataset while retaining 100% accuracy among the automated decisions.&lt;/p&gt;

&lt;p&gt;The remaining 2% could have gone to human review.&lt;/p&gt;

&lt;p&gt;That is a far more useful property than simply being right slightly more often.&lt;/p&gt;

&lt;p&gt;A model does not need to be perfectly accurate to be useful in an automated decision pipeline. It needs its uncertainty to correlate with the places where automation becomes dangerous.&lt;/p&gt;

&lt;p&gt;The two systems also failed differently.&lt;/p&gt;

&lt;p&gt;Jev Choice&#39;s majority error was in an ambiguous row labeled insufficient_evidence that Jev passed as satisfied.&lt;/p&gt;

&lt;p&gt;But Jev also assigned low confidence to the decision. A simple confidence gate would have stopped it from being automated.&lt;/p&gt;

&lt;p&gt;Sonnet&#39;s failures centered on an empty-repository row labeled insufficient_evidence that it classified as not_satisfied.&lt;/p&gt;

&lt;p&gt;That is a less serious outcome operationally, but it exposes another distinction in the policy: &quot;the evidence shows the requirement was not met&quot; and &quot;there is not enough evidence to decide&quot; are not the same state.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sonnet recognized that something was wrong, but it was highly confident in the wrong category.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is why I find the confidence result more serious than the 100.0% accuracy result.&lt;/p&gt;

&lt;p&gt;The interesting question is not just whether a model can make the decision. It is whether the model gives the surrounding system enough information to know when not to let that decision through.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;keep-the-policy-whole&quot; href=&quot;https://dev.to/bengreenberg/jev-vs-claude-who-wins-4mln#keep-the-policy-whole&quot;&gt;
  &lt;/a&gt;
  Keep the policy whole
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;What happened when I tried to make the system more deterministic?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Jev exposes smaller decision primitives that make decomposition appealing. Alongside the final Choice, I used four Nouls as diagnostic sub-decisions. A Noul evaluates whether a statement is true and returns a probability.&lt;/p&gt;

&lt;p&gt;That gives you something very helpful: inspectable intermediate state.&lt;/p&gt;

&lt;p&gt;My instinct was to take those four individual judgments and implement the final four-step policy myself in code.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ask the model the atomic questions.&lt;/li&gt;
&lt;li&gt;Get four probabilities.&lt;/li&gt;
&lt;li&gt;Write the conditionals.&lt;/li&gt;
&lt;li&gt;Remove as much model judgment from the final step as possible.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It sounded safer. It was actually significantly worse.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzi7wy0t6k7r0v7u9o5yf.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzi7wy0t6k7r0v7u9o5yf.png&quot; alt=&quot;Whole-policy judgment beats reconstruction&quot; loading=&quot;lazy&quot; width=&quot;799&quot; height=&quot;288&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Jev Choice alone reached 99.3%.&lt;/p&gt;

&lt;p&gt;Choice plus the four diagnostic Nouls reached 100.0%.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My hand-coded composite of those same four Nouls fell to 94.1% and produced six false passes.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fm0mx4wllgobtgphdl58p.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fm0mx4wllgobtgphdl58p.png&quot; alt=&quot;How the evaluation method changed accuracy&quot; loading=&quot;lazy&quot; width=&quot;512&quot; height=&quot;288&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That is beyond a rounding error, it is the worst failure mode for this gate.&lt;/p&gt;

&lt;p&gt;The individual sub-decisions were useful. My reconstruction of the policy from them was not.&lt;/p&gt;

&lt;p&gt;I learned something important from that:&lt;/p&gt;

&lt;p&gt;Sub-decisions are valuable for diagnosis, auditability, and understanding why a result occurred. But an ordered decision policy is not necessarily equivalent to a bag of independent Boolean answers. The sequence matters. The interaction between conditions matters. The meaning of one piece of evidence can depend on what has already been established elsewhere in the procedure.&lt;/p&gt;

&lt;p&gt;In this experiment, asking Jev to apply the written policy as a whole worked better than asking it for individually reasonable facts and assuming I could perfectly reassemble the judgment afterward.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Jev does not replace the rest of this judging workflow.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It accepts text rather than repositories. Its current context constraints make it unsuitable for simply dumping an entire codebase into the model. The judging rubric still includes code-reading scores, broader analysis, and generated prose where a frontier LLM remains the more appropriate tool.&lt;/p&gt;

&lt;p&gt;The result is not &quot;Jev replaces Claude.&quot; It is that in this very real workflow where there is a consistent bounded decision gate, a general LLM may not be the right tool anymore.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpi768zkq5a7d4f18aan8.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpi768zkq5a7d4f18aan8.png&quot; alt=&quot;Different jobs, different models&quot; loading=&quot;lazy&quot; width=&quot;799&quot; height=&quot;453&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once I separated those two things in what is needed for a generative LLM model and a System One model, the economics changed by roughly 57x, the latency changed by nearly an order of magnitude, and the confidence signal gave me a credible way to automate almost the entire workload while escalating the uncertain edge cases.&lt;/p&gt;

&lt;p&gt;I&#39;m still figuring out where and how to apply this new model into my workflows, but this experiment has given me a good starting point in understanding its strengths and its weaknesses. More importantly, it&#39;s opened my eyes up to the potential of AI systems that incorporate more than the current ways of doing things.&lt;/p&gt;


            </description><link>https://dev.to/bengreenberg/jev-vs-claude-who-wins-4mln</link><guid isPermaLink="false">https://dev.to/bengreenberg/jev-vs-claude-who-wins-4mln</guid><pubDate>Fri, 18 Sep 2026 11:15:07 GMT</pubDate><author>Ben Greenberg</author><enclosure url="https://media2.dev.to/dynamic/image/width=1000,height=420,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fks97t21dtlzy5offfyaw.png" type="image/jpeg"></enclosure><category>ai</category><category>machinelearning</category><category>typescript</category><category>todayilearned</category></item><item><title>TypeSafe Jev Played Chess — And Landed Next to Reasoning Models</title><description>&lt;p&gt;TypeSafe&#39;s &lt;a href=&quot;https://docs.typesafe.ai/introduction&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;Jev&lt;/a&gt; is an odd one. It isn&#39;t a chat model - you send a &lt;strong&gt;state&lt;/strong&gt; plus typed &lt;strong&gt;questions&lt;/strong&gt; (Choice / Score / Noul) and get labels with probabilities — like a classifier, except the input can be free text and you choose the labels each time.&lt;/p&gt;

&lt;p&gt;I&#39;ve been running models through &lt;a href=&quot;https://maxim-saplin.github.io/llm_chess/&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;LLM Chess&lt;/a&gt; for a while. LLMs play in an agentic setting with a multi-turn protocol: &lt;code&gt;get_current_board&lt;/code&gt;, &lt;code&gt;get_legal_moves&lt;/code&gt;, &lt;code&gt;make_move &amp;lt;uci&amp;gt;&lt;/code&gt;. Jev doesn&#39;t do that. Can you still put it on the same leaderboard?&lt;/p&gt;

&lt;p&gt;Apparently yes — if you talk to it the way it expects.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;a-note-on-antibenchmarks&quot; href=&quot;https://dev.to/maximsaplin/typesafe-jev-played-chess-and-landed-next-to-reasoning-models-28ga#a-note-on-antibenchmarks&quot;&gt;
  &lt;/a&gt;
  A note on (anti-)benchmarks
&lt;/h2&gt;

&lt;p&gt;TypeSafe is openly &lt;a href=&quot;https://typesafe.ai/blog/antibenchmaxxing&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;anti-benchmaxxing&lt;/a&gt;. In the &lt;a href=&quot;https://typesafe.ai/blog/introducing-system-one-models-and-jev&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;System One / Jev launch post&lt;/a&gt; they say existing LLM benchmarks don&#39;t really apply here, and they skip the usual public-eval scoreboard putting it&#39;s model next to other models. They prefer dated internal snapshots instead.&lt;/p&gt;

&lt;p&gt;I put Jev on &lt;a href=&quot;https://maxim-saplin.github.io/llm_chess/&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;LLM Chess&lt;/a&gt; anyway — same harness, same opponents as the chat models.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;talking-to-hawking&quot; href=&quot;https://dev.to/maximsaplin/typesafe-jev-played-chess-and-landed-next-to-reasoning-models-28ga#talking-to-hawking&quot;&gt;
  &lt;/a&gt;
  Talking to Hawking
&lt;/h2&gt;

&lt;p&gt;It reminded me of talking to Stephen Hawking: smart, but no free speech. Answers do not come out in a free from&lt;/p&gt;

&lt;p&gt;Outside chess I tried a silly next-character loop — Choice over &lt;code&gt;a–z&lt;/code&gt; plus &lt;code&gt;&amp;lt;eos&amp;gt;&lt;/code&gt;, one API call per letter. Asked to spell &lt;em&gt;blue&lt;/em&gt; or finish &lt;em&gt;hel…&lt;/em&gt;, it spat out almost-words (&lt;code&gt;bue&lt;/code&gt;, &lt;code&gt;helhoh&lt;/code&gt;). Started from &lt;code&gt;pari…&lt;/code&gt; and it finished &lt;code&gt;paris&lt;/code&gt;. Generating from scratch was weak; finishing a partial worked better. A fixed list of legal chess moves fits this model much better than spelling English letter by letter.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;how-i-wired-it-into-llm-chess&quot; href=&quot;https://dev.to/maximsaplin/typesafe-jev-played-chess-and-landed-next-to-reasoning-models-28ga#how-i-wired-it-into-llm-chess&quot;&gt;
  &lt;/a&gt;
  How I wired it into LLM Chess
&lt;/h2&gt;

&lt;p&gt;Each ply:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;state:&lt;/strong&gt; &lt;code&gt;{ fen, side_to_move }&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;one Choice:&lt;/strong&gt; all legal UCI moves as options (SAN in the criteria text), max 255&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Jev returns a UCI string. It turns into &lt;code&gt;make_move e7e5&lt;/code&gt; — same action chat models send to the eval runner, on the outside seems almost like normal eval interaction.&lt;/p&gt;

&lt;p&gt;Pricing: &lt;strong&gt;$0.042 / 1M input tokens&lt;/strong&gt;, output free.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;results&quot; href=&quot;https://dev.to/maximsaplin/typesafe-jev-played-chess-and-landed-next-to-reasoning-models-28ga#results&quot;&gt;
  &lt;/a&gt;
  Results
&lt;/h2&gt;

&lt;p&gt;On the current leaderboard &lt;code&gt;jev-latest&lt;/code&gt; is around &lt;strong&gt;#59&lt;/strong&gt;, Elo &lt;strong&gt;~243&lt;/strong&gt;, sitting next to &lt;code&gt;qwen3.6-27b&lt;/code&gt; and &lt;code&gt;o4-mini-medium&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&quot;table-wrapper-paragraph&quot;&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;#&lt;/th&gt;
&lt;th&gt;Player&lt;/th&gt;
&lt;th&gt;Elo&lt;/th&gt;
&lt;th&gt;Game Duration&lt;/th&gt;
&lt;th&gt;Tokens&lt;/th&gt;
&lt;th&gt;Cost/Game&lt;/th&gt;
&lt;th&gt;Time/Game&lt;/th&gt;
&lt;th&gt;Games&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;58&lt;/td&gt;
&lt;td&gt;qwen3.6-27b@q4_k_s&lt;/td&gt;
&lt;td&gt;270.0±148.6&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;td&gt;5956&lt;/td&gt;
&lt;td&gt;$1.46&lt;/td&gt;
&lt;td&gt;7.54h&lt;/td&gt;
&lt;td&gt;27&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;59&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;jev-latest&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;242.9±117.5&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;100%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;119&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$0.0015&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;35.6s&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;80&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;60&lt;/td&gt;
&lt;td&gt;o4-mini-medium&lt;/td&gt;
&lt;td&gt;240.3±64.3&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;td&gt;2156&lt;/td&gt;
&lt;td&gt;$1.11&lt;/td&gt;
&lt;td&gt;41.5m&lt;/td&gt;
&lt;td&gt;199&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Elo&lt;/strong&gt; which I treat as a proxy to reasoning capability, is in the same band as mid-pack reasoning / strong small models&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Game duration 100%&lt;/strong&gt; — full games, not early deaths on illegal moves or broken dialogs, perfect protocol following (that&#39;s what type safety buys you).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;~36s / game&lt;/strong&gt; and &lt;strong&gt;~$0.0015 / game&lt;/strong&gt; (~$0.00002 / move); 80 games ≈ &lt;strong&gt;$0.12&lt;/strong&gt; total vs a dollar-plus per game for Elo neighbors. That&#39;s super fast and extermely cheap.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  &lt;a name=&quot;draws-vs-dragon&quot; href=&quot;https://dev.to/maximsaplin/typesafe-jev-played-chess-and-landed-next-to-reasoning-models-28ga#draws-vs-dragon&quot;&gt;
  &lt;/a&gt;
  Draws vs Dragon
&lt;/h2&gt;

&lt;p&gt;Dragon (white) vs Jev (black), 10 games per level:&lt;/p&gt;

&lt;div class=&quot;table-wrapper-paragraph&quot;&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dragon&lt;/th&gt;
&lt;th&gt;Dragon wins&lt;/th&gt;
&lt;th&gt;Draws&lt;/th&gt;
&lt;th&gt;Jev wins&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;L1&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;L2&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;L3&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;50% draws&lt;/strong&gt; at L1, L2, and L3. Flat. With most chat models, stronger Dragon usually means fewer draws — the engine finishes more games. Here the draw rate doesn&#39;t drop across three levels. That helps the Elo.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;system-one-on-the-board&quot; href=&quot;https://dev.to/maximsaplin/typesafe-jev-played-chess-and-landed-next-to-reasoning-models-28ga#system-one-on-the-board&quot;&gt;
  &lt;/a&gt;
  System One on the board
&lt;/h2&gt;

&lt;p&gt;TypeSafe calls these System One models: fast decisions, no deep thinking.&lt;/p&gt;

&lt;p&gt;Chess still needs real choices — what to capture, when to trade, when to aim for a draw. Jev has no chat, costs fractions of a cent per game, and still lands near mid-pack reasoning models on Elo. So the skill isn&#39;t &quot;writing about chess.&quot; It&#39;s picking a move from a list.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;takeaways&quot; href=&quot;https://dev.to/maximsaplin/typesafe-jev-played-chess-and-landed-next-to-reasoning-models-28ga#takeaways&quot;&gt;
  &lt;/a&gt;
  Takeaways
&lt;/h2&gt;

&lt;p&gt;TypeSafe doesn&#39;t want a public leaderboard as their proof. This is one outside eval.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Jev fits tasks where you already have a list of options (tools, routes, labels, moves). Asking it to write English letter-by-letter is a bad fit (&lt;code&gt;bue&lt;/code&gt; / &lt;code&gt;helhoh&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;~$0.0015 and ~36s per game is a different cost/speed class than dollar-scale LLM evals.&lt;/li&gt;
&lt;li&gt;Useful where the product needs &lt;em&gt;which option&lt;/em&gt;, not a paragraph — routing, structured agents, decision steps in code.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Leaderboard: &lt;a href=&quot;https://maxim-saplin.github.io/llm_chess/&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;LLM Chess&lt;/a&gt;&lt;br&gt;&lt;br&gt;
Harness: &lt;a href=&quot;https://github.com/maxim-saplin/llm_chess&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;maxim-saplin/llm_chess&lt;/a&gt; (&lt;code&gt;feat/typesafe-jev-player&lt;/code&gt; branch / TypeSafe Jev player)&lt;/p&gt;


            </description><link>https://dev.to/maximsaplin/typesafe-jev-played-chess-and-landed-next-to-reasoning-models-28ga</link><guid isPermaLink="false">https://dev.to/maximsaplin/typesafe-jev-played-chess-and-landed-next-to-reasoning-models-28ga</guid><pubDate>Thu, 17 Sep 2026 17:13:09 GMT</pubDate><author>Maxim Saplin</author><enclosure url="https://media2.dev.to/dynamic/image/width=1000,height=420,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4oah64zi1h078mrwq9is.png" type="image/jpeg"></enclosure><category>ai</category><category>evals</category><category>llm</category><category>agents</category></item><item><title>How to Use Jev: A practical guide to TypeSafe&#39;s System One model</title><description>&lt;p&gt;&lt;strong&gt;Jev is a frontier AI model from TypeSafe AI that returns typed, probabilistic decisions instead of generated text.&lt;/strong&gt; You send program state plus typed questions; it answers all of them in one parallel pass in 70 to 500 milliseconds, at $0.042 per million input tokens with output free. It launched September 15, 2026 with $40M led by DCVC, built by Diogo Almeida, who co-invented RLHF and InstructGPT at OpenAI.&lt;/p&gt;

&lt;p&gt;This is the practical guide: setup, the three primitives, five patterns worth stealing, the failure modes that will bite you, and what people shipped in the first 48 hours.&lt;/p&gt;


&lt;hr&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8dtbhyvig5s4z84o8zfk.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8dtbhyvig5s4z84o8zfk.png&quot; alt=&quot;Intelligence&quot; loading=&quot;lazy&quot; width=&quot;800&quot; height=&quot;465&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TypeSafe AI&lt;/strong&gt; calls Jev, this class of model &lt;strong&gt;System One&lt;/strong&gt;, after Kahneman&#39;s fast, intuitive thinking. The bet is that most decisions inside software are System 1 judgments (&quot;which bucket is this?&quot;, &quot;is this urgent?&quot;) and we have been renting System 2 to make them.&lt;/p&gt;

&lt;div class=&quot;table-wrapper-paragraph&quot;&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Jev&lt;/th&gt;
&lt;th&gt;Frontier LLMs&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;End-to-end latency&lt;/td&gt;
&lt;td&gt;70ms to 500ms&lt;/td&gt;
&lt;td&gt;3s to 329s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Input price&lt;/td&gt;
&lt;td&gt;$0.042 / MTok&lt;/td&gt;
&lt;td&gt;$0.20 to $10 / MTok&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Output price&lt;/td&gt;
&lt;td&gt;free&lt;/td&gt;
&lt;td&gt;~5x input&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Structured-output errors&lt;/td&gt;
&lt;td&gt;0% (by construction)&lt;/td&gt;
&lt;td&gt;0.58% to 45.5%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Caveat up front, and I come back to it at the end: those are TypeSafe&#39;s own numbers, self-run and unreproduced.&lt;/p&gt;


&lt;hr&gt;

&lt;h2&gt;
  &lt;a name=&quot;setup&quot; href=&quot;https://dev.to/valyuai/how-to-use-jev-a-practical-guide-to-typesafes-system-one-model-g5e#setup&quot;&gt;
  &lt;/a&gt;
  Setup
&lt;/h2&gt;

&lt;p&gt;Get a key from &lt;a href=&quot;https://console.typesafe.ai/settings/keys&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;console.typesafe.ai/settings/keys&lt;/a&gt; (early access is waitlisted) or from &lt;a href=&quot;https://vercel.com/ai-gateway/models/jev&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;Vercel AI gateway&lt;/a&gt; and export it:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight shell&quot;&gt;&lt;code&gt;&lt;span class=&quot;nb&quot;&gt;export &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;TYPESAFE_API_KEY&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;sk-...&quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Python&lt;/strong&gt; (3.10+):&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight shell&quot;&gt;&lt;code&gt;pip &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;typesafe-sdk
&lt;span class=&quot;c&quot;&gt;# or: uv add typesafe-sdk&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;JavaScript/TypeScript&lt;/strong&gt; (Node 20+):&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight shell&quot;&gt;&lt;code&gt;npm &lt;span class=&quot;nb&quot;&gt;install&lt;/span&gt; @typesafe-ai/sdk
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Both SDKs read &lt;code&gt;TYPESAFE_API_KEY&lt;/code&gt; from the environment and default to &lt;code&gt;jev-latest&lt;/code&gt;. There is one endpoint, &lt;code&gt;POST https://api.typesafe.ai/v1/systemone&lt;/code&gt;, if you would rather call it directly.&lt;/p&gt;


&lt;hr&gt;

&lt;h2&gt;
  &lt;a name=&quot;the-three-primitives&quot; href=&quot;https://dev.to/valyuai/how-to-use-jev-a-practical-guide-to-typesafes-system-one-model-g5e#the-three-primitives&quot;&gt;
  &lt;/a&gt;
  The three primitives
&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwd4cvjl9v43bal947dtd.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwd4cvjl9v43bal947dtd.png&quot; alt=&quot;Anatomy of one Jev call&quot; loading=&quot;lazy&quot; width=&quot;800&quot; height=&quot;503&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The whole API is three question types. That is not a limitation you route around, it is the design.&lt;/p&gt;

&lt;h3&gt;
  &lt;a name=&quot;choice-one-option-from-a-set&quot; href=&quot;https://dev.to/valyuai/how-to-use-jev-a-practical-guide-to-typesafes-system-one-model-g5e#choice-one-option-from-a-set&quot;&gt;
  &lt;/a&gt;
  Choice: one option from a set
&lt;/h3&gt;



&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight python&quot;&gt;&lt;code&gt;&lt;span class=&quot;nc&quot;&gt;Choice&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;instructions&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Which team should handle this&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;criteria&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;billing&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;   &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Payment or subscription issues&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;technical&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Bugs or integration problems&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;sales&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;     &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Pricing or account questions&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Returns &lt;code&gt;.choice&lt;/code&gt;, &lt;code&gt;.probabilities&lt;/code&gt; (one per option), and &lt;code&gt;.confidence&lt;/code&gt;. Takes &lt;strong&gt;up to 255 options&lt;/strong&gt;, each costing a few tokens, so pass the full list of teams or categories rather than a shortlist. Add an explicit &lt;code&gt;other&lt;/code&gt; option so the model can say nothing fits instead of picking the closest wrong thing.&lt;/p&gt;

&lt;h3&gt;
  &lt;a name=&quot;score-a-position-on-a-spectrum&quot; href=&quot;https://dev.to/valyuai/how-to-use-jev-a-practical-guide-to-typesafes-system-one-model-g5e#score-a-position-on-a-spectrum&quot;&gt;
  &lt;/a&gt;
  Score: a position on a spectrum
&lt;/h3&gt;



&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight python&quot;&gt;&lt;code&gt;&lt;span class=&quot;nc&quot;&gt;Score&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;instructions&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;How frustrated the customer appears&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;criteria&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Calm, just stating facts&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Frustrated but civil&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Very angry, strong language&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Two to ten ordered levels, described in words. Returns &lt;code&gt;.score&lt;/code&gt; as a position that can land &lt;strong&gt;between&lt;/strong&gt; levels (&lt;code&gt;1.035&lt;/code&gt;), plus &lt;code&gt;.probabilities&lt;/code&gt; and &lt;code&gt;.confidence&lt;/code&gt;. The level index comes from array order, so level 0 is the first entry.&lt;/p&gt;

&lt;h3&gt;
  &lt;a name=&quot;noul-yes-or-no-as-a-probability&quot; href=&quot;https://dev.to/valyuai/how-to-use-jev-a-practical-guide-to-typesafes-system-one-model-g5e#noul-yes-or-no-as-a-probability&quot;&gt;
  &lt;/a&gt;
  Noul: yes or no, as a probability
&lt;/h3&gt;



&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight python&quot;&gt;&lt;code&gt;&lt;span class=&quot;nc&quot;&gt;Noul&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;instructions&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;The message conveys urgency or time-sensitivity&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Returns &lt;code&gt;.noul&lt;/code&gt;, a single number from 0 to 1: the probability the answer is yes. No confidence field, because the number already is the belief.&lt;/p&gt;

&lt;h3&gt;
  &lt;a name=&quot;putting-it-together&quot; href=&quot;https://dev.to/valyuai/how-to-use-jev-a-practical-guide-to-typesafes-system-one-model-g5e#putting-it-together&quot;&gt;
  &lt;/a&gt;
  Putting it together
&lt;/h3&gt;



&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight python&quot;&gt;&lt;code&gt;&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;typesafe_sdk&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Choice&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Noul&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Score&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;TypeSafeClient&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;client&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;TypeSafeClient&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;response&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;client&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;system_one&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;state&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;ticket&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;subject&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Duplicate charge&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;messages&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;
                &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;customer&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                 &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;text&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;I was charged twice for order A-104. Please refund the duplicate.&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;order&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;A-104&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;charges&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;amount_usd&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;49&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;status&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;captured&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;amount_usd&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;49&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;status&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;captured&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;]},&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;refund_policy&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Duplicate charges are eligible for a refund.&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;questions&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;department&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;       &lt;span class=&quot;nc&quot;&gt;Choice&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;instructions&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Which team should handle this&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                                   &lt;span class=&quot;n&quot;&gt;criteria&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;billing&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Payment or subscription issues&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                                             &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;technical&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Bugs or integration problems&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                                             &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;sales&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Pricing or account questions&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}),&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;frustration&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;      &lt;span class=&quot;nc&quot;&gt;Score&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;instructions&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;How frustrated the customer appears&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                                  &lt;span class=&quot;n&quot;&gt;criteria&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Calm, just stating facts&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                                            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Frustrated but civil&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                                            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Very angry, strong language&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]),&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;refund_requested&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Noul&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;instructions&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;The customer is explicitly asking for a refund&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;policy_supports&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;  &lt;span class=&quot;nc&quot;&gt;Noul&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;instructions&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;The stated refund policy covers this situation&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;dept&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;response&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;answers&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;department&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dept&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;choice&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dept&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;confidence&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;response&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;answers&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;frustration&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;score&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;response&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;answers&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;refund_requested&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;noul&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;The same in TypeScript:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight typescript&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;choice&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;noul&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;TypeSafeClient&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;@typesafe-ai/sdk&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;client&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;TypeSafeClient&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;response&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;await&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;client&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;systemOne&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;({&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;state&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;I was charged twice. Please fix this ASAP.&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;questions&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;category&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;choice&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;What is this ticket about?&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;billing&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;Payment or subscription issues&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;technical&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;Bugs or integration problems&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;other&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;Anything else&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}),&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;urgent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;noul&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;The message conveys urgency&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;

&lt;span class=&quot;nx&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;response&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;answers&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;category&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;choice&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;  &lt;span class=&quot;c1&quot;&gt;// types inferred from your questions&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;h3&gt;
  &lt;a name=&quot;state-is-whatever-you-need-it-to-be&quot; href=&quot;https://dev.to/valyuai/how-to-use-jev-a-practical-guide-to-typesafes-system-one-model-g5e#state-is-whatever-you-need-it-to-be&quot;&gt;
  &lt;/a&gt;
  State is whatever you need it to be
&lt;/h3&gt;

&lt;p&gt;A string, a JSON object, or an array of text. Use an object when there is more than one piece of context.&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight python&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;state&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;My card was charged twice.&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;                               &lt;span class=&quot;c1&quot;&gt;# simple
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;state&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;message&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;order_id&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;A-104&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;                    &lt;span class=&quot;c1&quot;&gt;# named fields
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;state&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Hi&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;My customer number is TS1337.&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Charged twice.&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;   &lt;span class=&quot;c1&quot;&gt;# a conversation
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Text only. No images, audio or video. Transcribe or caption first.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Context limits&lt;/strong&gt; work differently from an LLM, because state is ingested once and questions run in parallel over it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;64k tokens for state and all questions together&lt;/li&gt;
&lt;li&gt;32k tokens for state plus the single longest question&lt;/li&gt;
&lt;/ul&gt;


&lt;hr&gt;

&lt;h2&gt;
  &lt;a name=&quot;five-patterns-worth-stealing&quot; href=&quot;https://dev.to/valyuai/how-to-use-jev-a-practical-guide-to-typesafes-system-one-model-g5e#five-patterns-worth-stealing&quot;&gt;
  &lt;/a&gt;
  Five patterns worth stealing
&lt;/h2&gt;

&lt;h3&gt;
  &lt;a name=&quot;pattern-1-speculative-fanout&quot; href=&quot;https://dev.to/valyuai/how-to-use-jev-a-practical-guide-to-typesafes-system-one-model-g5e#pattern-1-speculative-fanout&quot;&gt;
  &lt;/a&gt;
  Pattern 1: speculative fan-out
&lt;/h3&gt;

&lt;p&gt;Questions are evaluated in parallel, so &lt;strong&gt;a tenth question costs tokens but almost no time&lt;/strong&gt;. This inverts the usual instinct to make a cheap call first and a follow-up only if needed. Ask everything up front and let code decide what was relevant.&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight python&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;response&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;client&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;system_one&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;state&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ticket&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;questions&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;category&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;       &lt;span class=&quot;nc&quot;&gt;Choice&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;instructions&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Broad category of this ticket&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                                 &lt;span class=&quot;n&quot;&gt;criteria&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;bug_report&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Something is broken or erroring&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                                           &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;billing&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Charges, invoices, refunds&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                                           &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;feature_request&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Asking for new functionality&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                                           &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;account&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Login, permissions, security&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}),&lt;/span&gt;
        &lt;span class=&quot;c1&quot;&gt;# only meaningful if it IS a bug report. Ask anyway.
&lt;/span&gt;        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;bug_severity&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;   &lt;span class=&quot;nc&quot;&gt;Score&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;instructions&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;How severe is the reported issue&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                                &lt;span class=&quot;n&quot;&gt;criteria&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Cosmetic; no impact&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                                          &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Degraded feature; workaround exists&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                                          &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Blocking; no workaround&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]),&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;has_repro&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;      &lt;span class=&quot;nc&quot;&gt;Noul&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;instructions&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;The user describes steps to reproduce&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
        &lt;span class=&quot;c1&quot;&gt;# only meaningful if it IS billing. Ask anyway.
&lt;/span&gt;        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;refund_wanted&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;  &lt;span class=&quot;nc&quot;&gt;Noul&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;instructions&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;The user explicitly asks for a refund or credit&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;frustration&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;    &lt;span class=&quot;nc&quot;&gt;Score&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;instructions&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;How frustrated the user appears&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                                &lt;span class=&quot;n&quot;&gt;criteria&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Calm&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Frustrated but civil&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Very angry&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]),&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;cat&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;response&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;answers&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;category&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cat&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;choice&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;bug_report&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;response&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;answers&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;bug_severity&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;score&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;1.5&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;response&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;answers&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;has_repro&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;noul&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0.6&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;nf&quot;&gt;escalate_to_engineering&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ticket_id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;severity&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;high&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;nf&quot;&gt;add_to_bug_backlog&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ticket_id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;elif&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cat&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;choice&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;billing&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;response&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;answers&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;refund_wanted&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;noul&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0.7&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;nf&quot;&gt;start_refund_flow&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ticket_id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;TypeSafe&#39;s cookbook runs a 13-question regulatory briefing over a long Wikipedia article and reports that batching every question into one call is &lt;strong&gt;12.2x cheaper and 10.0x faster&lt;/strong&gt; with identical answers, versus asking one at a time.&lt;/p&gt;

&lt;h3&gt;
  &lt;a name=&quot;pattern-2-confidencegated-routing&quot; href=&quot;https://dev.to/valyuai/how-to-use-jev-a-practical-guide-to-typesafes-system-one-model-g5e#pattern-2-confidencegated-routing&quot;&gt;
  &lt;/a&gt;
  Pattern 2: Confidence-gated routing
&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F62yr0tytu92jrk2yi8mc.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F62yr0tytu92jrk2yi8mc.png&quot; alt=&quot;Confidence is the second axis&quot; loading=&quot;lazy&quot; width=&quot;799&quot; height=&quot;490&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is the one that changes your architecture. Jev is trained with &lt;strong&gt;RLCD&lt;/strong&gt; (Reinforcement Learning for Calibrated Decisions), which optimises probabilities against outcomes rather than human preference. Confidence is therefore meaningful in aggregate: higher confidence really does mean higher accuracy.&lt;/p&gt;

&lt;p&gt;So stop writing one threshold for the whole system. Write one per action, scaled to what being wrong costs.&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight python&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;action&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;response&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;answers&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;intent&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;action&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;confidence&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0.5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;nf&quot;&gt;route_to_human&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;user_message&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;                  &lt;span class=&quot;c1&quot;&gt;# floor: genuinely unsure
&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;elif&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;action&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;choice&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;check_balance&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;nf&quot;&gt;show_balance&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;account_id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;                      &lt;span class=&quot;c1&quot;&gt;# read-only, low bar
&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;elif&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;action&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;choice&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;approve_transfer&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;action&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;confidence&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0.85&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;                  &lt;span class=&quot;c1&quot;&gt;# moves money, high bar
&lt;/span&gt;        &lt;span class=&quot;nf&quot;&gt;approve_transfer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;account_id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;nf&quot;&gt;ask_user_to_confirm&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Approve this transfer?&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;nf&quot;&gt;route_to_human&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;user_message&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;You also get the raw &lt;code&gt;.probabilities&lt;/code&gt; if TypeSafe&#39;s confidence statistic is not the measure you want. A flat distribution means the options were not distinguishable from the state you gave it, which is frequently a signal that your criteria are wrong rather than that the model is confused.&lt;/p&gt;

&lt;h3&gt;
  &lt;a name=&quot;pattern-3-composite-scoring&quot; href=&quot;https://dev.to/valyuai/how-to-use-jev-a-practical-guide-to-typesafes-system-one-model-g5e#pattern-3-composite-scoring&quot;&gt;
  &lt;/a&gt;
  Pattern 3: composite scoring
&lt;/h3&gt;

&lt;p&gt;Break a fuzzy judgment into independent dimensions, score each atomically, and combine with weights &lt;strong&gt;you&lt;/strong&gt; control. This beats asking &quot;how good is this candidate,&quot; which hides several judgments inside one answer.&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight python&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;response&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;client&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;system_one&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;state&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;resume_text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;questions&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;python_depth&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;    &lt;span class=&quot;nc&quot;&gt;Score&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;instructions&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Depth of Python experience shown&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                                 &lt;span class=&quot;n&quot;&gt;criteria&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;None mentioned&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Mentioned, no detail&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                                           &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Used in projects&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Primary language&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                                           &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Deep expertise: architecture, performance&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]),&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;team_leadership&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Score&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;instructions&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Experience leading engineering teams&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                                 &lt;span class=&quot;n&quot;&gt;criteria&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;None&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Informal mentorship&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Led a small team&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                                           &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Managed direct reports&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Managed multiple teams&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]),&lt;/span&gt;
        &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;system_design&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;   &lt;span class=&quot;nc&quot;&gt;Score&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;instructions&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Experience designing distributed systems&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                                 &lt;span class=&quot;n&quot;&gt;criteria&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;None mentioned&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Contributed to discussions&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                                           &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Designed components&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Owned a system&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&#39;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;s architecture&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                                           &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Designed at scale across domains&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]),&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;response&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;answers&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;composite&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
    &lt;span class=&quot;mf&quot;&gt;0.40&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;python_depth&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;score&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;
    &lt;span class=&quot;mf&quot;&gt;0.25&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;team_leadership&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;score&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;
    &lt;span class=&quot;mf&quot;&gt;0.35&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;system_design&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;score&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Re-weighting is now a code change, not a re-prompt. You can A/B it.&lt;/p&gt;

&lt;h3&gt;
  &lt;a name=&quot;pattern-4-the-cascade&quot; href=&quot;https://dev.to/valyuai/how-to-use-jev-a-practical-guide-to-typesafes-system-one-model-g5e#pattern-4-the-cascade&quot;&gt;
  &lt;/a&gt;
  Pattern 4: The Cascade
&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw9ctmum0sbw278hl3jpm.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw9ctmum0sbw278hl3jpm.png&quot; alt=&quot;The cascade&quot; loading=&quot;lazy&quot; width=&quot;799&quot; height=&quot;490&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Jev is not a replacement for Opus 5 or GPT-5.6. It is the thing that decides which requests deserve one.&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight python&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;handle&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;message&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;r&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;client&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;system_one&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;state&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;message&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;questions&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;intent&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;     &lt;span class=&quot;nc&quot;&gt;Choice&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;instructions&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Primary intent of this message&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                                 &lt;span class=&quot;n&quot;&gt;criteria&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;order_status&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Asking about an existing order&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                                           &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;product_question&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Asking about a product&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                                           &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;return_exchange&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Wants to return or exchange&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                                           &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;complaint&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Unhappy, wants resolution&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}),&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;complexity&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Score&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;instructions&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;How complex is this to resolve&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                                &lt;span class=&quot;n&quot;&gt;criteria&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Simple lookup or standard procedure&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                                          &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Requires judgment or multiple steps&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                                          &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Unusual edge case, escalation needed&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]),&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;intent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;complexity&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;r&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;answers&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;intent&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;r&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;answers&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;complexity&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;

    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;intent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;confidence&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0.5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;route_to_human&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;message&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;intent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;choice&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;order_status&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;lookup_order&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;message&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;                      &lt;span class=&quot;c1&quot;&gt;# pure code, no LLM at all
&lt;/span&gt;    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;intent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;choice&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;product_question&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;handle_with_llm&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;message&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;PRODUCT_SPECIALIST&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;intent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;choice&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;return_exchange&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;handle_with_llm&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;message&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;RETURNS_SPECIALIST&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;intent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;choice&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;complaint&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;complexity&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;score&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;or&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;complexity&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;confidence&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0.5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;route_to_human&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;message&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;handle_with_llm&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;message&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;COMPLAINT_RESOLUTION&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;One branch never touches a model. Two load different specialists. One escalates.&lt;/p&gt;

&lt;p&gt;On a million tickets, using TypeSafe&#39;s per-case figures, that is roughly &lt;strong&gt;$6,480 instead of $30,400&lt;/strong&gt;, with around 800,000 answered in under half a second instead of ten.&lt;/p&gt;

&lt;h3&gt;
  &lt;a name=&quot;pattern-5-retrieve-then-judge&quot; href=&quot;https://dev.to/valyuai/how-to-use-jev-a-practical-guide-to-typesafes-system-one-model-g5e#pattern-5-retrieve-then-judge&quot;&gt;
  &lt;/a&gt;
  Pattern 5: Retrieve, then judge
&lt;/h3&gt;

&lt;p&gt;There is a step in that cascade Jev does not perform, and it sets the ceiling on everything after it.&lt;/p&gt;

&lt;p&gt;Jev has no knowledge of the world beyond the state you hand it. It cannot look anything up. And the jaggedness page is blunt that accuracy falls as state fills with material the question does not need: &lt;strong&gt;&quot;retrieve and filter in code first, and send only the fields the question needs.&quot;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Read those together and the consequence is sharp. Whatever assembles the state decides what Jev is allowed to know. Pad it and you lose accuracy to context rot. Ground it in a weak source and Jev returns a well-calibrated judgment about bad material, because the state is the only world it has.&lt;/p&gt;

&lt;p&gt;So the full pattern is two layers: fetch precisely, then judge cheaply.&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight python&quot;&gt;&lt;code&gt;&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;valyu&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Valyu&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;typesafe_sdk&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Noul&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Score&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;TypeSafeClient&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;valyu&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Valyu&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;          &lt;span class=&quot;c1&quot;&gt;# reads VALYU_API_KEY
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;jev&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;TypeSafeClient&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;   &lt;span class=&quot;c1&quot;&gt;# reads TYPESAFE_API_KEY
&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# 1. Retrieval: primary sources, filtered before anything reaches the model.
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;hits&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;valyu&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;search&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
    &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;GLP-1 receptor agonists cardiovascular outcomes&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;included_sources&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;valyu/valyu-pubmed&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;valyu/valyu-arxiv&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;start_date&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;2024-01-01&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;max_num_results&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;relevance_threshold&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;0.5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;# 2. Judgment: one bounded call per paper, roughly $0.0004 each.
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;shortlist&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;paper&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;hits&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;results&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;verdict&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;jev&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;system_one&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;state&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;paper&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;source&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;paper&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;content&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;paper&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;content&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;questions&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;is_rct&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Noul&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;instructions&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;This paper reports a randomised controlled trial&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;reports_mace&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Noul&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;instructions&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;The paper reports major adverse cardiovascular events as an outcome&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
            &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;evidence_strength&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Score&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;instructions&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;How strong is the causal evidence presented&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;criteria&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Anecdotal or preclinical&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                          &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Observational&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                          &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Single randomised trial&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                          &lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Meta-analysis of randomised trials&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;verdict&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;answers&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;is_rct&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;noul&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0.7&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;evidence_strength&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;score&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;1.5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;shortlist&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;paper&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;evidence_strength&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;confidence&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Twenty papers screened on four dimensions for well under a cent, against primary literature rather than whatever a general crawl surfaced.&lt;/p&gt;

&lt;p&gt;This generalises past literature review. It is the same shape as TypeSafe&#39;s own &lt;a href=&quot;https://docs.typesafe.ai/cookbooks/classifying_rag_passages&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;RAG passage classification&lt;/a&gt; and &lt;a href=&quot;https://docs.typesafe.ai/cookbooks/citation_check&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;citation check&lt;/a&gt; cookbooks: retrieve wide, then use a Noul per passage to filter for relevance &lt;em&gt;before&lt;/em&gt; anything expensive sees it. At $0.042/MTok with free output, the filter costs less than the context window it saves.&lt;/p&gt;


&lt;hr&gt;

&lt;h2&gt;
  &lt;a name=&quot;what-people-shipped-in-the-first-48-hours&quot; href=&quot;https://dev.to/valyuai/how-to-use-jev-a-practical-guide-to-typesafes-system-one-model-g5e#what-people-shipped-in-the-first-48-hours&quot;&gt;
  &lt;/a&gt;
  What people shipped in the first 48 hours
&lt;/h2&gt;

&lt;p&gt;Jev launched September 15. So treat these as launch-week artefacts, not production case studies, and note that all figures are self-reported by their authors. Be discretionary in your adoption.&lt;/p&gt;

&lt;h3&gt;
  &lt;a name=&quot;1018-research-papers-classified-for-008&quot; href=&quot;https://dev.to/valyuai/how-to-use-jev-a-practical-guide-to-typesafes-system-one-model-g5e#1018-research-papers-classified-for-008&quot;&gt;
  &lt;/a&gt;
  1,018 research papers classified for $0.08
&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;https://1kpapers.com/&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;strong&gt;1kpapers.com&lt;/strong&gt;&lt;/a&gt; by Hassan El Mghari (&lt;a href=&quot;https://x.com/nutlope/status/2100426999546184123&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;thread&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;The clearest demonstration of the economics, because it runs a generative model and a decision model in the same pipeline and shows the bill for each:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Summarise 1,018 papers with DeepSeek V4 Flash&lt;/li&gt;
&lt;li&gt;Send title + summary + 24 candidate topics to Jev&lt;/li&gt;
&lt;li&gt;Classify with one Choice&lt;/li&gt;
&lt;li&gt;Visualise&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Summaries: $3.99. Classifications: $0.08.&lt;/strong&gt; Median end-to-end latency 256ms per paper.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&quot;I think this is where things are heading: different models for different parts of the workflow, instead of using one model for everything.&quot;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;He also notes he is running evals on the Jev classifications before replacing the existing ones, which is the right instinct and the one most launch-week demos skip.&lt;/p&gt;

&lt;h3&gt;
  &lt;a name=&quot;a-browser-agent-that-books-a-flight-in-71-seconds&quot; href=&quot;https://dev.to/valyuai/how-to-use-jev-a-practical-guide-to-typesafes-system-one-model-g5e#a-browser-agent-that-books-a-flight-in-71-seconds&quot;&gt;
  &lt;/a&gt;
  A browser agent that books a flight in 7.1 seconds
&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/browser-use/jev-ultrafast&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;strong&gt;browser-use/jev-ultrafast&lt;/strong&gt;&lt;/a&gt; · 641 stars · Python&lt;/p&gt;

&lt;p&gt;Gregor Zunic (Browser Use) built a browser agent with a dynamic, indexed action space. Each observation turns the page into a numbered element table. One Jev request picks both the operation (&lt;code&gt;CLICK&lt;/code&gt;, &lt;code&gt;TYPE_TEXT&lt;/code&gt;, &lt;code&gt;SELECT&lt;/code&gt;, &lt;code&gt;SCROLL&lt;/code&gt;, &lt;code&gt;WAIT&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;, &lt;code&gt;BLOCKED&lt;/code&gt;) and its target. A small LLM runs only when the operation is &lt;code&gt;TYPE_TEXT&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Zürich to London on real Google Flights in 7.1 seconds, $0.0039&lt;/strong&gt;, page loads included.&lt;/p&gt;

&lt;p&gt;The design trick is speculative fan-out applied to actions: click, type and select targets are all asked in the same round trip, and only the one matching the chosen operation executes. Two decisions, one network call.&lt;/p&gt;

&lt;h3&gt;
  &lt;a name=&quot;computer-use-at-00002-per-step&quot; href=&quot;https://dev.to/valyuai/how-to-use-jev-a-practical-guide-to-typesafes-system-one-model-g5e#computer-use-at-00002-per-step&quot;&gt;
  &lt;/a&gt;
  Computer use at $0.0002 per step
&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/awlevin/typesafe-computer-use&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;strong&gt;awlevin/typesafe-computer-use&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Drives a Mac toward a plain-English goal without sending screenshots to a large model. OCR reads the screen, Jev picks the next action, a writing model is called only for free text.&lt;/p&gt;

&lt;div class=&quot;table-wrapper-paragraph&quot;&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Jev&lt;/th&gt;
&lt;th&gt;Opus 5 (bare screenshot)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Cost per decision&lt;/td&gt;
&lt;td&gt;$0.0002&lt;/td&gt;
&lt;td&gt;$0.032&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cost per 12-step task&lt;/td&gt;
&lt;td&gt;$0.003&lt;/td&gt;
&lt;td&gt;$0.40 to $0.90&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Model latency&lt;/td&gt;
&lt;td&gt;0.13 to 0.38s&lt;/td&gt;
&lt;td&gt;5.2s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;End-to-end step&lt;/td&gt;
&lt;td&gt;~1.5s&lt;/td&gt;
&lt;td&gt;~5.5s&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The author&#39;s caveat is the most useful line in the repo: the frontier model read event dates off the pixels and compared them unaided, while the classifier needed explicit date parsing built around it. &lt;strong&gt;&quot;Every piece of reasoning the frontier model does for free has to be rebuilt here as deterministic state.&quot;&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  &lt;a name=&quot;a-market-maker-deciding-every-300ms-block&quot; href=&quot;https://dev.to/valyuai/how-to-use-jev-a-practical-guide-to-typesafes-system-one-model-g5e#a-market-maker-deciding-every-300ms-block&quot;&gt;
  &lt;/a&gt;
  A market maker deciding every ~300ms block
&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/jarrodwatts/jev-trader&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;strong&gt;jarrodwatts/jev-trader&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One decision per Monad block. Jev reads the Kuru MON-USDC order book and answers buy or sell; the bot posts a post-only limit order one tick inside the touch, so it earns the spread instead of paying it. Reported model latency in the event stream is around 81ms, and the hot loop makes exactly two RPC round trips to fit the block budget. Ships with a dry-run mode using real book data and simulated fills.&lt;/p&gt;

&lt;h3&gt;
  &lt;a name=&quot;an-autonomous-drone-with-judgment-at-25hz&quot; href=&quot;https://dev.to/valyuai/how-to-use-jev-a-practical-guide-to-typesafes-system-one-model-g5e#an-autonomous-drone-with-judgment-at-25hz&quot;&gt;
  &lt;/a&gt;
  An autonomous drone with judgment at 2.5Hz
&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/RomanSlack/jev-drone&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;strong&gt;RomanSlack/jev-drone&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Worth studying for how carefully it puts Jev in its place:&lt;/p&gt;

&lt;div class=&quot;table-wrapper-paragraph&quot;&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Rate&lt;/th&gt;
&lt;th&gt;Layer&lt;/th&gt;
&lt;th&gt;Owner&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;500 Hz&lt;/td&gt;
&lt;td&gt;Geometric flight controller&lt;/td&gt;
&lt;td&gt;Code&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;50 Hz&lt;/td&gt;
&lt;td&gt;Guidance and safety reflex&lt;/td&gt;
&lt;td&gt;Code, always owns safety&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;15 Hz&lt;/td&gt;
&lt;td&gt;Camera to symbolic scene&lt;/td&gt;
&lt;td&gt;Classical CV&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;~2.5 Hz&lt;/td&gt;
&lt;td&gt;Tactical judgment&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Jev, advisory only&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Classical CV compresses depth and segmentation into range sectors, obstacle height and target bearing. Jev answers three questions in one call: a Choice over manoeuvres, a Score for risk, a Noul for whether the target is genuinely lost or briefly occluded. As the README says, Jev &quot;cannot be the perception layer, and it cannot run at control rate.&quot;&lt;/p&gt;

&lt;h3&gt;
  &lt;a name=&quot;others-worth-a-look&quot; href=&quot;https://dev.to/valyuai/how-to-use-jev-a-practical-guide-to-typesafes-system-one-model-g5e#others-worth-a-look&quot;&gt;
  &lt;/a&gt;
  Others worth a look
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href=&quot;https://github.com/fhshaik/typesafe-mario&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;strong&gt;fhshaik/typesafe-mario&lt;/strong&gt;&lt;/a&gt; (73★) plays Super Mario Bros from emulator RAM translated to object-centric JSON. No screenshots.&lt;/li&gt;
&lt;li&gt;
&lt;a href=&quot;https://github.com/devagrawal09/jev-review&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;strong&gt;devagrawal09/jev-review&lt;/strong&gt;&lt;/a&gt; (48★) is a staged code reviewer: Noul risk matrix, then Choice/Score file profiles, evidence selection, severity, conditional routing.&lt;/li&gt;
&lt;li&gt;
&lt;a href=&quot;https://github.com/TheoLeeCJ/openjev&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;strong&gt;TheoLeeCJ/openjev&lt;/strong&gt;&lt;/a&gt; (166★) reads typed option probabilities off a 4B open model&#39;s logits in one forward pass. It is explicit that it reproduces the &lt;em&gt;interface pattern&lt;/em&gt;, not Jev&#39;s model or training.&lt;/li&gt;
&lt;li&gt;
&lt;a href=&quot;https://github.com/phyous/tsai-sc&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;strong&gt;phyous/tsai-sc&lt;/strong&gt;&lt;/a&gt; has Jev complete the first StarCraft shareware mission across 421 decisions, with a verification report.&lt;/li&gt;
&lt;li&gt;
&lt;a href=&quot;https://github.com/AbdelStark/awesome-typesafe&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&lt;strong&gt;AbdelStark/awesome-typesafe&lt;/strong&gt;&lt;/a&gt; indexes the ecosystem and labels which results rest on private data or single runs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The pattern across every one of these:&lt;/strong&gt; keep the loop, the safety and the arithmetic in ordinary code, and use Jev for the narrow judgment in the middle that code finds hard to phrase.&lt;/p&gt;


&lt;hr&gt;

&lt;h2&gt;
  &lt;a name=&quot;the-failure-modes-read-this-before-you-ship&quot; href=&quot;https://dev.to/valyuai/how-to-use-jev-a-practical-guide-to-typesafes-system-one-model-g5e#the-failure-modes-read-this-before-you-ship&quot;&gt;
  &lt;/a&gt;
  The failure modes (read this before you ship)
&lt;/h2&gt;

&lt;p&gt;TypeSafe publishes a page called &lt;a href=&quot;https://docs.typesafe.ai/model-jaggedness/jev-1.13&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;&quot;jaggedness&quot;&lt;/a&gt; listing what &lt;code&gt;jev-1.13&lt;/code&gt; is bad at. It is unusually honest for a launch and it will save you a week.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It reads literally.&lt;/strong&gt; Jev answers the question you wrote, not the one you meant. Negations, scoping words and implied conditions land at face value. The tell: you look at a wrong answer and catch yourself explaining what you really meant. That explanation is the missing half of your instruction.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It is not a calculator.&lt;/strong&gt; It does not count reliably, and error grows with the size of the thing counted. Iterate in code and ask one Noul per item:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight python&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;result&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;client&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;system_one&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;sa&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;item_&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Noul&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;instructions&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;sa&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Is `items[&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;]` the name of a fruit?&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
     &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))},&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;count&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;sum&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;nouls&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;sa&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;item_&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;noul&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0.5&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Dates are text to it, not ordered quantities.&lt;/strong&gt; Which date came first, how far apart, whether one falls in a window: all unreliable. Extraction is judgment, so use a Choice over enumerated months and days with an explicit &quot;not stated&quot; option. Assembly and ordering are arithmetic, so keep them in code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Context rot is real.&lt;/strong&gt; Accuracy falls as state fills with material the question does not need. Retrieve and filter first.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;State is not treated as hostile.&lt;/strong&gt; Text engineered to argue for its own classification can move the answer. If you put user-controlled content into state, that is your threat model to handle. Test it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Contradictory instructions and criteria confuse it.&lt;/strong&gt; A Noul where &lt;code&gt;true&lt;/code&gt; maps to &quot;no&quot; will underperform. Treat criteria as an extension of the instruction.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It does not generate.&lt;/strong&gt; No text, no code, no summaries. If you need a value extracted from free text, get candidates with a regex or a generative model and let Jev pick.&lt;/p&gt;

&lt;p&gt;The meta-rule from their docs, which is good design advice generally:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Avoid asking the model something code can compute exactly. Avoid hiding several judgments inside one question.&lt;/p&gt;
&lt;/blockquote&gt;


&lt;hr&gt;

&lt;h2&gt;
  &lt;a name=&quot;operational-notes&quot; href=&quot;https://dev.to/valyuai/how-to-use-jev-a-practical-guide-to-typesafes-system-one-model-g5e#operational-notes&quot;&gt;
  &lt;/a&gt;
  Operational notes
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Rate limits&lt;/strong&gt; for &lt;code&gt;jev-1.13&lt;/code&gt; are 250,000 tokens/second and 1,200 requests/minute. Over either returns &lt;code&gt;429&lt;/code&gt;. Both SDKs retry with exponential backoff and honour &lt;code&gt;retry-after&lt;/code&gt;. TypeSafe warns these limits are moving without notice while GPU capacity lands.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pin your version if you tune thresholds.&lt;/strong&gt; &lt;code&gt;jev-latest&lt;/code&gt; currently resolves to &lt;code&gt;jev-1.13.0&lt;/code&gt; and will move when a new release ships, which can change answers under you. The response&#39;s &lt;code&gt;model&lt;/code&gt; field reports the versioned ID that answered, so log it.&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight python&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;client&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;TypeSafeClient&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;model&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;jev-1.13.0&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;   &lt;span class=&quot;c1&quot;&gt;# pin
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Billing is input-only.&lt;/strong&gt; Output tokens are free, which is why speculative fan-out is cheap and why adding options to a Choice costs almost nothing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;There is an agent skill&lt;/strong&gt; if you build with a coding agent:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight shell&quot;&gt;&lt;code&gt;claude plugin marketplace add typesafe-ai/skills
claude plugin &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;typesafe@typesafe-ai
&lt;span class=&quot;c&quot;&gt;# or, for other agents:&lt;/span&gt;
npx skills add typesafe-ai/skills &lt;span class=&quot;nt&quot;&gt;--skill&lt;/span&gt; typesafe-ai
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;




&lt;hr&gt;

&lt;h2&gt;
  &lt;a name=&quot;the-honest-scorecard&quot; href=&quot;https://dev.to/valyuai/how-to-use-jev-a-practical-guide-to-typesafes-system-one-model-g5e#the-honest-scorecard&quot;&gt;
  &lt;/a&gt;
  The honest scorecard
&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fje9452k5t79tx941ugbw.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fje9452k5t79tx941ugbw.png&quot; alt=&quot;What the trade actually is&quot; loading=&quot;lazy&quot; width=&quot;800&quot; height=&quot;516&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On TypeSafe&#39;s four-workflow evaluation, Jev scores 67.8%, level with GPT-5.6 Terra (67.9%), behind Sol (74.1%) and Opus 5 (73.1%), at roughly 1/200th the cost and 1/50th the latency.&lt;/p&gt;

&lt;p&gt;The line that lands hardest: &lt;strong&gt;Claude Sonnet 5 scores exactly 67.8% too&lt;/strong&gt;, at 293x the cost per case and 195x the latency.&lt;/p&gt;

&lt;p&gt;Four things to hold onto:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;That column is not accuracy.&lt;/strong&gt; There is no ground truth. TypeSafe builds consensus labels by averaging GPT-6 Astra and Claude Fable 5.1 at high thinking, then scores everyone against those. It measures &lt;em&gt;agreement with two frontier models&lt;/em&gt;, which is why neither appears in the results. TypeSafe says this biases toward OpenAI and Anthropic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It is self-run.&lt;/strong&gt; TypeSafe designed the workflows, built the harness, ran it. No independent reproduction exists. Evaluate on your own traffic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&quot;Cannot hallucinate&quot; is narrower than it sounds.&lt;/strong&gt; Jev cannot return an invalid value. It can return the &lt;em&gt;wrong&lt;/em&gt; valid one. The 0% is asserted, not measured: &quot;Our number is not empirical. Schema matching is guaranteed, thus we can confidently add 0% into the plots.&quot; The 45.5% comparison is a single outlier (Haiku 4.5); most models sit between 0.58% and 13.2%.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The price may move.&lt;/strong&gt; TypeSafe cannot prove it is not subsidised, though it says it expects the price to fall rather than rise.&lt;/li&gt;
&lt;/ol&gt;


&lt;hr&gt;

&lt;h2&gt;
  &lt;a name=&quot;when-i-would-actually-use-this&quot; href=&quot;https://dev.to/valyuai/how-to-use-jev-a-practical-guide-to-typesafes-system-one-model-g5e#when-i-would-actually-use-this&quot;&gt;
  &lt;/a&gt;
  When I would actually use this
&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6f4ax394bhwdunijd3hs.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6f4ax394bhwdunijd3hs.png&quot; alt=&quot;Good and bad fits&quot; loading=&quot;lazy&quot; width=&quot;800&quot; height=&quot;642&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Yes:&lt;/strong&gt; routing and triage, moderation, relevance filtering before an expensive context window, scoring or guardrailing LLM output, tagging at volumes that were previously uneconomic, anything sub-second inside a request handler.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;No:&lt;/strong&gt; generating anything, arithmetic or counting or date math, decisions needing a written rationale for an auditor, one-off complex reasoning, genuinely open answer spaces.&lt;/p&gt;

&lt;p&gt;The useful mental shift is that this is not a cheaper LLM. It is a different primitive: a function call that happens to be intelligent, returns a type, and tells you how much to trust it. Once you have that, a lot of code that exists only to survive string output stops needing to exist.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;faq&quot; href=&quot;https://dev.to/valyuai/how-to-use-jev-a-practical-guide-to-typesafes-system-one-model-g5e#faq&quot;&gt;
  &lt;/a&gt;
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What is Jev?&lt;/strong&gt; A frontier model that returns typed, probabilistic decisions instead of text, in 70 to 500ms.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How much does it cost?&lt;/strong&gt; $0.042 per million input tokens, output free. About $0.0004 per case on TypeSafe&#39;s benchmark.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can it hallucinate?&lt;/strong&gt; It cannot return a value outside your schema. It can return the wrong valid value.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can it write code or prose?&lt;/strong&gt; No. Not trained to generate text at all.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What are Choice, Score and Noul?&lt;/strong&gt; The three question types: one-of-N (up to 255), a position on a 2 to 10 level scale, and a yes/no probability.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do I get access?&lt;/strong&gt; Waitlisted early access at typesafe.ai; keys at console.typesafe.ai.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Should I replace my LLM?&lt;/strong&gt; No. Cascade: Jev classifies and routes cheaply, code handles what it can, a frontier model takes the hard minority.&lt;/p&gt;


            </description><link>https://dev.to/valyuai/how-to-use-jev-a-practical-guide-to-typesafes-system-one-model-g5e</link><guid isPermaLink="false">https://dev.to/valyuai/how-to-use-jev-a-practical-guide-to-typesafes-system-one-model-g5e</guid><pubDate>Thu, 17 Sep 2026 12:24:54 GMT</pubDate><author>Prosper Otemuyiwa</author><enclosure url="https://media2.dev.to/dynamic/image/width=1000,height=420,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fl0bgmfbwspy7a4geinx6.png" type="image/jpeg"></enclosure><category>ai</category><category>llm</category><category>softwaredevelopment</category><category>tutorial</category></item><item><title>Microsoft broke Ctrl+C and Ctrl+V in Excel</title><description>&lt;p&gt;Somewhere inside the September 2026 Office updates, Microsoft shot itself in the foot again. Excel decided that copying and pasting cells was no longer part of its job :)&lt;/p&gt;

&lt;p&gt;The bug is simple. Press Ctrl+C. Select another cell. Press Ctrl+V. Nothing happens. The copied cells keep their moving border. The target cell stays empty. Excel shows no error and gives no warning. Very Windows: quiet, confident, and completely unhelpful.&lt;/p&gt;

&lt;p&gt;Microsoft has confirmed the problem in &lt;strong&gt;KB5002914&lt;/strong&gt;. It can affect Excel 2016, 2019, 2021, and 2024. AutoFill, formula dragging, and number series can also fail.&lt;/p&gt;

&lt;p&gt;Maybe a future Office update will bring back copy and paste. Or maybe Microsoft will call it &lt;strong&gt;Excel Copy/Paste Plus&lt;/strong&gt;, add an AI button, and sell it as a new feature. Until then, here is how to fix the real problem.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;the-good-news-the-failure-is-recoverable&quot; href=&quot;https://dev.to/minerninja/microsoft-broke-ctrlc-and-ctrlv-in-excel-lkl#the-good-news-the-failure-is-recoverable&quot;&gt;
  &lt;/a&gt;
  The good news: the failure is recoverable.
&lt;/h2&gt;

&lt;p&gt;This article covers Windows perpetual/volume Office installations. Test on one machine first, especially if you manage a fleet.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;symptoms-of-issue&quot; href=&quot;https://dev.to/minerninja/microsoft-broke-ctrlc-and-ctrlv-in-excel-lkl#symptoms-of-issue&quot;&gt;
  &lt;/a&gt;
  Symptoms of issue
&lt;/h2&gt;

&lt;p&gt;The affected machine usually has all or most of these symptoms:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Copying and pasting inside Excel fails silently&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ctrl+C/Ctrl+V works in Notepad or other applications&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The copied Excel cells remain selected, but the destination does not change&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Dragging the fill handle does not extend 1, 2, 3, 4... correctly&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Dragging formulas or copying ranges can produce incorrect or missing results&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This distinction matters. If copying fails everywhere, investigate the keyboard, clipboard service, RDP redirection, endpoint protection, or a third-party clipboard manager. If it fails only in Excel, this Office regression is a strong candidate.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;confirm-the-office-installation-type&quot; href=&quot;https://dev.to/minerninja/microsoft-broke-ctrlc-and-ctrlv-in-excel-lkl#confirm-the-office-installation-type&quot;&gt;
  &lt;/a&gt;
  Confirm the Office installation type
&lt;/h2&gt;

&lt;p&gt;Run PowerShell as Administrator:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight powershell&quot;&gt;&lt;code&gt;&lt;span class=&quot;nv&quot;&gt;$paths&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;@(&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&#39;HKLM:\SOFTWARE\Microsoft\Office\ClickToRun\Configuration&#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&#39;HKLM:\SOFTWARE\WOW6432Node\Microsoft\Office\ClickToRun\Configuration&#39;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$paths&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Where-Object&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Test-Path&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;$_&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ForEach-Object&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Get-ItemProperty&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;$_&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Select-Object&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;ProductReleaseIds&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;VersionToReport&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Platform&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;ClientFolder&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Typical output:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;ProductReleaseIds : Standard2021Volume
VersionToReport   : 16.0.14334.20914
Platform          : x64
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;If this returns nothing, the Office installation may be MSI-based. Check installed products instead:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight powershell&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;Get-ItemProperty&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;`
&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&#39;HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*&#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&#39;HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*&#39;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-ErrorAction&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;SilentlyContinue&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Where-Object&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;$_&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;DisplayName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-match&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&#39;Microsoft Office|Microsoft 365&#39;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Select-Object&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;DisplayName&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;DisplayVersion&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;h2&gt;
  &lt;a name=&quot;recovery-option-1-office-2016-msi&quot; href=&quot;https://dev.to/minerninja/microsoft-broke-ctrlc-and-ctrlv-in-excel-lkl#recovery-option-1-office-2016-msi&quot;&gt;
  &lt;/a&gt;
  Recovery option 1: Office 2016 MSI
&lt;/h2&gt;

&lt;p&gt;For the MSI edition of Office 2016, the offending Excel security update is &lt;strong&gt;KB5002914&lt;/strong&gt;. Its removal restored normal copy/paste behaviour in affected installations.&lt;/p&gt;

&lt;p&gt;First verify that the update is present in installed programs, or that &lt;strong&gt;EXCEL.EXE&lt;/strong&gt; is the affected build. Then remove &lt;strong&gt;KB5002914&lt;/strong&gt; by using &lt;strong&gt;Settings → Apps → Installed apps&lt;/strong&gt; (or &lt;strong&gt;Control Panel → Programs and Features → View installed updates&lt;/strong&gt;).&lt;/p&gt;

&lt;p&gt;After removal, reboot and test Excel again.&lt;/p&gt;

&lt;p&gt;Do not blindly uninstall Windows cumulative updates. KB5002914 is the Office/Excel update; it is not the same thing as a Windows LCU.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;recovery-option-2-clicktorun-office-2019-2021-or-2024&quot; href=&quot;https://dev.to/minerninja/microsoft-broke-ctrlc-and-ctrlv-in-excel-lkl#recovery-option-2-clicktorun-office-2019-2021-or-2024&quot;&gt;
  &lt;/a&gt;
  Recovery option 2: Click-to-Run Office 2019, 2021, or 2024
&lt;/h2&gt;

&lt;p&gt;Click-to-Run Office does not let you uninstall one individual Office patch. The usual remedy is to move the entire Office installation to the last known-good build.&lt;/p&gt;

&lt;p&gt;The following target builds were the pre-incident Volume Licensed builds:&lt;/p&gt;

&lt;p&gt;Product:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;Office 2019 Volume - 16.0.10417.20197
Office LTSC 2021 Volume - 16.0.14334.20848
Office LTSC 2024 Volume - 16.0.17932.20910
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Microsoft documents the supported Office Deployment Tool (ODT) method for reverting Click-to-Run Office. If you are managing a large environment, use ODT, Group Policy, or your endpoint-management platform rather than improvising a different build number at 2 AM. Future-you deserves at least that much respect.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A practical automation script&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For small and medium environments, I published a PowerShell helper that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;detects Office 2019/2021/2024 Volume Click-to-Run editions;&lt;/li&gt;
&lt;li&gt;detects the Office 2016 MSI case;&lt;/li&gt;
&lt;li&gt;sets the appropriate approved target build for Click-to-Run;&lt;/li&gt;
&lt;li&gt;starts the installed Office Click-to-Run client;&lt;/li&gt;
&lt;li&gt;waits for the expected build and stops on unsupported products.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;GitHUB Repository: &lt;a href=&quot;https://github.com/Miner-Ninja/Excel-CopyPaste-Issue-Fixer&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;Excel-CopyPaste-Issue-Fixer&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Replace that URL with your real repository URL before publishing this post.&lt;/p&gt;

&lt;p&gt;Run it from an elevated PowerShell window:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight powershell&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;powershell.exe&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-NoProfile&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-ExecutionPolicy&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Bypass&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-File&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&#39;.\Excel-CopyPaste-Issue-Fixer.ps1&#39;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;-ExecutionPolicy Bypass&lt;/strong&gt; applies only to that PowerShell process. It does not permanently loosen the machine&#39;s execution-policy setting.&lt;/p&gt;

&lt;p&gt;Stop the bad update from returning&lt;/p&gt;

&lt;p&gt;Fixing one PC is pleasant. Fixing it again the next morning because the same package redeployed is performance art.&lt;/p&gt;

&lt;p&gt;In your patch-management product, temporarily exclude the exact package that upgraded the affected Office family. Search for the version/build reported by the affected endpoint and create an Ignore/Exclude rule for that package. Examples from this incident include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;KB5002914 for Office 2016 MSI;&lt;/li&gt;
&lt;li&gt;Office 2019 package containing build 10417.20207;&lt;/li&gt;
&lt;li&gt;Office 2021 package containing build 14334.20906 or the later affected deployment build observed in your estate;&lt;/li&gt;
&lt;li&gt;Office 2024 package containing build 17932.20976&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Use the &lt;strong&gt;exact package name shown in your own patch console&lt;/strong&gt;, not only the examples above. Packaging labels vary between patch vendors.&lt;/p&gt;

&lt;p&gt;Keep the exclusion temporary. This was a security update, and rolling back means accepting a security trade-off until Microsoft publishes a corrected update. Monitor the official KB and Office release notes, test the replacement on a pilot machine, then remove the exclusion.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Verification checklist&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;After the rollback and reboot:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Confirm the Office build:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight powershell&quot;&gt;&lt;code&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Get-ItemProperty&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&#39;HKLM:\SOFTWARE\Microsoft\Office\ClickToRun\Configuration&#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;VersionToReport&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;p&gt;In Excel, type 1 and 2 in adjacent cells, select both, and drag the fill handle down.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Copy a cell containing a formula and paste it elsewhere.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Copy/paste a range within the same worksheet and into another workbook.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Confirm that Ctrl+C/Ctrl+V still works in Notepad, because at this point we are allowed one boring control test.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;References&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://support.microsoft.com/en-us/servicing/office/hotfix/excel/5002914&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;Microsoft: KB5002914 — Excel security update and known issue&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://support.microsoft.com/en-us/topic/how-to-revert-to-an-earlier-version-of-office-2bd5c457-a917-d57e-35a1-f709e3dda841&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;Microsoft: Revert to an earlier version of Office&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/officeupdates/microsoft365-apps-security-updates&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;Microsoft: Office security update release notes&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Until there is an official repair package, rollback plus a temporary patch exclusion is the least glamorous, most effective answer. Which is, admittedly, a very Windows way to solve a Windows problem.&lt;/p&gt;


            </description><link>https://dev.to/minerninja/microsoft-broke-ctrlc-and-ctrlv-in-excel-lkl</link><guid isPermaLink="false">https://dev.to/minerninja/microsoft-broke-ctrlc-and-ctrlv-in-excel-lkl</guid><pubDate>Mon, 14 Sep 2026 08:38:49 GMT</pubDate><author>Miner Ninja</author><category>microsoft</category><category>bughunt</category><category>help</category></item><item><title>iPhone Duo for iOS Developers: What Actually Changes in Your Swift Code</title><description>&lt;p&gt;Apple announced the &lt;strong&gt;iPhone Duo&lt;/strong&gt; today — its first foldable iPhone. A 5.4-inch outer display, a 7.6-inch inner display when you open it, ships with iOS 27.x.&lt;/p&gt;

&lt;p&gt;The marketing story is the hardware. The developer story is that &lt;strong&gt;a lot of assumptions baked into iPhone apps since 2007 just stopped being true.&lt;/strong&gt; There is now more than one screen. The screen can change shape while your app is running. The safe area is no longer symmetric. And &quot;portrait only&quot; doesn&#39;t mean what you think it means anymore.&lt;/p&gt;

&lt;p&gt;The good news: if you&#39;ve been doing adaptive layout properly for iPad, most of this is a short afternoon. If your app hardcodes screen sizes and branches on orientation, you have some work to do.&lt;/p&gt;

&lt;p&gt;Here&#39;s the practical version.&lt;/p&gt;


&lt;hr&gt;

&lt;h2&gt;
  &lt;a name=&quot;first-what-happens-if-you-do-nothing&quot; href=&quot;https://dev.to/arshtechpro/iphone-duo-for-ios-developers-what-actually-changes-in-your-swift-code-5gc5#first-what-happens-if-you-do-nothing&quot;&gt;
  &lt;/a&gt;
  First: what happens if you do nothing?
&lt;/h2&gt;

&lt;p&gt;Your app still runs. It doesn&#39;t crash, it doesn&#39;t get pulled. But how much of the screen you get depends on which SDK you last built against:&lt;/p&gt;

&lt;div class=&quot;table-wrapper-paragraph&quot;&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Built with&lt;/th&gt;
&lt;th&gt;Inner display behavior&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Older SDK (no rebuild)&lt;/td&gt;
&lt;td&gt;Runs, but letterboxed — your app keeps its old aspect ratio, with black bars either side&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;iOS 27 SDK&lt;/td&gt;
&lt;td&gt;Extends left of the status bar, avoiding the camera area&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;iOS 27.1 SDK&lt;/td&gt;
&lt;td&gt;Full edge-to-edge, and standard nav/toolbar buttons lay out vertically&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;So step zero is genuinely just: &lt;strong&gt;rebuild with Xcode 27.1.&lt;/strong&gt; That alone moves you from &quot;obviously not updated&quot; to &quot;fine.&quot; Everything below is the difference between &quot;fine&quot; and &quot;good.&quot;&lt;/p&gt;


&lt;hr&gt;

&lt;h2&gt;
  &lt;a name=&quot;the-four-poses-you-now-have-to-support&quot; href=&quot;https://dev.to/arshtechpro/iphone-duo-for-ios-developers-what-actually-changes-in-your-swift-code-5gc5#the-four-poses-you-now-have-to-support&quot;&gt;
  &lt;/a&gt;
  The four poses you now have to support
&lt;/h2&gt;

&lt;p&gt;This is the mental model shift. It&#39;s not portrait vs landscape anymore. It&#39;s:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Closed, portrait&lt;/strong&gt; — behaves like a normal iPhone&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Closed, landscape&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Open, vertical&lt;/strong&gt; (tall, near-square)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Open, horizontal&lt;/strong&gt; (wide)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Plus the in-between states: partially folded like a book, or propped up in a tent on a table. Your layout has to survive all of them, and it has to survive &lt;em&gt;transitions&lt;/em&gt; between them while state is live.&lt;/p&gt;


&lt;hr&gt;

&lt;h2&gt;
  &lt;a name=&quot;change-1-size-classes-not-orientation&quot; href=&quot;https://dev.to/arshtechpro/iphone-duo-for-ios-developers-what-actually-changes-in-your-swift-code-5gc5#change-1-size-classes-not-orientation&quot;&gt;
  &lt;/a&gt;
  Change #1: Size classes, not orientation
&lt;/h2&gt;

&lt;p&gt;This is the single most important line in Apple&#39;s guidance, and it will break the most apps.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The inner display doesn&#39;t honor your supported interface orientations.&lt;/strong&gt; If your app branches layout on &lt;code&gt;UIDevice.orientation&lt;/code&gt; or &lt;code&gt;supportedInterfaceOrientations&lt;/code&gt;, that logic is now lying to you.&lt;/p&gt;

&lt;p&gt;Use size classes instead — they describe &lt;em&gt;the space you have&lt;/em&gt;, which is the thing you actually care about:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight swift&quot;&gt;&lt;code&gt;&lt;span class=&quot;c1&quot;&gt;// SwiftUI&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;struct&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;ContentView&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;View&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;@Environment&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(\&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;horizontalSizeClass&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;hSize&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;@Environment&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(\&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;verticalSizeClass&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;vSize&lt;/span&gt;

    &lt;span class=&quot;k&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;some&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;View&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;hSize&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;regular&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;kt&quot;&gt;WideLayout&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;kt&quot;&gt;CompactLayout&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;





&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight swift&quot;&gt;&lt;code&gt;&lt;span class=&quot;c1&quot;&gt;// UIKit&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;override&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;func&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;traitCollectionDidChange&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;_&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;previous&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;UITraitCollection&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;?)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;traitCollectionDidChange&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;previous&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;isWide&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;traitCollection&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;horizontalSizeClass&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;regular&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;// reconfigure&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;What to expect on device:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Outer display&lt;/strong&gt; → same size classes as any other iPhone&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Inner display&lt;/strong&gt; → &lt;strong&gt;regular in both dimensions&lt;/strong&gt;, which is what leaves room for sidebars and two-column layouts&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That second row is the one worth internalizing. The inner display is, as far as your layout code is concerned, iPad-shaped.&lt;/p&gt;


&lt;hr&gt;

&lt;h2&gt;
  &lt;a name=&quot;change-2-stop-referencing-the-main-screen&quot; href=&quot;https://dev.to/arshtechpro/iphone-duo-for-ios-developers-what-actually-changes-in-your-swift-code-5gc5#change-2-stop-referencing-the-main-screen&quot;&gt;
  &lt;/a&gt;
  Change #2: Stop referencing the main screen
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;UIScreen.main&lt;/code&gt; is ambiguous on a two-display device, and Apple has said it&#39;s heading for deprecation. There is no longer one screen.&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight swift&quot;&gt;&lt;code&gt;&lt;span class=&quot;c1&quot;&gt;// ❌ Which screen? Nobody knows.&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;scale&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;UIScreen&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;scale&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;bounds&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;UIScreen&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;bounds&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;// ✅ Ask the trait collection&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;scale&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;traitCollection&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;displayScale&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;// ✅ Or get the screen dynamically from the window scene&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;screen&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;view&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;?&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;windowScene&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;?&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;screen&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;For layout size, prefer the scene&#39;s bounds or the environment over anything screen-derived. Do a project-wide search for &lt;code&gt;UIScreen.main&lt;/code&gt; right now — it&#39;s usually a five-minute fix and it&#39;s the most likely source of weird bugs.&lt;/p&gt;

&lt;p&gt;While you&#39;re in there, &lt;code&gt;ConcentricRectangle&lt;/code&gt; (SwiftUI) and &lt;code&gt;UICornerConfiguration&lt;/code&gt; (UIKit), introduced in iOS 26, will match the actual screen corner radius instead of your hardcoded &lt;code&gt;cornerRadius: 12&lt;/code&gt;.&lt;/p&gt;


&lt;hr&gt;

&lt;h2&gt;
  &lt;a name=&quot;change-3-safe-areas-are-now-asymmetric&quot; href=&quot;https://dev.to/arshtechpro/iphone-duo-for-ios-developers-what-actually-changes-in-your-swift-code-5gc5#change-3-safe-areas-are-now-asymmetric&quot;&gt;
  &lt;/a&gt;
  Change #3: Safe areas are now asymmetric
&lt;/h2&gt;

&lt;p&gt;On a normal iPhone, the left and right insets match, so a lot of code does this:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight swift&quot;&gt;&lt;code&gt;&lt;span class=&quot;c1&quot;&gt;// ❌ Assumes both sides are equal&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;usableWidth&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;view&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;bounds&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;width&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;view&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;safeAreaInsets&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;left&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;On iPhone Duo, safe areas and layout margins are &lt;strong&gt;frequently asymmetric&lt;/strong&gt; — the camera is on one side, and in Split View your app occupies half the display with different insets on each edge. Handle each side independently:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight swift&quot;&gt;&lt;code&gt;&lt;span class=&quot;c1&quot;&gt;// ✅&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;usableWidth&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;view&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;bounds&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;inset&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;by&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;view&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;safeAreaInsets&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;width&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;The general rule Apple repeats: &lt;strong&gt;interactive foreground content stays inside the safe area; background artwork extends past it.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight swift&quot;&gt;&lt;code&gt;&lt;span class=&quot;c1&quot;&gt;// SwiftUI&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;ZStack&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;kt&quot;&gt;BackgroundArtwork&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;ignoresSafeArea&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;   &lt;span class=&quot;c1&quot;&gt;// background: bleed&lt;/span&gt;
    &lt;span class=&quot;kt&quot;&gt;ControlsView&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;           &lt;span class=&quot;c1&quot;&gt;// foreground: respects safe area by default&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;




&lt;hr&gt;

&lt;h2&gt;
  &lt;a name=&quot;change-4-reserved-regions-the-hinge-and-the-cameras&quot; href=&quot;https://dev.to/arshtechpro/iphone-duo-for-ios-developers-what-actually-changes-in-your-swift-code-5gc5#change-4-reserved-regions-the-hinge-and-the-cameras&quot;&gt;
  &lt;/a&gt;
  Change #4: Reserved regions (the hinge and the cameras)
&lt;/h2&gt;

&lt;p&gt;This is a genuinely new concept. The device has physical features that carve up the display: the &lt;strong&gt;hinge&lt;/strong&gt; and the &lt;strong&gt;cameras&lt;/strong&gt;. Apple calls these &lt;em&gt;reserved regions&lt;/em&gt;, and you can query them.&lt;/p&gt;

&lt;p&gt;Two kinds:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;.division&lt;/code&gt;&lt;/strong&gt; — the fold. It splits a larger area into smaller ones. It&#39;s only &lt;em&gt;active&lt;/em&gt; when the device is actually folded; when flat it has zero width and is inactive.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;.occlusion&lt;/code&gt;&lt;/strong&gt; — something sitting on top of your content. This is the under-display FaceTime camera.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight swift&quot;&gt;&lt;code&gt;&lt;span class=&quot;c1&quot;&gt;// SwiftUI&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;GeometryReader&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;proxy&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;in&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;folds&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;proxy&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;reservedRegions&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;kind&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;division&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;frames&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;folds&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;map&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(\&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;frame&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;kt&quot;&gt;MyLayout&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;avoiding&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;frames&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;





&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight swift&quot;&gt;&lt;code&gt;&lt;span class=&quot;c1&quot;&gt;// UIKit&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;folds&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;view&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;reservedRegions&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;kind&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;division&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;frames&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;folds&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;map&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(\&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;frame&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Inactive regions are excluded by default. Ask for them when you want to make a &lt;em&gt;structural&lt;/em&gt; decision that shouldn&#39;t flip-flop as the user opens and closes the device — like &quot;always use an even number of grid columns so nothing lands on the fold&quot;:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight swift&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;folds&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;proxy&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;reservedRegions&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;kind&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;division&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;options&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;includeInactive&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;When to reach for this:&lt;/strong&gt; custom, manually laid-out controls. Standard containers — &lt;code&gt;NavigationStack&lt;/code&gt;, &lt;code&gt;NavigationSplitView&lt;/code&gt;, &lt;code&gt;TabView&lt;/code&gt;, &lt;code&gt;List&lt;/code&gt;, &lt;code&gt;ScrollView&lt;/code&gt; — already adapt to the fold for free, and the system automatically repositions alerts, action sheets, menus and popovers around reserved regions. Don&#39;t reimplement that.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Design note that&#39;s easy to miss:&lt;/strong&gt; continuously scrolling content (articles, feeds) should &lt;em&gt;not&lt;/em&gt; jump around to avoid the fold. Displacement is for discrete elements — a button, a control cluster, a container — not for a reading surface.&lt;/p&gt;


&lt;hr&gt;

&lt;h2&gt;
  &lt;a name=&quot;change-5-arrangements-a-new-layout-container&quot; href=&quot;https://dev.to/arshtechpro/iphone-duo-for-ios-developers-what-actually-changes-in-your-swift-code-5gc5#change-5-arrangements-a-new-layout-container&quot;&gt;
  &lt;/a&gt;
  Change #5: Arrangements — a new layout container
&lt;/h2&gt;

&lt;p&gt;New in iOS 27.1. An &lt;code&gt;ArrangementView&lt;/code&gt; sits between your navigation container and your content, takes a &lt;strong&gt;primary&lt;/strong&gt; and &lt;strong&gt;secondary&lt;/strong&gt; view, and decides how to place them based on size classes, aspect ratio, and any active division regions.&lt;/p&gt;

&lt;p&gt;Think Podcasts: now-playing view plus transcript.&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight swift&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;some&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;View&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;kt&quot;&gt;NavigationStack&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kt&quot;&gt;ArrangementView&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;kt&quot;&gt;PlayerView&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;secondary&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;kt&quot;&gt;UpNextView&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;arrangementViewStyle&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;split&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Two styles:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;.split&lt;/code&gt;&lt;/strong&gt; — divides the available bounds between the two views. Horizontally when wider than tall, vertically when taller. Constrain it if you only want one axis:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight swift&quot;&gt;&lt;code&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;arrangementViewStyle&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;split&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;axes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;horizontal&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;code&gt;.overlay&lt;/code&gt;&lt;/strong&gt; — prefers stacking content above/below, and moves to side-by-side as the device folds. Read the Z index to adapt the overlaid view:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight swift&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;struct&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;UpNextView&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;View&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;@Environment&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(\&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;overlayArrangementZIndex&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;zIndex&lt;/span&gt;

    &lt;span class=&quot;k&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;some&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;View&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kt&quot;&gt;UpNextList&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;minimized&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;zIndex&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;UIKit equivalent:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight swift&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;arrangement&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;UIArrangementViewController&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;arrangement&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;setViewController&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;playerVC&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;for&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;primary&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;arrangement&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;setViewController&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;upNextVC&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;for&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;secondary&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;arrangement&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;updateArrangement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;split&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;axes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;horizontal&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;nav&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;UINavigationController&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;rootViewController&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;arrangement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Picking one:&lt;/strong&gt; if your existing layout is an &lt;code&gt;HStack&lt;/code&gt;/&lt;code&gt;VStack&lt;/code&gt;, that&#39;s split. If it&#39;s a &lt;code&gt;ZStack&lt;/code&gt;, that&#39;s overlay. Otherwise — overlay when there&#39;s a clear foreground/background relationship and partially obscuring the background is acceptable; split when it&#39;s main/detail and neither side should be covered.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Two gotchas:&lt;/strong&gt; &lt;code&gt;ArrangementView&lt;/code&gt; provides no navigation infrastructure, so don&#39;t nest a &lt;code&gt;NavigationSplitView&lt;/code&gt; inside one. And don&#39;t put one inside a &lt;code&gt;List&lt;/code&gt; or &lt;code&gt;ScrollView&lt;/code&gt;.&lt;/p&gt;


&lt;hr&gt;

&lt;h2&gt;
  &lt;a name=&quot;change-6-the-hinge-api&quot; href=&quot;https://dev.to/arshtechpro/iphone-duo-for-ios-developers-what-actually-changes-in-your-swift-code-5gc5#change-6-the-hinge-api&quot;&gt;
  &lt;/a&gt;
  Change #6: The hinge API
&lt;/h2&gt;

&lt;p&gt;You can read the hinge directly. &lt;code&gt;onHingeChange&lt;/code&gt; in SwiftUI, &lt;code&gt;UIHingeInteraction&lt;/code&gt; in UIKit. Both give you a coarse status (closed / partially open / fully open) and a continuous angle.&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight swift&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;struct&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;InstrumentView&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;View&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;@State&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;pitchBend&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Double&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;

    &lt;span class=&quot;k&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;some&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;View&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kt&quot;&gt;GuitarView&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;pitchBend&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pitchBend&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
            &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;onHingeChange&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;_&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;context&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;in&lt;/span&gt;
                &lt;span class=&quot;c1&quot;&gt;// nil hinge == device doesn&#39;t have one. Always check.&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;guard&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;hinge&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;context&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;hinge&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                      &lt;span class=&quot;n&quot;&gt;hinge&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;status&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;partiallyOpen&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;pitchBend&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;
                    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt;
                &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;pitchBend&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;bend&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;for&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;hinge&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;angle&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;That guard is not optional politeness — your app runs on every other iPhone too, where &lt;code&gt;context.hinge&lt;/code&gt; is nil.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Important boundary:&lt;/strong&gt; the hinge API is for &lt;em&gt;interactions and effects&lt;/em&gt; — a whammy bar, a parallax, a camera shutter that responds to the fold. It is &lt;strong&gt;not&lt;/strong&gt; for layout. Use arrangements and reserved regions for layout. If you find yourself computing frames from &lt;code&gt;hinge.angle&lt;/code&gt;, you&#39;re on the wrong API.&lt;/p&gt;


&lt;hr&gt;

&lt;h2&gt;
  &lt;a name=&quot;change-7-multiple-scenes-and-split-view&quot; href=&quot;https://dev.to/arshtechpro/iphone-duo-for-ios-developers-what-actually-changes-in-your-swift-code-5gc5#change-7-multiple-scenes-and-split-view&quot;&gt;
  &lt;/a&gt;
  Change #7: Multiple scenes and Split View
&lt;/h2&gt;

&lt;p&gt;Two apps side by side on iPhone, for the first time. Every app participates whether it opts in or not.&lt;/p&gt;

&lt;p&gt;If you already support resizing on iPad or iPhone mirroring, you&#39;re most of the way there — same tools, size classes and scene geometry.&lt;/p&gt;

&lt;p&gt;For multiple windows of &lt;em&gt;your own&lt;/em&gt; app, iPhone Duo is the first iPhone to support it, and apps that already do this on iPad get it automatically. One rule to know: &lt;strong&gt;new windows can only be created on the inner display&lt;/strong&gt;, never the outer one. So handle the failure case:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight swift&quot;&gt;&lt;code&gt;&lt;span class=&quot;c1&quot;&gt;// Hides itself automatically when new windows aren&#39;t available&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;UIWindowSceneActivation&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;And actually handle the error path when requesting a scene, rather than assuming it succeeds.&lt;/p&gt;


&lt;hr&gt;

&lt;h2&gt;
  &lt;a name=&quot;change-8-scene-accessories-the-fun-one&quot; href=&quot;https://dev.to/arshtechpro/iphone-duo-for-ios-developers-what-actually-changes-in-your-swift-code-5gc5#change-8-scene-accessories-the-fun-one&quot;&gt;
  &lt;/a&gt;
  Change #8: Scene accessories (the fun one)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Scene accessories&lt;/strong&gt; let your app put content on &lt;em&gt;both displays at once&lt;/em&gt;. Main UI inside, supplementary content outside.&lt;/p&gt;

&lt;p&gt;The headline case is &lt;code&gt;CameraCaptureAccessory&lt;/code&gt;, available when your app is full screen on the inner display with an active camera session. The obvious use: showing your subject their own framing on the outer display while you shoot. Or a teleprompter:&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight swift&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;struct&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;CameraRootView&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;View&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;@State&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;model&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;TeleprompterModel&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;

    &lt;span class=&quot;k&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;some&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;View&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kt&quot;&gt;CameraView&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;model&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;model&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
            &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sceneAccessory&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;kt&quot;&gt;CameraCaptureAccessory&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;isEnabled&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;$model&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;isEnabled&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;kt&quot;&gt;TeleprompterView&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;model&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;model&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
                &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
                &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;onAvailabilityChange&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;model&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;isAvailable&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$0&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
            &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;toolbar&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;kt&quot;&gt;TeleprompterToggle&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;isEnabled&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;$model&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;isEnabled&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
                    &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;disabled&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;model&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;isAvailable&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;highlight__panel js-actions-panel&quot;&gt;
&lt;div class=&quot;highlight__panel-action js-fullscreen-code-action&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-on&quot;&gt;&lt;title&gt;Enter fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;20px&quot; height=&quot;20px&quot; viewBox=&quot;0 0 24 24&quot; class=&quot;highlight-action crayons-icon highlight-action--fullscreen-off&quot;&gt;&lt;title&gt;Exit fullscreen mode&lt;/title&gt;
    &lt;path d=&quot;M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z&quot;&gt;&lt;/path&gt;
&lt;/svg&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;The system controls availability dynamically — closing the device takes it away — so wire up &lt;code&gt;onAvailabilityChange&lt;/code&gt; and disable your UI accordingly instead of letting users tap into nothing.&lt;/p&gt;


&lt;hr&gt;

&lt;h2&gt;
  &lt;a name=&quot;testing-this-without-a-1999-device&quot; href=&quot;https://dev.to/arshtechpro/iphone-duo-for-ios-developers-what-actually-changes-in-your-swift-code-5gc5#testing-this-without-a-1999-device&quot;&gt;
  &lt;/a&gt;
  Testing this without a $1,999 device
&lt;/h2&gt;

&lt;p&gt;Xcode 27.1 is out now.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;iPhone Duo simulator via Device Hub&lt;/strong&gt;, with on-screen controls to open, close, rotate and fold. This is how you&#39;ll actually verify the four poses.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;App Resizability&lt;/strong&gt; — the app modernization skill from &quot;Modernize your UIKit app&quot; at WWDC26, renamed in Xcode 27.1, now covering SwiftUI and iPhone Duo.&lt;/li&gt;
&lt;li&gt;Test Split View explicitly. Half-width plus asymmetric insets is where most layout bugs show up.&lt;/li&gt;
&lt;/ul&gt;


&lt;hr&gt;

&lt;h2&gt;
  &lt;a name=&quot;the-checklist&quot; href=&quot;https://dev.to/arshtechpro/iphone-duo-for-ios-developers-what-actually-changes-in-your-swift-code-5gc5#the-checklist&quot;&gt;
  &lt;/a&gt;
  The checklist
&lt;/h2&gt;

&lt;p&gt;Rough order of effort-to-payoff:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] Rebuild with the iOS 27.1 SDK&lt;/li&gt;
&lt;li&gt;[ ] Grep for &lt;code&gt;UIScreen.main&lt;/code&gt; and replace it&lt;/li&gt;
&lt;li&gt;[ ] Replace orientation checks with size class checks&lt;/li&gt;
&lt;li&gt;[ ] Fix any &lt;code&gt;safeAreaInsets.left * 2&lt;/code&gt; style symmetry assumptions&lt;/li&gt;
&lt;li&gt;[ ] Move custom navigation to &lt;code&gt;NavigationSplitView&lt;/code&gt; / &lt;code&gt;TabView&lt;/code&gt;; consider &lt;code&gt;.defaultTabBarPlacement(.sidebar)&lt;/code&gt; on the inner display&lt;/li&gt;
&lt;li&gt;[ ] Run every screen through all four poses in the simulator&lt;/li&gt;
&lt;li&gt;[ ] Audit centered layouts — would a two-column layout be better?&lt;/li&gt;
&lt;li&gt;[ ] Adopt &lt;code&gt;ArrangementView&lt;/code&gt; for custom split/overlay layouts&lt;/li&gt;
&lt;li&gt;[ ] Adopt reserved regions for your highest-priority hand-laid-out controls&lt;/li&gt;
&lt;li&gt;[ ] Consider the hinge API and scene accessories if your app has a reason to use them&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The first four are cheap and prevent embarrassment. The rest are where the actual opportunity is — the Duo is going to make it extremely obvious to users which apps got attention and which didn&#39;t.&lt;/p&gt;


&lt;hr&gt;

&lt;h2&gt;
  &lt;a name=&quot;further-reading&quot; href=&quot;https://dev.to/arshtechpro/iphone-duo-for-ios-developers-what-actually-changes-in-your-swift-code-5gc5#further-reading&quot;&gt;
  &lt;/a&gt;
  Further reading
&lt;/h2&gt;

&lt;p&gt;Apple&#39;s Tech Talks for the Duo:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://developer.apple.com/videos/play/tech-talks/111461/&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;Prepare your app for iPhone Duo&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


            </description><link>https://dev.to/arshtechpro/iphone-duo-for-ios-developers-what-actually-changes-in-your-swift-code-5gc5</link><guid isPermaLink="false">https://dev.to/arshtechpro/iphone-duo-for-ios-developers-what-actually-changes-in-your-swift-code-5gc5</guid><pubDate>Wed, 09 Sep 2026 21:16:11 GMT</pubDate><author>ArshTechPro</author><enclosure url="https://media2.dev.to/dynamic/image/width=1000,height=420,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwqtn02moqeg8gf5xuhaq.png" type="image/jpeg"></enclosure><category>ios</category><category>mobile</category><category>swift</category><category>programming</category></item><item><title>Switching from GPT-5.6 Sol to GPT-6 Astra: Start with Medium Effort</title><description>&lt;p&gt;GPT-6 Astra at high reasoning effort produced the implementation I decided to keep. I still plan to use medium effort by default.&lt;/p&gt;

&lt;p&gt;High handled the interactions between retries and persisted state more completely, but its implementation run took about 48 minutes against medium&#39;s 31. In a separate review of the same Sol implementation, medium found a startup failure that high missed.&lt;/p&gt;

&lt;p&gt;I ran this comparison to choose a default after GPT-5.6 Sol high.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;the-work-behind-the-comparison&quot; href=&quot;https://dev.to/shinpr/switching-from-gpt-56-sol-to-gpt-6-astra-start-with-medium-effort-25ao#the-work-behind-the-comparison&quot;&gt;
  &lt;/a&gt;
  The work behind the comparison
&lt;/h2&gt;

&lt;p&gt;I used &lt;a href=&quot;https://github.com/shinpr/galley&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;Galley&lt;/a&gt;, my tool for unattended development. It takes queued tasks through environment preparation, implementation, and verification. When a task is retried, it should preserve the agent&#39;s previous work and reuse preparation that is still valid.&lt;/p&gt;

&lt;p&gt;The four conditions were Astra low, medium, and high, plus Sol high. First, each analyzed the repository for bugs, performance problems, and maintainability improvements. I selected a common implementation scope from the Astra findings and gave all four the same plan in separate worktrees. Finally, fresh sessions reviewed identical copies of Sol&#39;s implementation.&lt;/p&gt;

&lt;p&gt;The sessions ran in Codex CLI. The agents read guidance from &lt;a href=&quot;https://github.com/shinpr/codex-workflows&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;codex-workflows&lt;/a&gt;, including its coding, testing, and development-judgment skills, together with Galley&#39;s repository instructions and quality profile. The plan stated the expected behavior and constraints; the agents chose the design, order of work, and verification. These are the conditions I use for my own work.&lt;/p&gt;

&lt;h3&gt;
  &lt;a name=&quot;what-counted-as-a-good-result&quot; href=&quot;https://dev.to/shinpr/switching-from-gpt-56-sol-to-gpt-6-astra-start-with-medium-effort-25ao#what-counted-as-a-good-result&quot;&gt;
  &lt;/a&gt;
  What counted as a good result
&lt;/h3&gt;

&lt;p&gt;In my own agent workflows, I have repeatedly seen technically defensible suggestions turn into more machinery than the product needs. I wanted to know how much of that expansion each condition could avoid without being steered through every decision.&lt;/p&gt;

&lt;p&gt;I assessed whether the agents found consequential problems, proposed sound fixes, and selected work worth maintaining. During implementation, they also had to carry the plan through to working, verified behavior without being walked through it.&lt;/p&gt;

&lt;p&gt;A small edge case could score well. Removing unnecessary path manipulation or reusing a sound lock can make a system simpler. A new recovery protocol has more to justify. I did not count findings or changed lines as a measure of quality.&lt;/p&gt;

&lt;p&gt;The analysis phase supplied a concrete example. Galley intentionally allows an operator to requeue a running task. Low and medium proposed restricting that operation. High checked the documented intent and existing test, then left it out of its formal findings. For an unattended tool with an explicit manual override, removing that override is a product decision. Tidier state transitions alone do not justify it.&lt;/p&gt;

&lt;p&gt;I checked findings against the code and tests, and credited deliberate exclusions only when the report or visible session history supported them. The &lt;a href=&quot;https://www.norsica.jp/resources/astra-effort-evaluation&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;evaluation notes&lt;/a&gt; contain the scoring criteria, reasons for the weights, findings, and full usage breakdown.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;a-preparation-step-that-invalidated-itself&quot; href=&quot;https://dev.to/shinpr/switching-from-gpt-56-sol-to-gpt-6-astra-start-with-medium-effort-25ao#a-preparation-step-that-invalidated-itself&quot;&gt;
  &lt;/a&gt;
  A preparation step that invalidated itself
&lt;/h2&gt;

&lt;p&gt;The most useful implementation difference was easy to overlook in a passing test suite.&lt;/p&gt;

&lt;p&gt;Before an implementation agent starts, Galley can prepare the environment and create acceptance-test skeletons: starter tests tied to the task&#39;s requirements. If the task runs again with the same inputs, those successful preparation steps should be reusable.&lt;/p&gt;

&lt;p&gt;All four implementations added fingerprints to detect changed inputs. But Galley also writes information into the task during execution. Creating a skeleton adds an explanation to an acceptance criterion. Include that explanation in the next fingerprint, and the successful preparation step invalidates its own result.&lt;/p&gt;

&lt;p&gt;Low, medium, and Sol left a version of that problem in the setup reuse path. High separated the generated explanation from the user-supplied contract. It followed the change through preparation, task updates, and the next run.&lt;/p&gt;

&lt;p&gt;An unnecessary preparation run means another wait and another model invocation. It can also send a creator back into test files the implementation agent has already edited. Preserving valid reuse was part of the requirement, just as detecting changed inputs was.&lt;/p&gt;

&lt;p&gt;High&#39;s other choices were often modest. For large Git change sets, it extended an existing way to pass paths through standard input. For corrupt task records, it reused the existing isolation logic. It covered more behavior without inventing a separate mechanism for each case.&lt;/p&gt;

&lt;p&gt;I am taking that implementation forward in &lt;a href=&quot;https://github.com/shinpr/galley/pull/137&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;this Galley PR&lt;/a&gt;. It needs further review and edits. The first CI run passed on Linux and macOS but failed on Windows when a timeout test tried to clean up a log file still held open.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;medium-found-the-earlier-failure&quot; href=&quot;https://dev.to/shinpr/switching-from-gpt-56-sol-to-gpt-6-astra-start-with-medium-effort-25ao#medium-found-the-earlier-failure&quot;&gt;
  &lt;/a&gt;
  Medium found the earlier failure
&lt;/h2&gt;

&lt;p&gt;Medium&#39;s implementation addressed the same plan and generally extended existing mechanisms. It left the setup reuse gap described above. At about $15.61 and 31 minutes, though, it produced a substantial change for less than high&#39;s $21.03 and 48 minutes.&lt;/p&gt;

&lt;p&gt;Then came the review phase. All four reviewed the same Sol code, so differences here describe their reviewing rather than their own implementations.&lt;/p&gt;

&lt;p&gt;Sol had added recovery for corrupt task files whose claims had expired. A claim records that a worker has taken a task. Medium followed startup and found an earlier recovery step: if a corrupt task still had an owner record from an interrupted worker, startup failed before reaching the new recovery code. Unrelated queued tasks never got a chance to run.&lt;/p&gt;

&lt;p&gt;Medium reproduced that through the actual daemon startup function. It had found a repair that could look complete locally while leaving the application unable to start.&lt;/p&gt;

&lt;p&gt;High&#39;s review caught more of the input lifecycle and another reason ordinary requeue operations invalidated preparation results. It did not catch this startup failure. For my workflow, that is a reason to keep a fresh review session even when I pay for high during implementation.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;low-did-not-save-much-here&quot; href=&quot;https://dev.to/shinpr/switching-from-gpt-56-sol-to-gpt-6-astra-start-with-medium-effort-25ao#low-did-not-save-much-here&quot;&gt;
  &lt;/a&gt;
  Low did not save much here
&lt;/h2&gt;

&lt;p&gt;Low was slightly cheaper than medium during implementation, but its analysis run cost more. Across the three phases, medium was cheaper overall.&lt;/p&gt;

&lt;p&gt;Low&#39;s review did identify a data-loss path: reusing an edited input file succeeded, but a later failure while saving evidence could delete that file. Its proposed correction was small and appropriate. Roll back files created by the current attempt; preserve files brought forward from an earlier one. The review missed preparation reuse and other recovery paths.&lt;/p&gt;

&lt;p&gt;I would still try low for a small, well-defined edit. This experiment used broad repository work and does not establish how the two compare on that smaller category.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;sols-review-was-stronger-than-its-implementation&quot; href=&quot;https://dev.to/shinpr/switching-from-gpt-56-sol-to-gpt-6-astra-start-with-medium-effort-25ao#sols-review-was-stronger-than-its-implementation&quot;&gt;
  &lt;/a&gt;
  Sol&#39;s review was stronger than its implementation
&lt;/h2&gt;

&lt;p&gt;Sol&#39;s implementation missed repeated input cleanup. It also retained both old and new scheduling paths, with some tests still exercising the old path. Future changes would have two versions of similar behavior to keep aligned.&lt;/p&gt;

&lt;p&gt;Its review found problems no Astra report included. One was another preparation-reuse failure: setup saved a learned environment profile, but its success fingerprint still described the profile from before that update. The next run rejected its own successful setup evidence. I checked this through profile persistence, reloading, and the reuse decision.&lt;/p&gt;

&lt;p&gt;Sol also caught a missing shutdown check before taking more queued work and a repository check that rejected valid paths with different capitalization on macOS.&lt;/p&gt;

&lt;p&gt;Some remedies needed more scrutiny. Galley tracks child processes in registry files. Sol correctly identified an unsafe fallback to an old shared registry, but declared new ownership metadata necessary before establishing whether the fallback could be retired with a clear migration procedure. I counted that against judgment: the problem deserved a fix, while the proposed extra state still needed a reason to exist.&lt;/p&gt;

&lt;p&gt;Sol&#39;s implementation result would have been a poor basis for predicting the value of its review.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;the-price-of-a-completed-run&quot; href=&quot;https://dev.to/shinpr/switching-from-gpt-56-sol-to-gpt-6-astra-start-with-medium-effort-25ao#the-price-of-a-completed-run&quot;&gt;
  &lt;/a&gt;
  The price of a completed run
&lt;/h2&gt;

&lt;p&gt;These are the totals for one analysis, one implementation, and one review run per condition:&lt;/p&gt;

&lt;div class=&quot;table-wrapper-paragraph&quot;&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Condition&lt;/th&gt;
&lt;th style=&quot;text-align: right&quot;&gt;API-equivalent cost&lt;/th&gt;
&lt;th style=&quot;text-align: right&quot;&gt;Combined elapsed time&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Astra low&lt;/td&gt;
&lt;td style=&quot;text-align: right&quot;&gt;$26.97&lt;/td&gt;
&lt;td style=&quot;text-align: right&quot;&gt;About 49 minutes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Astra medium&lt;/td&gt;
&lt;td style=&quot;text-align: right&quot;&gt;$25.67&lt;/td&gt;
&lt;td style=&quot;text-align: right&quot;&gt;About 51 minutes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Astra high&lt;/td&gt;
&lt;td style=&quot;text-align: right&quot;&gt;$37.23&lt;/td&gt;
&lt;td style=&quot;text-align: right&quot;&gt;About 77 minutes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sol high&lt;/td&gt;
&lt;td style=&quot;text-align: right&quot;&gt;$31.79&lt;/td&gt;
&lt;td style=&quot;text-align: right&quot;&gt;About 75 minutes&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Medium cost about 19% less than Sol high. High cost about 17% more than Sol high, but about 45% more than medium. High&#39;s premium depends on which starting point you are considering.&lt;/p&gt;

&lt;p&gt;The implementation runs differed sharply in how many model requests they made: 238 for Sol, 80 for medium, and 107 for high. Medium accumulated about 11.1 million input tokens against Sol&#39;s 37.8 million, and generated about 50,000 output tokens against 98,000. The bill depends on those token volumes and their cache breakdown, not the request count alone. On this task, medium&#39;s lower usage more than offset Astra&#39;s higher per-token rates.&lt;/p&gt;

&lt;p&gt;These are API equivalents calculated from session usage, not charges allocated from my Codex subscription. They exclude the evaluator&#39;s work and subsequent corrections. Approval-wait overhead was estimated from the logs; the sessions ran concurrently on one machine. The &lt;a href=&quot;https://www.norsica.jp/resources/astra-effort-evaluation#usage-cost-and-time&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;resource document&lt;/a&gt; separates the phases and explains the calculation.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;what-i-will-use-next&quot; href=&quot;https://dev.to/shinpr/switching-from-gpt-56-sol-to-gpt-6-astra-start-with-medium-effort-25ao#what-i-will-use-next&quot;&gt;
  &lt;/a&gt;
  What I will use next
&lt;/h2&gt;

&lt;p&gt;Medium is my starting point for the next broad Galley task. I would choose high up front when the work crosses retries, ownership, and persisted state, where missing a related path leaves me with another round of repair. In this implementation, high kept preparation reusable across task updates and handled recovery paths the other implementations left incomplete.&lt;/p&gt;

&lt;p&gt;This was one run per condition on one repository. The evaluation was model-assisted, and I challenged and revised assessments when their reasoning or attribution was wrong. The final scoring was not blind. I trust the concrete failures and fixes more than small differences between numerical scores.&lt;/p&gt;

&lt;p&gt;My next check is whether this choice reduces the work I have to repair afterward. I will still use a separate review pass. Medium&#39;s startup finding would have been lost if I had assumed high already covered everything.&lt;/p&gt;


            </description><link>https://dev.to/shinpr/switching-from-gpt-56-sol-to-gpt-6-astra-start-with-medium-effort-25ao</link><guid isPermaLink="false">https://dev.to/shinpr/switching-from-gpt-56-sol-to-gpt-6-astra-start-with-medium-effort-25ao</guid><pubDate>Sat, 05 Sep 2026 04:59:20 GMT</pubDate><author>Shinsuke KAGAWA</author><enclosure url="https://media2.dev.to/dynamic/image/width=1000,height=420,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyo480ylfrgcvjagtxw2t.jpg" type="image/jpeg"></enclosure><category>ai</category><category>tutorial</category><category>llm</category><category>programming</category></item><item><title>Muse Spark 1.3 - A Review</title><description>&lt;p&gt;In this post I&#39;ll talk about my brief experience with &lt;code&gt;muse&lt;/code&gt;, Meta&#39;s LLM harness for developers, as well as Muse Spark 1.3, their latest frontier-level model.&lt;/p&gt;

&lt;h1&gt;
  &lt;a name=&quot;the-bad&quot; href=&quot;https://dev.to/gosukiwi/muse-spark-13-a-review-3h7#the-bad&quot;&gt;
  &lt;/a&gt;
  The Bad
&lt;/h1&gt;

&lt;p&gt;I&#39;ll start with the bad, just because I like to end with the positive :)&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;skill-usage&quot; href=&quot;https://dev.to/gosukiwi/muse-spark-13-a-review-3h7#skill-usage&quot;&gt;
  &lt;/a&gt;
  Skill Usage
&lt;/h2&gt;

&lt;p&gt;It&#39;s not that good following skills. If the skill has &lt;code&gt;disable-model-invocation&lt;/code&gt;, sometimes it refuses to launch it, even if you manually call it. I think it happens when you call the skill mid-sentence, but it&#39;s not consistent.&lt;/p&gt;

&lt;p&gt;It&#39;s also not as good as other models at following skill instructions. It seems to get confused more often. &lt;/p&gt;

&lt;p&gt;For example, I have one skill that will address an issue from GitHub to PR.&lt;/p&gt;

&lt;p&gt;In Claude (Opus 5) and Cursor (Grok 4.6) it works perfectly. The first step is &lt;a href=&quot;https://www.aihero.dev/skills-grill-me&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;grilling&lt;/a&gt; the issue, after that&#39;s finished, the next step is autonomous, plan, implement with TDD, review and open PR.&lt;/p&gt;

&lt;p&gt;With Muse Spark 1.3, sometimes the skill will not continue and I have to nudge it for the next step, just saying something like &quot;continue&quot; is enough, but surely is annoying.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;formatting&quot; href=&quot;https://dev.to/gosukiwi/muse-spark-13-a-review-3h7#formatting&quot;&gt;
  &lt;/a&gt;
  Formatting
&lt;/h2&gt;

&lt;p&gt;The output is not great. Sometimes it will show me raw markdown, sometimes not. It&#39;s not consistent.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;sandbox&quot; href=&quot;https://dev.to/gosukiwi/muse-spark-13-a-review-3h7#sandbox&quot;&gt;
  &lt;/a&gt;
  Sandbox
&lt;/h2&gt;

&lt;p&gt;Having a sandbox is good, but in this case, it&#39;s a bit too restrictive. For example, I&#39;m working with a Firebase project and I want to use the emulators.&lt;/p&gt;

&lt;p&gt;Well, too bad. The sandbox doesn&#39;t allow you to run files outside your workspace or use external ports.&lt;/p&gt;

&lt;p&gt;That would be great if I could add exceptions or some kind of configuration, but you can&#39;t. You are basically forced into &lt;code&gt;--yolo&lt;/code&gt; mode if you don&#39;t want to be prompted on repeat for the same things over and over.&lt;/p&gt;

&lt;p&gt;What&#39;s sad is that even if you want to give them access, the models will just get stuck asking for permissions for the same thing over and over again and eventually they will just be stuck doing nothing.&lt;/p&gt;

&lt;h1&gt;
  &lt;a name=&quot;the-good&quot; href=&quot;https://dev.to/gosukiwi/muse-spark-13-a-review-3h7#the-good&quot;&gt;
  &lt;/a&gt;
  The Good
&lt;/h1&gt;

&lt;p&gt;Not everything is bad, of course. With a bit of effort I think it&#39;s actually quite usable.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;price&quot; href=&quot;https://dev.to/gosukiwi/muse-spark-13-a-review-3h7#price&quot;&gt;
  &lt;/a&gt;
  Price
&lt;/h2&gt;

&lt;p&gt;The main reason I decided to try the model. The subscription plan is relatively generous for it&#39;s price. With the $15 plan you can code non-stop for a couple hours, in my experience around 2 to 4 hours, before you reach the 5-hour limit.&lt;/p&gt;

&lt;p&gt;But of course, it depends on your usage. If you have a lot of concurrent sessions, it will last less.&lt;/p&gt;

&lt;p&gt;Also the weekly usage is a bit low, I&#39;d say around 4-5 times the 5 hour limit (~25h).&lt;/p&gt;

&lt;p&gt;I think compared to other plans though it&#39;s probably one of the best values. For $50 you can get ~33% more usage, which should be enough for ~11.5hs of coding a day. Quite decent for that price tag.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;intelligence&quot; href=&quot;https://dev.to/gosukiwi/muse-spark-13-a-review-3h7#intelligence&quot;&gt;
  &lt;/a&gt;
  Intelligence
&lt;/h2&gt;

&lt;p&gt;My biggest hurdles with the model have been in the actual development flow. When it comes to general intelligence and code, I think it&#39;s quite good. It feels around Opus 4.8 / Grok 4.6. Of course, that&#39;s totally subjective.&lt;/p&gt;

&lt;p&gt;I think the code it generates is very similar to most other frontier models. I don&#39;t think anyone can really tell what model generated what output nowadays anyway, they are all quite competent.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;output&quot; href=&quot;https://dev.to/gosukiwi/muse-spark-13-a-review-3h7#output&quot;&gt;
  &lt;/a&gt;
  Output
&lt;/h2&gt;

&lt;p&gt;Unlike Claude which speaks a weird dialect of english, called &lt;em&gt;claudish&lt;/em&gt; by most devs, the output from this model seems to be much more readable in general.&lt;/p&gt;

&lt;p&gt;In my experience I rarely need to tell it to re-word what it just said.&lt;/p&gt;

&lt;h2&gt;
  &lt;a name=&quot;speed&quot; href=&quot;https://dev.to/gosukiwi/muse-spark-13-a-review-3h7#speed&quot;&gt;
  &lt;/a&gt;
  Speed
&lt;/h2&gt;

&lt;p&gt;I think the model speed is quite good. I think the time to first token is average, but after that it feels pretty fast.&lt;/p&gt;

&lt;h1&gt;
  &lt;a name=&quot;conclusion&quot; href=&quot;https://dev.to/gosukiwi/muse-spark-13-a-review-3h7#conclusion&quot;&gt;
  &lt;/a&gt;
  Conclusion
&lt;/h1&gt;

&lt;p&gt;Overall, I think this whole ecosystem is still a bit rough around the edges, but if you are willing to work around that, it&#39;s an usable model and harness.&lt;/p&gt;

&lt;p&gt;Probably it will be much better in a couple months. It&#39;s clear they are playing catch-up at this point. But they (Meta) seems to have the tools (model, data centers, engineers), so they have a real shot at creating a good product.&lt;/p&gt;

&lt;p&gt;I don&#39;t think there&#39;s a real reason to swap from, say, Codex, Claude or Cursor unless you want to try something new, or maybe are looking for a cheaper alternative.&lt;/p&gt;

&lt;p&gt;Let me know what you think in the comments, I&#39;d love to hear other people&#39;s opinions about this model/harness!&lt;/p&gt;


            </description><link>https://dev.to/gosukiwi/muse-spark-13-a-review-3h7</link><guid isPermaLink="false">https://dev.to/gosukiwi/muse-spark-13-a-review-3h7</guid><pubDate>Fri, 04 Sep 2026 03:56:36 GMT</pubDate><author>Federico Ramirez</author><enclosure url="https://media2.dev.to/dynamic/image/width=1000,height=420,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffu81cnv3jr58y9keuky0.png" type="image/jpeg"></enclosure><category>ai</category><category>llm</category><category>development</category><category>programming</category></item></channel></rss>