Skip to content

Docs

Cookbook: Self-Consistency for Choices

A repeatability study: an 8-question moderation rubric run 15 times per condition shows a mean probability standard deviation of 0.0098, and a 0.60 uncertainty gate lifts agreement to 99.2%.
Format
Docs
Reading time
3 min
Published by
TypeSafe AI
Last verified
Sep 2026

Highlights

  • 15 repeats across 9 conditions over 8 Choice questions, with jev-1.13.0 returning in 114 ms at $0.000046 per call.
  • TypeSafe's mean probability standard deviation was 0.0098 versus 0.0245 to 0.0543 for five LLM distributions.
  • With top probability below 0.60 routed to uncertain, policy agreement reached 99.2% while 74.2% of labels stayed automatic.
  • TypeSafe still flipped its top label on primary_risk and link_handling across its own repeats.

Quickstart

python
MIN_CHOICE_PROBABILITY = 0.60  # top label below this -> "uncertain", human review

questions = {key: Choice(instructions=instructions, criteria=choices)
             for key, (instructions, choices) in QUESTIONS.items()}  # 8-question rubric
response = typesafe_client.system_one(
    model="jev-latest",
    state={"uid": f"{RUBRIC_HASH}:{sample_index}:{token_hex(4)}", "post": POST},
    questions=questions,
)
for key in QUESTIONS:  # repeated 15x; did the label hold still?
    probs = response.answers[key].probabilities
    top = max(probs.values())
    selected = max(probs, key=probs.get) if top >= MIN_CHOICE_PROBABILITY else "uncertain"

Watch out

These are repeatability numbers, not accuracy numbers, and a deterministic temperature-0 baseline can score 100% agreement by never abstaining.

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.

YouTube: Building a contextual brand-safety scorer on Jev from scratch.

X: A website slop detector that checks 35 tells in 243 ms

X: Breaking, golden nugget, or slop

X: A filter for reply-guy comments

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