TypeSafe / Jev · Lesson 0002 · ~10 min · After 0001

State and atomic questions

You know the three primitives. Now the design skill: what goes in state, what goes in each question, and how to point a question at one field.

One idea

State = the material (facts, messages, policies). Prefer a JSON object with named fields over one giant string.

Questions = the judgments. Keep them narrow. If a judgment has several independent factors, ask one question per factor and combine in code.

Point at nested fields with a backticked path in instructions, e.g. `ticket.messages[0].text`. Question IDs are for your code only — they are not sent to the model.

Primary: State · How to build (decompose questions) · Primitives

Pattern

  1. Keep deterministic checks in code (closed ticket, days overdue).
  2. Build state with only the context those questions need.
  3. Ask many independent questions in one request (they run in parallel).
  4. Compose answers with weights and thresholds in code.
Win: redesign a vague "triage this ticket" ask into structured state + atomic questions, and use backticked paths correctly.

Retrieval practice

Q1. Ticket + refund policy + open orders for a refund decision. Best state shape?

Q2. Priority depends on severity, frustration, and reproducibility. Best approach?

Q3. How do you tell Jev to judge only the first customer message?

Primary source (read next)

Read State and the "Decompose the questions" section of How to build with TypeSafe. Then ask anything unclear.

Ask your teacher

Paste a real judgment ("vague PR triage") and I'll help you split state vs questions — or we go to 0003 on confidence-gated routing.