# Fast and Slow

Thursday, October 29

---

# 📆 Today

- This week in AI: System One models
- Work time: [First slice](../../build/first-slice.milestone.md), due Tuesday at 2:30

---

<!-- id: this-week-in-ai -->

<x-sfx-cue src="../assets/this-week-in-ai-theme.mp3" on="player:block-enter" />

![@image(fit=contain).background](../assets/this-week-in-ai.png)

---

# Two ways of thinking

| System 1                  | System 2           |
| ------------------------- | ------------------ |
| Fast, automatic           | Slow, deliberate   |
| _2 + 2 = ?_               | _17 × 24 = ?_      |
| Reading anger in a face   | Filling out a tax form |

^ From Daniel Kahneman's _Thinking, Fast and Slow_ (2011). You can't stop yourself from answering 2 + 2; you have to sit down and work at 17 × 24. Most of your day runs on System 1, and System 2 steps in when something takes effort or feels off.

---

# LLMs think out loud

- An LLM **writes one token at a time,** and every token is a full pass through the model
- Reasoning models **write thousands of tokens** before they answer: System 2, in text
- The answer comes back **as text,** and software has to read it

^ Recall Introduction to LLMs: predict the next token, add it, repeat. Even a one-word answer like "billing" means running the whole model for each token, and a reasoning model may think for a few thousand tokens first. That's why answers take seconds to minutes.

---

<!--
play:
  variant: fact
-->

# Jev: a model that doesn't write

"Unstructured state in, typed probabilistic decisions out."

^ TypeSafe AI came out of stealth on September 15 with a $40M seed round. Its CEO, Diogo Almeida, was one of the OpenAI researchers on InstructGPT, the RLHF work that turned GPT-3 into ChatGPT. He left to build the opposite of a chatbot, and they call it the first "System One model."

---

# You ask questions; it picks answers

**State:** _"Our API integration started returning 500 errors on every request about 20 minutes ago, and we can't process any customer orders until this is fixed."_

| Question                                      | Kind                 | Answer    |
| --------------------------------------------- | -------------------- | --------- |
| Which department? billing · technical · sales | Choice               | technical |
| How frustrated do they sound?                 | Score                | 0.67      |
| Is it urgent?                                 | Noul (true or false) | 0.99      |

^ From TypeSafe's quickstart. Choice picks from a list (up to 255 options), Score rates the state against a rubric, and Noul says how likely a statement is to be true. Every question is answered at once, against the same state, and every answer comes with a probability.

---

# How it's different

|             | LLM                                                    | Jev                                 |
| ----------- | ------------------------------------------------------ | ----------------------------------- |
| Gives back  | Text to parse                                          | A value from your list              |
| Works by    | One token at a time                                    | All answers in one pass             |
| Trained for | Answers people prefer (RLHF) or a program can check (RLVR) | Honest confidence (RLCD)        |
| Speed       | 3 seconds to 5 minutes                                 | 0.07 to 0.5 seconds                 |
| Price       | $0.20–$10 per million tokens in, more for output       | $0.042 per million in, output free  |

^ Output is free because there's nothing to write: it reads the state and scores the options. It can't answer "Technical Support" or invent an "engineering" department, because it never spells anything out. The architecture isn't public. Open copies like Laya build on BERT-style encoders, the 2018 "reader" models that take in a whole input at once instead of writing.

---

<!--
play:
  variant: fact
-->

# Honest about how sure

"If a model can do a task 95% of the time but doesn't say when it's in the 5%, it can't automate that task."

^ Calibrated means the numbers mean something: of all the answers it gives at 0.9, about 90% are right. Ask an LLM how sure it is and it writes a number, which is just more text. With an honest number, software can act when the model is sure and pass the rest along.

---

# Fast and slow, together

```mermaid
flowchart LR
  T[A ticket comes in] --> J[Jev decides]
  J --> C{Sure?}
  C -->|Yes| A[Act on it]
  C -->|No| S[An LLM or a person looks]
```

^ The same split as in your head: System 1 handles most of it, and System 2 takes the cases that feel off. TypeSafe calls these "smart if-statements": routing, sorting, scoring, guardrails, and checking an agent's work.

---

# Doom, ten times a second

- Jev reads the game as text and picks the next move: **10 decisions a second, about $7 an hour**
- TypeSafe: _"A non-AI doom bot could play better."_

^ The demo shows speed, not skill. The next one is closer to your work this week.

---

[@embed Testing apps with Jev](https://x.com/Neriousy/status/2100287208166969746)

^ A coding agent testing an app with Jev and opencode's browser tool. Each click is a decision, and each decision takes a tenth of a second instead of ten.

---

# The fine print

| On TypeSafe's own tests | Right | Cost per case | Seconds |
| ----------------------- | ----- | ------------- | ------- |
| GPT-5.6 Sol             | 74.1% | $0.0836       | 23.3    |
| Claude Opus 5           | 73.1% | $0.1761       | 37.8    |
| GPT-5.6 Terra           | 67.9% | $0.0304       | 10.1    |
| Claude Sonnet 5         | 67.8% | $0.1174       | 78.1    |
| Jev                     | 67.8% | $0.0004       | 0.4     |

^ TypeSafe wrote these workflows (security alerts, invoices, support threads, agent traces), and "right" means agreeing with GPT-6 Astra and Fable 5.1. Nobody independent has checked yet. Jev can't answer outside your list, but it can confidently pick the wrong answer, and it can't tell you why. The best models are still about five points better.

---

<!--
play:
  variant: fact
-->

# Why "Jev"?

Jevons paradox: when something gets cheaper to use, we use far more of it.

^ William Stanley Jevons, 1865: more efficient steam engines made Britain burn more coal, not less. TypeSafe's bet is that a decision at $0.0004 goes places nobody would pay $0.17 for: every message, every click, every row. Open versions such as Laya and Kev showed up within weeks.

---

# In your app: write or decide?

- **Decide with rules** when you can: sort, filter, match exact words. Instant and free.
- **Decide with a model** when it takes judgment: _Is this post offering a ride or asking for one?_
- **Write with a model** when it has to say something new: _Suggest three recipes from this photo._

[AI in your app](../../project/guides/ai.guide.md)

^ Your app's model is an LLM, but you can still ask it for a decision: give it the list and ask for one word back. Most first slices need rules and sample data, not a model.

---

<!--
play:
  variant: section
-->

# Work time

First slice, due Tuesday at 2:30

---

<!--
play:
  variant: fact
-->

# Leave with a link someone can use

Someone else, on their own phone, finishes your core task.

^ Not the whole app. One task, start to finish, online. Everything else in the slice builds on that.

---

# The next hour

| Time | Do                                                                     |
| ---- | ---------------------------------------------------------------------- |
| 2:45 | Write the one task you'll give testers, at the top of `docs/tests.md`  |
| 2:50 | Build until that task works on a phone, start to finish                |
| 3:25 | Put it online, swap phones with a neighbor, and watch                  |
| 3:35 | Write what happened, and book your three real tests                    |

^ I'll come around. Have your task and your app open when I get to you.

---

# Briefs that move it forward

| Vague                  | Moves it forward                                                                                  |
| ---------------------- | ------------------------------------------------------------------------------------------------- |
| "Build my app."        | "Build the first core feature in docs/project.md, with eight sample rides that sound like real students." |
| "Make it look better." | "On a phone, I have to scroll to find Post. Put it at the top."                                   |
| "It's broken."         | "I tapped Post with no time set and nothing happened. It should say a time is needed."            |

^ One change per brief. Try each change yourself before the next one, and undo what didn't help.

---

# When you're stuck

- **Ten minutes on one thing?** Undo, and ask for a smaller step.
- **The agent wants a server, accounts or a database?** Use sample data for now.
- **Not sure what's next?** Reread your core features and build the first one that doesn't work yet.
- **Still stuck?** Raise your hand.

---

# Pilot with a neighbor

1. Put it online, and send the link or hand over your phone
2. Give a **task, not a tour**
3. **Watch, don't help,** and note where they pause
4. Swap

^ A dress rehearsal: your neighbor probably doesn't have the problem, so they don't count as one of your three. It shows whether the task can be finished at all, and it's practice keeping quiet.

---

# Before you leave

- Your link works on someone else's phone
- `docs/tests.md` has your task, what success looks like, and what you want to learn
- Three people with the problem, by name, and when you'll test with each

^ Book them now. A text sent before you leave beats a plan for the weekend.

---

# Tuesday

- **2:30:** [First slice](../../build/first-slice.milestone.md) due: prototype, test plan, three tests, and one round of changes
- **In class:** Deploys

[Testing with users](../../project/guides/user-tests.guide.md) · [The Studio](../../project/index.md)
