Blog / Questions / FIG. 71
What Is jev-tree? Recursion Past the 255-Choice Cap
jev-tree is the community library that turns giant answer sets into staged Jev questions, past the ~255-choice cap. How it works and when you need it.
jev-tree is a community library solving one specific, inevitable collision: Jev's choice sets cap out around 255 options per question (per ecosystem documentation), and real taxonomies laugh at 255. Product catalogs have ten thousand categories; support routing trees have four hundred leaves; entity resolution candidate sets balloon. jev-tree's answer is the obvious one executed well: don't ask one impossible question, ask a tree of possible ones.
The mechanic: your giant option set gets organized (or auto-chunked) into a hierarchy; Jev picks among the ~top-level branches first, then among that branch's children, recursing until a leaf wins. A 10,000-leaf taxonomy resolves in three or four staged verdicts instead of one illegal mega-choice, and at per-verdict prices the extra hops cost fractions of a cent while each stage stays inside the model's sweet spot: small closed sets, confidence per choice.
Two design notes from how the pattern behaves in practice. First, tree shape is question design: branches should be mutually exclusive and obvious at each level ("Electronics vs Apparel" beats "Gifts vs Popular"), which is the boundary-clause craft applied to hierarchy, and a confused top-level verdict poisons everything below it, so spend your calibration there. Second, compound confidence honestly: a path's certainty is roughly the product of its stages', so tree pipelines want slightly stricter per-stage gates before the escalation tier takes over.
When you don't need it: answer sets under the cap, obviously, and cases where a two-stage manual split (category question, then within-category question) is clearer than a generic tree. The library earns its keep at genuine scale and in research pipelines where taxonomies are the whole job.
Frequently asked questions
Why does the 255 cap exist?
Ecosystem documentation reports it as a platform constraint on choice-set size; whatever the implementation reason, staged questions are the portable answer.
Does staging hurt accuracy?
Each stage is easier than a mega-choice would be, which usually helps; the risk concentrates at the top split, so calibrate there hardest and gate on compound confidence.
Where do I get jev-tree?
Via the awesome-jev ecosystem list; it's community-maintained, so the usual open-source diligence applies before production.
Numbers throughout are as reported by the build authors, not verified by shipwithjev. Code-shaped examples are pseudocode; the official docs live at docs.typesafe.ai.