Skip to content
JevDirectory.org
Cookbooks & Demos#batching#patterns#search#evaluation

One Request, Many Questions: Batching, Fan-Out, and Composite Scoring

Jev bills input tokens and gives output away, and questions in one request run in parallel. The design consequence is simple: ask more per call, then decide in code.

Most model pricing punishes you twice: input tokens and output tokens. Jev charges for input only, output tokens are free, and questions inside a single request are evaluated in parallel, so response time barely moves when you add a question. Those three properties have one design consequence: ask more per request, then decide in code.

Parallel questions

The parallel questions cookbook is the headline result. A 13-question regulatory briefing batched into one call came back 12.2 times cheaper and 10 times faster than the naive version, with no change in the answers. The mechanism is simple: one state, one request, one answer per question, all evaluated in parallel.

Before batching, a single question was one round trip. After, a briefing is one round trip.

Speculative fan-out

The fan-out pattern goes further and asks questions the code might not need. The ticket-triage example sends a Choice for category plus four speculative judgments in the same request: bug severity, reproduction steps, whether a refund is likely, and customer frustration. The bug branch reads severity and repro; the billing branch reads refund; the rest is ignored.

if category.choice == "bug_report":
    if bug_severity.score > 1.5 and bug_repro.noul > 0.6:
        escalate_to_engineering(ticket_id, severity="high")

Speculation has a price, because every question rides along as input tokens on every call. Fan out on judgments that several branches can reuse and leave the rest for later requests.

Composite scoring

Some decisions are not one question but several weighted ones. The composite scoring pattern scores a resume on four dimensions in one request, normalizes each score by its top level, and combines them with weights that live in code:

ic_score = (0.40 * py) + (0.10 * lead) + (0.40 * arch) + (0.10 * general)
em_score = (0.15 * py) + (0.40 * lead) + (0.20 * arch) + (0.25 * general)

Same answers, two role policies. When the job description changes you edit weights, not questions.

Batch at the edges of the context window

The most impressive batching happens when the candidate set is the state itself:

  • Line-by-line search ranks all 218 lines of a 43,980-character document in one request, with a separate existence question that can answer "the document does not contain this".
  • Skill suggestion ranks 182 agent skills in one request and re-reads the top three in a second, cutting wrong skill loads from 16.8% to 7.3%.
  • Structure recovery reconstructs Markdown from unformatted text in exactly two requests: 16 line-pair questions to stitch split sentences, then 62 questions to classify each block, 10,211 tokens in 0.8 seconds.

Each of these replaces something that would otherwise be a loop of model calls with a single parallel pass, or two.

Know the limits

Batching is not free of constraints. Choice accepts at most 255 options, so a longer document needs a windowed second pass. Context is 64k, split between state and the longest question. Input bills at $42 per billion tokens, so the question is not "is this cheap" but "is this question worth its input on every call". And unanswered speculative answers still cost tokens even when your code ignores them.

A short checklist before you batch:

  1. Can several branches reuse this judgment? If yes, add it to the shared request.
  2. Is the candidate set smaller than 255 options? If not, pre-filter or window.
  3. Does the state fit comfortably under the context budget with room for the questions?
  4. Are the thresholds and the weights in code, where you can change them without re-prompting?
  5. Did you verify the batched answers match the one-question-at-a-time answers on your fixtures?

Do those and a single request stops being a cost-saving trick and becomes the default shape of a Jev call.

From the directory

The resources behind this article.

A 13-question regulatory briefing that shows batching every question into one call is 12.2x cheaper and 10x faster with no change in answers.
Cookbooks & Demos#official#cookbook#batching
Official
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.
Practices & Patterns#official#patterns#batching
Official
Break a judgment into atomic Score questions, normalize each by its top level, and combine them with weights you control in code, as in the resume example's four scored dimensions.
Practices & Patterns#official#patterns#score
Official
Semantic search over GitHub's Terms of Service: one request ranks all 218 lines with a Choice while a Noul checks whether the document contains an answer at all, including when it should say no.
Cookbooks & Demos#official#cookbook#search
Official
Rank 182 agent skills in one request and re-read the top three in a second: over 488 requests, wrong skill loads fell from 16.8% to 7.3% and needless loads from 9.8% to 4.0%.
Cookbooks & Demos#official#cookbook#agents
Official
Reconstruct Markdown from unformatted text in two requests: 16 Noul line-pair questions stitch split sentences, then 62 questions classify each block's type and companions.
Cookbooks & Demos#official#cookbook#formatting
Official
Back to all articles

More articles

The most common Jev design mistake is asking a question that does not match the primitive. Here is how to choose by the shape of the answer you need back.
Practices & Patterns#primitives#choice#score
Read article
Confidence is not accuracy, and a single global threshold is rarely the right policy. A practical guide to per-action gates, measured thresholds, and the logs you will want later.
Practices & Patterns#confidence#routing#evaluation
Read article

From the community

Posts from builders shipping with Jev right now.

Vercel's fx safety reviewer, 18x faster

We're seeing extraordinary results from @typesafeai. Default mode in 𝚏𝚡 is auto, with a safety reviewer analyzing every command. That reviewer runs on GPT Luna today. Jev is up to 18x faster (p95) *and* more accurate. It's coming to @vercel AI Gateway and likely new default.

Pranit
Pranit
Vercel
@fazxes

We benchmarked fx auto mode (safety) classifier with @typesafeai's Jev. tl;dr: ~5-18x faster and more accurate than 𝚐𝚙𝚝-𝟻.𝟼-𝚕𝚞𝚗𝚊, our current top choice

Image
Reply

Jev lands on OpenRouter