Skip to content

Ruby LLM Providers TypeSafe

RubyLLM provider that turns typed questions — noul, choice and score — into calibrated answers with probabilities, confidence and per-call cost, and adds reranking through RubyLLM.rerank.

Stars
4
Language
Ruby
License
MIT
Published by
Community
Author
javiergradiche
Last verified
Oct 2026

About this project

TypeSafe for RubyLLM. TypeSafe's System One models, starting with Jev, answer typed questions about your data with calibrated probabilities instead of generated text. Outside Bundler, load it with require 'rubyllm/providers/typesafe'. Ask questions about a state, and get one typed answer per question: noul asks a yes/no question. Its answer is the probability of yes. Pass yes: and no: to describe what each answer means.

Quoted from the project's README. Read the full README.

Highlights

  • One evaluate call asks every question against the same state in parallel and returns probability, option, score, level, model and cost.
  • State can be a String, Hash or Array; questions address parts with backticked paths such as `ticket.messages[0].text`.
  • yes? compares the probability to 0.5 by default, takes yes?(threshold: 0.8), and confidence is there to send uncertain ones to a person.
  • Rerank puts every document's relevance question into one request, but the query and all documents share a 32k-token state budget.

Watch out

Evaluations default to jev-latest, an alias, so pin a versioned id such as jev-1.13.0 once your thresholds are tuned or a model change will move them underneath you. Reranking is not for whole corpora: the query and every document share Jev's 32k-token state budget, so shortlist from a faster search first. A score can land between levels, so treating it as a rubric boundary is your problem to handle. Outside Bundler you must require the provider yourself. The first local test run calls the real API to record VCR cassettes, and CI only replays cassettes already committed. Copy reviewed against the repository README on 2026-10-04, not from running it.

Questions about this entry

Short answers drawn from the linked project or page.

More Jev resources like this

16GitHub stars
Vendor-neutral harness that tests whether Jev reranking improves a small RAG stack, using frozen hybrid BM25 plus BGE-M3 candidates and isolating retrieval, rerank, and generation stages.
Jev Practices & Patterns#community#jevbest#catalog-import
2GitHub stars
An MCP server with two tools for agent memory: record writes facts into a per-project ledger as they happen, and recall scores each one against the task you are starting and hands back only what matters.
Jev Practices & Patterns#community#awesomejev#catalog-import
1GitHub stars
Runnable benchmark putting Jev, jev-preview and Claude Sonnet 5 through one real agent task — classifying a tool call as readonly, destructive, privileged or exfiltration — on the same 60 labelled cases, with raw per-call results committed.
Jev Practices & Patterns#community#awesomejev#catalog-import
1GitHub stars
An independent benchmark asking whether Jev can replace an LLM reranker, run over natural-language search across all 6,245 YC companies, plus the live search app it measures: Jev routes the query, BM25 and embeddings retrieve, Jev reranks.
Jev Practices & Patterns#community#awesomejev#catalog-import
1GitHub stars
Benchmark of Jev as a production reranker against Qwen3-Reranker-0.6B on BEIR SciFact and NFCorpus. Ranking quality is a wash, Jev runs about twice as fast with a much tighter tail, and the cross-encoder costs roughly a quarter as much. Every raw API response is committed, so the numbers recompute without an API key.
Jev Practices & Patterns#community#awesomejev#catalog-import
22GitHub stars
Local decision models that return Jev-shaped typed distributions instead of generated text: freeze a backbone, cache candidate features once, train a roughly 0.8M-parameter decision head, calibrate per primitive.
Jev Practices & Patterns#community#awesomejev#catalog-import

From the Jev guides

Original write-ups on what this entry is for.

Most Jev accuracy problems are state problems. What belongs in a state, what is a pre-made judgment to leave out, and why naming the slice you ask about matters more than the wording.
Jev Practices & Patterns#state#design#primitives
Read article
A Noul returns one number and no separate confidence. How to read the value, pin its boundary with criteria, split compound questions, and set a per-action threshold that matches the cost of being wrong.
Jev Practices & Patterns#noul#primitives#confidence
Read article
A Score is a weighted position, not a ruler. Why the number can land between levels, why levels are judged separately, and how to combine several atomic scores in code instead of one crowded rubric.
Jev Practices & Patterns#score#primitives#scoring
Read article
Back to all resources

From the Jev community

Posts from builders shipping with Jev right now.

Follow @typesafeai