Jevalyn
Rails-native gem that defines Jev decisions as classes with typed results, confidence thresholds, guardrails, a router and test helpers.
Overview
Jevalyn is a decision layer for Ruby on Rails apps built on TypeSafe's Jev. You declare a decision as a class, for example a support triage decision with a department Choice over billing, technical and sales and a confidence threshold of 0.75, then call evaluate on some text and read typed results such as the chosen department and whether the result is certain. The author describes it as a routing decision made by a model inside a Rails request in about as long as a database query, not a prompt, parsed JSON or a retry loop.
The README is explicit that Jev does not generate text: no summaries, drafts or tool calls. Jevalyn supports the three question types (Noul, Choice up to 255 options, Score with 2 to 10 levels), and adds guardrails, a router that can send requests needing prose to an LLM, and testing helpers. It is published on RubyGems with CI and an MIT licence.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Choice | Which team should handle this? | billing · technical · sales |
| Other | Guardrail and routing decisions defined as Jevalyn::Decision classes | — |
How it works
- Define a Jevalyn::Decision class with questions and thresholds
- Call evaluate with text in a Rails request
- Read typed results and certain? flag
- Use guardrails or the router to fall back or hand off to an LLM
Strengths
- Idiomatic Rails API with typed results
- Built-in confidence thresholds
- Router to LLMs when prose is needed
- Test helpers and CI
Caveats
- Requires a TypeSafe key
- Rails-specific
Getting started
Add the jevalyn gem from RubyGems and define a Jevalyn::Decision subclass.At a glance
- Type
- Library
- Status
- beta
- Language
- Ruby
- Runtime
- Rails
- Has code
- yes
- Has tests
- yes
- License
- MIT
Use cases and integrations
How curated lists describe it
The decision layer for your Rails app. A Rails-native wrapper around TypeSafe's Jev System One API: typed, calibrated decisions in your control flow.
logicrw/awesome-jev-projectsThe decision layer for your Rails app.
wh000wh000/awesome-jev-liveThe decision layer for your Rails app. A Rails-native wrapper around TypeSafe's Jev System One API: typed, calibrated decisions in your control flow.
hellogumbo/awesome-jevRails-native decision layer with typed results, guardrails, a router and test helpers.
MrJev/awesome-jev
Frequently asked questions
How do I define a decision?
Subclass Jevalyn::Decision and declare questions with types, instructions, criteria and a confidence threshold.
Can it generate text?
No; Jev does not generate text, but the router can hand prose tasks to an LLM.
Where is it published?
On RubyGems.
Related projects
Spring Boot 4 starter that injects a JevClient for asking Noul, Choice and Score questions from Spring MVC apps.
LibraryprototypeJavaAx, a DSPy-style multi-language LLM framework, listed with a native TypeSafe provider for Boolean, Choice, Score and raw Jev questions.
PluginproductionTypeScriptEffect TypeScript library whose @effect/ai-typesafe package maps classify, probability and rating operations to Jev questions.
ProjectproductionTypeScriptPHP monorepo whose Polyglot module adds a TypeSafe driver for typed Noul, Choice and Score decisions alongside LLM inference.
ProjectproductionPHPElixir library for unified LLM calls across providers, with an evaluate interface that calls Jev via TypeSafe or OpenRouter.
ProjectproductionElixirSelf-hosted multi-tenant AI agent platform listed as including optional TypeSafe client tools for classification, scoring and yes/no.
LibraryproductionPython