Skip to content
JevDirectory.org
Patterns

Hierarchical classification

Walk a deep taxonomy level by level, using each Choice answer to pick the next level's options, keeping several paths alive.

Category
Patterns
Also known as
—
Related terms
4
Directory entries
2
Docs
docs.typesafe.ai
Added
2026-09-24

Definition

The cookbook classifies documents through deep patent, retail product, biomedical, and source-code hierarchies. Instead of flattening a taxonomy into one 255-option Choice, each level is its own question and the winner's children become the next request's options.

The trade-off is round trips versus option count: a level-by-level walk keeps every candidate path available in one call per level, which is why it is paired with beam search to avoid committing too early.

Tagspatternsclassification

From the directory

Classify documents through deep patent, retail product, biomedical, and source-code hierarchies using parallel beam search over Choice probabilities.
Cookbooks & DemosDocs#official#cookbook#classification
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.
Practices & PatternsDocs#official#primitives#choice
Official

From the community

Posts from builders shipping with Jev right now.

Follow @typesafeai

jod: Zod validates data, Jev judges it

Loki: a self-improving harness with a Jev companion

Jev as an LLM guardrail inside Agentgateway

Jev reranks station suggestions in TrainLCD

Vercel's fx safety reviewer, measured at 18× faster

A game where you race Jev at spotting slop