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
- Keep deterministic checks in code (closed ticket, days overdue).
- Build
statewith only the context those questions need. - Ask many independent questions in one request (they run in parallel).
- Compose answers with weights and thresholds in code.
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.