Docs
CommunityJev Cookbooks
Infinite Cardinality Choice
Official TypeSafe cookbook that finds a half-remembered film among 5,000 by running one Noul question per film, re-reading the top 80 with longer plots, and putting the top 20 into a single Choice question.
- Format
- Docs
- Reading time
- 2 min
- Published by
- Community
- Added
- Nov 2026
Highlights
- Three-step search over a 5,000-film catalog: one Noul per film, a re-read of the top 80, then one Choice over the top 20.
- The right film comes first 78% of the time, against 33% when embedding search builds the shortlist.
- Choice questions take at most 255 options, and only about forty when each option is a long plot summary.
- Each of the 48 times the Choice question gave its top film 0.8 or more, that film was right.
- Numbers measured on jev-1.14.0 in November 2026; the run replays a downloaded cache by default.
Questions about this entry
Short answers drawn from the linked project or page.
Install openai, ipython, matplotlib, and cooksafe>=0.3.0,<0.4.0 with pip, then set TYPESAFE_API_KEY and, for the embedding search the results are measured against, OPENAI_API_KEY.
No. With DOWNLOAD_CACHE set to True the code downloads the published answers into infinite_cardinality_choice_cache.json, so the run makes no requests. To run live, set DOWNLOAD_CACHE to False and delete that file; a cache already on disk is never overwritten.
The API enforces a limit of 255 options, and 256 options is rejected outright. When each option is a long plot summary, only about forty fit in one Choice question, which is why the search narrows the catalog in earlier steps.
The right film comes first for 78% of the 100 requests. When embedding search picks the twenty films for the final step instead, the right film comes first for 33% of them.
A films.jsonl catalog of 5,000 films with title, year, and two versions of the Wikipedia plot section fetched 2026-11-07, plus 100 requests from Microsoft's tip-of-the-tongue dataset collected from the forum iRememberThisMovie.com.
The numbers came from jev-1.14.0, run in November 2026. The cookbook sets TYPESAFE_MODEL to that version, and jev-latest runs the newest model live.
Its top probability tells you whether to show one film or a short list. Each of the 48 times the Choice question gave its top film 0.8 or more, that film was right.
From the Jev guides
Original write-ups on what this entry is for.
From the Jev AI model community
Posts from builders shipping with Jev right now.