Skip to content

Docs

Cookbook: Parallel Questions

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.
Format
Docs
Reading time
2 min
Published by
TypeSafe AI
Last verified
Sep 2026

Highlights

  • The briefing runs 8 Noul, 2 Choice, and 3 Score questions over a pinned ~54,000-character Wikipedia GDPR revision.
  • One batched call cost $0.000497 and took 0.27s; 13 single-question calls cost $0.006090 and 2.71s — 12.2x cheaper and 10.0x faster.
  • Both strategies ran 5 repeats; most answers had std dev exactly 0.0, and the two noisy Nouls showed the same variance either way.
  • Pricing used was $0.042 per 1M input tokens and $0.00 per 1M output tokens for jev-1.12 as of 2026-09.

Quickstart

python
response = client.system_one(state={"article": DOCUMENT}, questions=QUESTIONS, model="jev-1.12")

answer = response.answers[key]
if isinstance(answer, NoulAnswer):
    values[key] = answer.noul
elif isinstance(answer, ChoiceAnswer):
    values[key] = max(answer.probabilities.values())
else:
    values[key] = answer.score / (len(QUESTIONS[key].criteria) - 1)

Watch out

The 10x speedup assumes the 13 single-question calls run sequentially; fired concurrently the latency gap shrinks, though the 13x token cost stays.

Questions about this entry

Short answers drawn from the linked project or page.

Reactions & coverage

Posts, threads, and videos about this entry from around the web.

X: 200 rows, 32 template families, and traps, judged in one call

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.

Follow @typesafeai