Jev glossary
Patterns
Speculative question
A question whose answer only matters on some code paths, asked anyway because questions are cheap and parallel.
- Category
- Patterns
- Also known as
- None
- Reading time
- 1 min
- Related terms
- 3
- Directory entries
- 2
- Docs
- docs.typesafe.ai
- Added
- 2026-09-24
Definition
If a ticket turns out not to be a bug report, the severity answer is simply ignored. Because questions in a request are independent and run in parallel, asking one you might not need is close to free in time and costs only its input tokens.
The trade-off is real but small: every speculative question adds to the input bill on every call, so the docs recommend reusing them across branches instead of asking one question per rare edge.
Tagspatternsbatching
Related terms
Definitions that connect to this one.
Speculative fan-outAsk every question the system might need in one request (including ones only some branches use), and let code discard the rest.PatternsParallel questionsBatching many questions into one request instead of many calls, which is dramatically cheaper and faster with identical answers.PatternsInput tokensThe tokens billed on every request: state plus questions, including speculative questions your code ignores.API & Models
From the Jev directory
Directory entries that go deeper on this term.
Ask everything the system might need in one request, then let code throw away what it does not use. The ticket-triage example sends a category plus four speculative questions in parallel.
Jev Practices & PatternsDocs#official#patterns#batching
Official
The three TypeSafe question types, the typed answers they return, how to choose between them, and how to ask several in a single call.
Jev Practices & PatternsDocs#official#primitives#choice
Official
From the Jev AI model community
Posts from builders shipping with Jev right now.