Austin JavaScript · October 2026
Small decision models, big UX benefits.
Presenter Collier King
Talk Chat-native apps, decision models, and the data loop
Date Oct 20, 2026
The arc: chat is slow, decision models make it fast, build the chat into the app, then make the models good with your own data. Ends on small models, big UX.
Section 01 of 05
Chat is slow.
Users expect instant. LLMs take seconds.
Chat is slow Decision models One app, for clickers and chatters System One first Make it yours
Quick poll
Who here has built a chatbot?
Keep it up if it shipped to real users.
Keep it up if they still use it.
Expect the hands to drop fast. Then: what's the biggest friction with chatbots? Latency.
Latency
Users expect instant. LLMs answer in seconds.
feels instant
noticeable
flow breaks
they leave
Decision model
50–500 ms
LLM + tools
2–15 s
log scale: each dashed line is 10× slower
10 ms
100 ms
1 s
3 s
5 s
10 s
30 s
+32% 1 s → 3 s
+90% 1 s → 5 s
+123% 1 s → 10 s
Higher odds a visitor bounces, vs. a 1 s page load
Google/SOASTA mobile benchmarks, 2017 · Zones: Nielsen's response-time limits · Bands are orders of magnitude
Sometimes a wait is expected: a hard question. But often it's "just do the thing." Google and SOASTA (2017, mobile): going from a 1 s to a 3 s load raises the probability of a bounce 32%; to 5 s, 90%; to 10 s, 123%. That's page loads, and a chat turn is the same wait with a spinner.
Section 02 of 05
Decision models.
Pick the answer instead of writing it.
Chat is slow Decision models One app, for clickers and chatters System One first Make it yours
RLCD · decision models
A decision model answers questions. It never writes text.
System One fast, focused judgments, like this · System Two slow, deliberate reasoning, like an LLM (Kahneman)
Cloudflare, “Clef” launch post
In: the state, plus typed questions: choice, score, yes/no.
Out: a probability for every allowed option. Nothing to parse.
RLCD (RL for calibrated decisions) makes the probabilities honest: when it says 80%, it's right about 8 times in 10.
Jev (TypeSafe) started it. Clef (Cloudflare) is open weights.
RLCD: Reinforcement Learning for Calibrated Decisions. Where RLHF rewards answers people like, RLCD rewards honest probabilities. Jev: 70–500 ms, $0.042 per million input tokens, output free. The name System One comes from Kahneman: fast, focused judgments.
Under the hood
Write the answer, or pick it.
Ticket Our API started returning 500 errors 20 minutes ago. Please help ASAP.
LLM
writes it out
0.00 s
0 forward passes
can break
{"department":
"technical",
"frustration":
1,
"is_urgent":
"yes"
}
… +54 tokens
One full forward pass for every token, one after another. ✗ "yes" is a string, not true/false. The JSON fails validation, so try again.
Decision model
picks from options
0.00 s
0 forward passes
~9× faster, always valid
Read once
ticket + every question, in one pass
Memory every question reuses it
departmentkeep 3 of ~150k
technical1.00
billing0.00
sales0.00
frustrationkeep 3 of ~150k
frustrated0.67
calm0.33
very_angry0.00
is_urgentkeep 2 of ~150k
true0.99
false0.01
Example and probabilities: Jev quick start · Decision-model time: measured p50 in our app · LLM time: illustrative
Same support ticket as the Cloudflare picture on the last slide, and the example from Jev's quick start. The app needs three answers: which team, how frustrated, is it urgent. Step 1, the LLM writes the JSON one token at a time. Every token is a full forward pass, one after another. This runs in real time: about 3.2 seconds, 76 passes, counting the tool-call wrapper. Step 2: and it can break. It wrote "yes" as a string where the schema wants true or false, so validation fails and you retry. Step 3, the decision model reads the ticket and every question once, in one parallel pass, and keeps that work in memory (the KV cache). Step 4: then it asks all three questions at once. For each one it scores every word it knows, about 150 thousand, keeps only the allowed answers, and turns those few scores into probabilities with a softmax. Highest wins. Frustration is the honest one: 0.67, so you'd see that uncertainty. Step 5: nothing to parse. The answer is assembled from the picks, so it's always valid. Probabilities are Jev's quick-start response (its docs call them illustrative); timings follow the detailed slide: 0.34 s measured p50 in our app vs about 3.2 s illustrative for the LLM.
What TypeSafe measured
Jev: 68% accurate, at $0.0004 a workflow.
Accuracy vs. cost per workflow, average of 4 workflows
Structured-output errors 0% Jev0.58–45.5% across 10 LLMs
Tool-call errors 0% Jev0.67–17% across 10 LLMs
Mid-tier LLMs score about the same for $0.003–0.03. Jev's 0% errors are by design: it can only return an allowed option.
TypeSafe, “Introducing System One Models & Jev” · evals . LLM error rates: OpenRouter traffic, per TypeSafe. Vendor numbers; TypeSafe flags likely bias.
Left: Jev sits at about 68%, level with mid-tier LLM workflows, at roughly a hundredth of the cost. The best LLMs are still more accurate; this is about the trade. Right: structured-output errors are zero by construction, not by measurement. TypeSafe's own headline is 40–200x faster on decision-shaped work.
Section 03 of 05
One app, for clickers and chatters.
The chat drives the same actions as the UI.
Chat is slow Decision models One app, for clickers and chatters System One first Make it yours
UX
Clickers or chatters: let people pick.
Traditional UI
When the UI tries to show everything · “Too Many Toolbars”
Precise and scannable
Shows you what's possible
Fast once you've learned it
Chat
When the chat agrees to anything · a dealership chatbot, Dec 2023
Say what you want, not where it lives
Forgiving of vague requests
Nothing to learn
The chat can do anything the UI can, and nothing it can't.
Both have famous failure modes. Left: Internet Explorer in the toolbar era, when every option got its own bar. Right: in December 2023 a ChatGPT-powered chatbot on a Chevy dealership site (Chevrolet of Watsonville) agreed to sell a 2024 Tahoe for $1 and called it "a legally binding offer, no takesies backsies" after a user told it to agree with anything. The dealer didn't honor it; the bot came down. Our chat can only run the page's own actions, so it can't invent a $1 deal. People are being trained to chat with AI, and plenty still want buttons. Every app I build at work gets the same question: "Cool UI. What about a chatbot?" Neither is the fallback for the other. Both are first-class, and people switch between them in the same session. The chat is native to the app: it drives the same controls a person does, so it can do anything the UI can, and nothing it can't.
How I build in 2026
One schema. Every kind of client.
People
Workspace
actions
React UI
for clickers · typed client
In-app chat
for chatters · Flue agent
browser_action_catalog
browser_action
API docs
Scalar reference at /docs
WebMCP
page actions as tools · planned
Agents
MCP server
Claude, ChatGPT, IDEs
REST API
keys, scripts, services
Hono + Zod
routes + schemas
OpenAPI spec
/openapi.json
operationIds · types
Clickers and chatters run the same workspace actions.
Agents get MCP and REST from the same spec.
Planned: WebMCP lets browser agents use the page itself.
Change a route once. Every client follows.
spec from the routes
action sources
actions from operations
Stack: Hono, Zod, React Router, TanStack Query. Read it left to right: Hono routes with Zod schemas produce the OpenAPI document, and every client comes from that document. Workspace actions have two sources: nine curated spec operations (each runs its operationId) and UI-only actions like sort and filter. The React UI's clicks call them; the chat's Flue agent gets two tools, browser_action_catalog (what this page can do, with JSON Schema from each action's Zod input) and browser_action (run one). For agents, the MCP server and REST API come straight from the spec. WebMCP is different: it is planned (not shipped yet) and would register the page's eligible workspace actions as tools for a browser agent in the user's tab, through the same registry and confirmations as a click. Half of my "users" aren't people anymore.
The backbone
Hono + Zod : the route is the contract
import { createRoute, z } from '@hono/zod-openapi';
import { priceHistorySchema } from '../models/index.js';
export const getPriceHistory = createRoute({
method: 'get',
path: '/price/{ticker}',
operationId: 'getPriceHistory',
request: {
params: z.object({ ticker: z.string() }),
query: z.object({
start: date('start'),
end: date('end'),
}),
},
responses: responses(priceHistorySchema),
});
import { OpenAPIHono } from '@hono/zod-openapi';
import { routes } from '../openapi/index.js';
const app = new OpenAPIHono();
app.openapi(routes.getPriceHistory, async (c) => {
const { ticker } = c.req.valid('param');
const { start, end } = c.req.valid('query');
return c.json(
await domain.getPriceHistory(ticker, start, end),
200,
);
});
createRoute
handler
Left, the route file. 1) Two imports: createRoute and z both come from @hono/zod-openapi, so every schema documents itself. 2) The route declares method, path, and operationId. The operationId is the name every client uses: the React SDK function, the MCP operation, the docs entry. 3) Inputs and output, all Zod. 4) That is the contract. Right, the server: OpenAPIHono registers the handler against that route, and c.req.valid() hands back typed, validated params. date() and responses() are small helpers in the same file. Code is trimmed for the slide.
Generated from the spec
Write the route once. The clients come free.
API docs via Scalar
import { Scalar }
from '@scalar/hono-api-reference';
app.get('/docs', Scalar({
content: openApiDocument(),
pageTitle: 'API Reference',
}));
MCP server
import { openApiMcpServer }
from '@cloudflare/codemode/mcp';
openApiMcpServer({
name: 'research',
spec: curatedSpec,
executor,
request: (op) =>
execute(op, principal),
});
React client generated by Hey API
// Hey API: spec → typed client
import { defineConfig }
from '@hey-api/openapi-ts';
defineConfig({
input: openApiDocument(),
plugins: ['@hey-api/sdk'],
});
// generated: one fn per operation
import { getPriceHistory }
from './generated/sdk.gen.js';
await getPriceHistory({
path: { ticker },
});
REST is the routes themselves. Agents only see the operations you choose to expose.
MCP adapter
exposed operations
Docs: Scalar renders the same document. MCP: Cloudflare's openApiMcpServer (@cloudflare/codemode) turns a curated subset of the spec into search/execute tools; we expose ten read operations. You can also attach custom tools. React: Hey API generates getPriceHistory with typed params from the operationId; components wrap it in TanStack Query.
The agent
Flue runs the agent. The decision model goes first.
Flue : an open-source TypeScript agent framework from the Astro team, now at Cloudflare . Built on the Pi harness. On Cloudflare, each agent is a Durable Object .
The LLM's tools are the page's workspace actions. It reads the catalog, then calls browser_action.
'use agent';
import { useModel, useTool, type AgentProps } from '@flue/runtime';
import { createJevResolveTool } from '../lib/jevResolveTool.js';
import { createBrowserBridgeTools } from '../lib/browserBridgeTool.js';
import { ROUTER_PROVIDER_ID } from '../lib/jevRouterProvider.js';
export function ResearchAgent({ id }: AgentProps) {
// Router model: the decision model first, the LLM only if unsure
useModel(`${ROUTER_PROVIDER_ID}/${plannerModel()}`);
const bridge = createBrowserBridgeTools({ endpoint /* … */ });
const tools = [
createJevResolveTool({ /* … */ }), // decision model: route + arguments
bridge.catalogTool, // browser_action_catalog
bridge.invokeTool, // browser_action
];
for (const tool of tools) useTool(tool);
return plannerPrompt; // the LLM's system prompt
}
agent
router
jev_resolve
browser_action
This is the whole agent, trimmed. 1) Imports: hooks from @flue/runtime, plus our three tools. 2) useModel picks the model, and ours is a router provider: on a new turn it emits the jev_resolve tool call itself, with no LLM call. If the decision model handles it, the action runs and the turn ends. If it is unsure, multi-step past what the sequence can settle, or just conversation, the router delegates the turn to the real LLM. 3) The tools: jev_resolve (decision model, route plus arguments in one call), then browser_action_catalog and browser_action for the LLM. Those two are the page's workspace actions; there is no separate tool per action. 4) The return value is the LLM's system prompt. The router logic itself is one click away (router link).
The browser bridge
A Durable Object bridges the agent and your tab
Flue agent
runs on the server
decision model, then LLM
tool: browser_action
Bridge DO
user:<id>
a mailbox, one per user
keeps each tab's actions
refuses stale commands
waits for the tab's poll
expires unclaimed ones
returns the tab's receipt
Browser tab
React workspace
action registry
Execute? Y/N
claim → dispatch
1 · advertise
2 · invoke
3 · deliver
5 · receipt
6 · tool result
You hit send. The page advertises what it can do right now.
The agent calls browser_action with an action, input, and epoch.
The DO checks it against that catalog and hands it to the tab's long-poll.
The tab asks you, claims the command, and dispatches it through the registry.
The page reports what it installed, plus its new catalog.
The agent gets that receipt back as its tool result.
Durable Object
admit
long-poll
tab: confirm → claim → dispatch
Transport is an HTTP long-poll (held up to 20 s), not a WebSocket. Flue has no client-side tools, so the bridge is our own transport running beside it. One Durable Object per user is a mailbox: a claim, a cancel, and a receipt can't interleave, and a held poll wakes the moment a command arrives. Unclaimed means not run. The DO compares commands with the full snapshot the page advertised, so a stale or forged command is refused.
Under the hood
A workspace action is a typed handler.
import { z } from '@hono/zod-openapi';
import { defineBrowserAction } from './browserActionRegistry.js';
export const sortTableCommand = z.object({
column: z.enum(SORT_COLUMNS),
direction: z.enum(['ascending', 'descending']),
}).strict();
defineBrowserAction({
name: 'ui:comparison.sort',
description: 'Order the comparison table by ticker, count, or an outcome. Runs nothing.',
requires: ['comparison_workspace_visible'],
input: sortTableCommand,
invoke: (controllers, input, grant) => controllers.comparison?.sortTable(input, grant),
});
// A click calls the same controller method
<ComparisonResults onSortChange={(next) => actions.sortTable(next, HUMAN)} />
A schema, a description, one handler. The click and the agent call the same one.
defineBrowserAction
dispatch
the click
1) One command schema, importable by both React and the Worker. 2) The registry entry: a typed function with a description. The registry is the catalog of what the visible page can do right now; requires gates it to the page that owns it. 3) The table header calls the exact same method, so a click and the agent can't drift. A click passes HUMAN; the agent's call carries a grant that is live only while the action runs. Show the action test page here.
Section 04 of 05
System One first.
Ask multiple choice. Hand off to the LLM when unsure.
Chat is slow Decision models One app, for clickers and chatters System One first Make it yours
Routing
System One first. System Two only when it's unsure.
p ≥ τ
p < τ
τ (tau) = the confidence floor
p = the model's probability for its pick
Prompt
from chat
Decision model
System One · p(option)
Run the action
milliseconds later
LLM planner
System Two · thinks
Act or clarify
seconds later
Confident? Act now. The goal is for most requests to take this lane.
Unsure, multi-step, or wants a written answer? The LLM takes it.
route gate
floors
System One is the decision model: fast, focused, one pass. System Two is the LLM planner: slow, deliberate, step by step. The decision model is a router: what is the person asking for, which workspace action matches, what are the inputs. Is it multi-step? Then the LLM plans the sequence. A curveball? It defers. Anything that needs generated text, like an analysis, needs the LLM: decision models don't write.
Set it up to win
“Is this an action?”
Open world: every action in the app, plus any the model makes up. Closed world: only what this view can do.
“sort by return, best first” is this ui:comparison.sort?
0.96
“sort by return, best first” is this ui:shell.navigate?
0.02
“sort by return, best first” is this ui:shell.chatPanel?
0.01
“sort by return, best first” is this conversation?
0.01
“sort by return, best first” is this unsupported?
0.00
Comic relief. Open world: ask a model "what should happen?" and every action in the app is a candidate, plus any action name it can invent. Is this a pigeon? Step 1: the view only offers five things. Step 2: everything else is gone. Now the question is "which of these five?", and the model is very sure. Next slide: the same thing, properly.
Set it up to win
Ask multiple choice, not fill-in-the-blank.
Open world
“What should happen?” Any action, any value.
updateWorkspaceStudyselectWorkspaceEventui:ticker.sortui:ticker.selectOccurrenceui:dashboard.filterui:dashboard.sortui:watchlist.sectionui:watchlist.alertFiltermarkAllAlertsReadcompareWorkspaceStudyui:comparison.sortui:shell.navigate…every value as free text
Closed world
“Which of these?” Only what this view can do.
ui:comparison.sortui:shell.navigateui:shell.chatPanelconversationunsupported
Values come from code: tickers in your catalog, numbers in the text, events on screen.
The model never invents a value. It only picks one the code found.
view eligibility
offered actions
candidates
Every view advertises only its own actions, and that subset is the model's choice set. Why not offer the whole app? It performs worse. What's the easiest question on a test? Multiple choice. Decision models aren't built for fill-in-the-blank.
The real questions
One request, four questions, all answered at once.
Request on the comparison page sort by average return, best first
routechoice · the workspace action
What is the user asking the visible workspace to do?
ui:comparison.sort0.96
ui:shell.navigate0.02
ui:shell.chatPanel0.01
conversation0.01
unsupported0.00
multi_stepyes/no
Two or more distinct changes, each needing its own action?
sort_columnchoice · a field
Which column of the comparison table should order the rows?
avg_return0.93
avg_max_excursion0.03
current_return0.02
count0.01
+ 8 more: ticker, avg_min_excursion, none…
sort_directionchoice · a field
Which way should the rows be ordered?
descending0.91
ascending0.06
unstated0.03
Every answer clears its floor, so the page runs ui:comparison.sort with avg_return, descending.
question batch
route question
sort options
This is the real shape of one batch on the comparison page. route is the workspace action: the actions this view offers plus two sentinels, conversation (just talk) and unsupported (things the app can't do, listed by name). multi_step is a yes/no gate. Then every argument question for every eligible action: here sort_column (12 options) and sort_direction (descending, ascending, unstated). Each option also carries a one-line description the model reads, like "Average return per occurrence (by return, best performers)". One call answers all of them. Question and option names are the app's; probabilities are illustrative.
Multi-step
Two changes? Decide, run, ask again.
Request on the dashboard open Comparison and sort by return
1 · first batch
multi_step yes 0.94 → start a sequence
route → ui:shell.navigate 0.92
runs: { view: "comparison" }
2 · ask the route again
Already done: opened the comparison. Now on: the comparison.
route → ui:comparison.sort 0.95
runs: avg_return, descending
3 · ask once more
Already done: opened the comparison. Sorted by average return.
route → nothing_left 0.97
done
Each step re-asks over the page's fresh action list. Code writes the "Already done" lines from receipts. If a step can't settle, the LLM takes the rest of the turn.
action sequence
multi-step gate
A multi-step request doesn't have to go to the LLM. The first batch's multi_step answer (threshold 0.5) starts a sequence, and its route answer is the first action, gated exactly like a single command. After it runs, the route question is asked again over the page's fresh catalog, with completed actions removed, a nothing_left option that ends the sequence, and two lines code writes from receipts: "Already done:" and "Now on:". Never model text. Anything the controller can't settle hands the rest of the turn to the LLM planner with a record of what ran. Probabilities are illustrative; the receipt wording here is paraphrased.
Section 05 of 05
Make it yours.
Your data, your thresholds, your model.
Chat is slow Decision models One app, for clickers and chatters System One first Make it yours
Step 1 · Synthetic data
Start with data you generate, answer first.
You can't wait for users before you have a model.
Fix the answer first. Choose the action and its arguments before any text exists.
Render it as requests. An LLM writes the ways people might actually ask.
Perturb it. Typos, slang, missing details, things you don't support.
Calibrate on it. Good enough to ship behind the LLM fallback.
Synthetic accuracy isn't real-world accuracy. Keep it tagged as synthetic, forever.
The questions have to be relevant to your domain. Real user data is better, but you may not have it going in. LLMs are great at generating it.
Step 2 · Calibrate
So where does τ come from?
ask the LLM
act
0
τ = 0.82
1
model confidence (illustrative distribution)
A floor per decision: which action (0.82), then each argument (0.75).
Tuned on 657 test turns: 386 right / 16 wrong became 273 right / 0 wrong.
floors
the sweep
Calibration means tuning the probability cutoffs for each kind of decision: the action, and the value for each field, to get the most decisions right on your dataset. Our sweep traded 113 correct answers for zero wrong commands; those turns go to the LLM instead. Widen the band for safety, narrow it for speed and cost.
Step 3 · Real labels
Then let your users improve it.
every correction
is a label
Ship it
People use it
They correct it
Golden dataset
Re-tune the floors
“It did X. It should have done Y.” Plus the trace of what the model said.
human_gold verified by a person; the answer key
llm_judge a blind, stronger model's call
llm_silver the fallback LLM's answer in production
synthetic generated, answer first
report reasons
golden cases
replay
promotion gate
A report says what it did and what it should have done. Combined with the recorded probabilities, it becomes a case. Replay the stored answers under new floors: does this case pass now, and does anything in the golden set break? If something regresses, you see exactly which decision. An admin decides whether a real user's case outweighs a synthetic one. Over time, real cases replace synthetic. Careful wording: this is human-in-the-loop calibration, not reinforcement learning. It becomes RL when those rewards update the model's weights. That's the next slides.
Going further
Shrink the world → learn the domain → calibrate the call
Candidate generation
Model learning
Decision control
1 Filter exact + fuzzy
2 Extract NER · Clairic
3 Train fine-tune · RL
4 Calibrate precision ↔ recall
5 Decide typed output
“how did alphabet do after earnings?”
ORG · Alphabet Inc.
GOOGL 0.38
GOOG 0.30
ATEC 0.12
AMR 0.10
AOSL 0.10
τ 0.80
{ ticker: "GOOGL" } → act
240 answers in play
0.38 p(GOOGL)
0.80 τ, the floor to act
GOOGL typed, straight into the action
Open world: every ticker you track, every way to read the request. The model has to find a needle.
Exact and fuzzy matching on names and aliases keep only what the words could mean.
Named-entity recognition (NER) catches names string matching misses, like “Google's parent”, without reopening the world.
Off the shelf, it hedges between share classes. Your labels teach it the one your app uses.
τ sets the trade. Raise it: fewer wrong actions. Lower it: fewer hand-offs to the LLM.
Above τ, a typed value goes straight into the action. Below it, the LLM takes the turn.
Step 3 · Train · two different things
Fine-tune you · supervised
Train on your labeled examples (LoRA adapters). Clef ships open weights, so you can.
RL post-training provider-hosted · coming
Rewards from production traffic update the weights; Cloudflare runs the loop and serves the checkpoint.
ticker terms
alias matcher
Illustrative numbers. Each step makes the model's job easier. 1) Filter: tracked companies with their spellings and aliases; exact and fuzzy matching flags tickers up front, so the model only chooses among them. 2) Extract: named-entity recognition (NER) catches phrasings string matching misses and still hands the model a closed set. Pop-up: Clairic, Cloudflare's System One extraction model, released Oct 19, does the same for typed values like dates and amounts; we are evaluating it. 3) Train, two different things: supervised fine-tuning on your labels (LoRA; Clef has open weights) vs RL post-training, where production rewards update the weights and the provider hosts the loop (Cloudflare's upcoming service). Both change weights; RL learns from rewards instead of labels. Our flywheel only re-tunes thresholds. 4) Calibrate: pick τ on held-out data. 5) Decide: a typed value, or a hand-off. In our app, steps 1 and 4 are live.
The ecosystem
Fine-tune it. Host it. Make it yours.
Decision Index vs. median latency
Clef : open weights, Apache 2.0. A Qwen backbone, a small schema head, LoRA adapters.
GPUs : an H100 rents for about $2–4 an hour.
Coming from Cloudflare: RL post-training, provider-hosted. Production traffic → rewards → new weights → served
Cloudflare, “Clef decision models” (Oct 2026) · H100 pricing: Runpod , Lambda , Oct 2026
Decision models are small next to LLMs, so they're cheap to fine-tune and cheap to host. Clef is open weights: Cloudflare froze a Qwen backbone and trained a schema head plus rank-256 LoRA adapters, with a Brier loss for calibration and RLCD on top. Clef-flash runs at a 38.8 ms median. Cloudflare's next step is an RL service: capture traffic, define rewards, train, and serve your checkpoint on Workers AI. First with their FDE team, self-serve later. This is where your feedback loop becomes real RL: the corrections become rewards that update weights. Prediction: inference providers will host your fine-tune of their model. You run your own model, tuned to your domain.
Live demo
Now, the app.
Click, then ask. Sort the table by hand, then ask the chat. The same action runs both times.
Both lanes. A clear request runs in about 0.3 s. A vague one goes to the LLM.
Multi-step. “Open Comparison and sort by return.”
The loop. Report a wrong answer, replay the floors, promote.
One demo, at the end, so every beat is something they've already seen explained. 1) Section 03: the click and the chat call the same workspace action. 2) Section 04: watch the decision model act in a few hundred ms, then give a vague request and watch it hand off to the LLM. 3) Section 04: multi-step runs as decide, run, ask again. 4) Section 05: report a wrong answer, replay the floors against the golden set, promote.
Thanks
Small models.Big UX.
Takeaway Big models to explore. Small models to ship.
Contact github.com/collierking
New this week · Cloudflare
System One can read, too.
Released Oct 19, 2026 · preview on Workers AI
Clairic fills typed fields from text or images in one pass: no tokens generated, under a second.
Extracts spans, computes numbers and dates, estimates with an 80% range.
System One extracts, System One decides, System Two writes. Cloudflare's claim demo (Clairic → Clef → LLM): 19.3 s vs 61.7 s all-LLM, 49% cheaper.
Not in our app yet. We're evaluating it for the long-tail step: reading dates and amounts the code can't match.
Cloudflare, “Introducing Clairic, a new System One class of extraction models” (Oct 19, 2026). Vendor numbers.
Released yesterday (October 19). Decision models pick among options you list; Clairic returns values: text spans with offsets, computed numbers and dates, estimates with a median and an 80% interval, simple forecasts. Bills input tokens only; thirty fields cost about the same as three. Open weights promised "soon". Their framing: extraction models turn raw input into typed values, decision models turn values into decisions, LLMs turn decisions into words. Their damage-claim pipeline ran 19.3 s end to end vs 61.7 s with GLM-5.3 at every step, 49% cheaper. Caveats they list: multi-step arithmetic isn't there yet; calibration is measured, not guaranteed. Where it would fit for us: step 2 of "shrink the world", the long tail that string matching and NER miss, especially typed values like dates and amounts.
Live demo
Close the loop.
Report a wrong answer, replay the floors against every golden case, then promote.
Live demo
Watch both lanes.
A clear request takes the fast lane. A vague one goes to the LLM.
Show the routing trace or provenance badge for each: which model answered, its confidence, the latency.
Live demo
One app, two ways in.
Click through it like any app, or just ask for what you want.
The app: market events (earnings, moving-average crosses) and the distribution of returns after them, compared across tickers. Do one task with the UI, then the same task in chat. Don't explain internals yet.
RLCD · decision models
Same request. Two ways to answer.
Ticket “Our API started returning 500 errors 20 minutes ago. Please help ASAP.”
Decision model
Jev / Clef · decides
0.00 s
ticket + 3 typed questions → one parallel pass
departmentchoice technical 100%
frustrationscore frustrated 67%
is_urgentyes/no true 99%
→ route to technical, flag urgent
LLM
generates · then parses
0.00 s
→ parse JSON · validate · run
question batch
model call
Same request, both lanes, real time. Same ticket as the last two slides (Jev's quick-start example); the shape is exactly what our app does. The decision model gets the state plus a batch of typed questions: which action (a choice over what the page can do now, plus "conversation" and "unsupported"), is this multi-step (yes/no), and that action's arguments (closed options). One call, every answer with a probability. If any answer falls below its floor, the turn goes to the LLM instead. Jev p50 in our app was 336 ms including a laptop round trip.
Under the hood
One forward pass, or one per token.
LLM
generates text
0.00 s
0 forward passes
Prompt request + tool schemas, as text
Prefill reads the whole prompt in one parallel pass
Decode loop ×75
pass → logits over ~150k tokens → softmax → sample one
ui0.81
sort0.07
comparison0.05
table0.03
Parse JSON → validate → act
Decision model
picks from options
0.00 s
0 forward passes
State + questions page state, typed options
Prefill the same kind of pass. Then it stops.
Schema head
one logit per allowed option → softmax per question
ui:comparison.sort0.96
ui:shell.navigate0.02
conversation0.01
unsupported0.01
Floor check p ≥ floor → act, else defer
LLM
Decision
0
0.5 s
1 s
2 s
3 s
Step 1, prefill: both read their input in one parallel pass. Same kind of work. Step 2: the decision model is done. A small head reads the final hidden states and gives one logit per allowed option; softmax per question. No text, nothing to parse. 0.34 s is our measured p50. Step 3: the LLM's first decode step. Logits over the whole ~150k vocabulary, softmax, sample ONE token. That 0.81 is the probability of the token "ui", not of the action being right. Step 4: repeat for every token, one full forward pass each, then parse the JSON. Timing on the LLM side is illustrative (about 75 tokens). Clef's model card: "a probability for every allowed option of every question in a single forward pass"; its schema head is a small transformer head on the backbone's final hidden states.
About me
I train models, and I ship the apps that use them.
ML engineer
Classifiers and decision models
Calibration and evaluation
Fine-tuning small models
Builder
Web apps
Agents and MCP servers
The glue between them
Meanwhile
Our users' brains are being trained on chat.
Every hour in ChatGPT or Claude makes a text box feel more natural, and a wall of dropdowns feel like work.
Why merge them
One experience beats a chatbot bolted on the side.
Chat for intent, UI for precision
Say roughly what you want, then fine-tune it with the controls.
One state, two views
When chat changes something, the UI shows it. When you click, the chat knows.
The chat teaches the UI
People watch their request happen on screen and learn where things live.
Live call
Try it: ask for something
Press Decide to call the model.
Set VITE_DECISION_URL in .env to hit the real endpoint; adapters live in decision-demo.js.
The ML part
Good thresholds need good labels.
Measure
Five numbers, in plain English
Calibration When it says 90%, is it right 90% of the time? reliability diagram, ECE
Precision When it acts, how often is it right? TP / (TP + FP)
Recall Of everything it should catch, how much does it? TP / (TP + FN)
F1 One number that balances the two. harmonic mean of P and R
AUROC How well it ranks right above wrong, at every threshold. threshold-free ranking
Going further
Make it smaller, cheaper, and yours.
Upstream filtering
Narrow the options first
Regex, dictionaries, and NER propose candidates. The model can't pick an option it was never shown.
Fine-tuning
Train on your golden set
Fine-tune a small open model. Ship it only when it beats the hosted baseline.
The ecosystem
Small models win
Cheaper to run, faster to answer, and they're yours.