judge_rails
Ruby gem that stores Jev Noul, Choice and Score answers about a record's text as ordinary ActiveRecord columns you can query.
Overview
judge_rails turns semantic judgments into ordinary ActiveRecord attributes. You declare a source (for example a ticket's subject and body) and judged attributes such as urgency as a Noul, intent as a Choice among billing, technical and sales, and frustration as a Score. Each answer is stored in a normal column with a jsonb provenance sidecar, so it is indexable, sortable and paginable, and a background job recomputes it when the source text changes. Generated scopes such as urgency_above(0.8) and intent_is('billing') make queries cost nothing at read time; three judgments cost one API call per record.
It is also a plain Ruby client with no Rails dependency, using only the standard library, and talks to TypeSafe Jev by default with a seam for other providers. Generators set up attributes and migrations. Because Jev access is via an early-access waitlist, a demo app ships with 250 pre-judged support tickets that need no key. The README flags a json gem compatibility issue on activesupport 8.1.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Yes / no | Does this need a human within the hour? | — |
| Choice | What is this about? | billing · technical · sales |
| Score | How frustrated is the customer? | Calm · Frustrated · Very angry |
How it works
- Declare judge_source and judge_attribute on a model
- Generate and run migrations
- On save or change, a job asks Jev all questions in one call
- Answers and provenance are stored in columns
- Query with generated scopes at no API cost
Strengths
- Judgments become indexable, queryable columns
- Automatic recompute when source text changes
- Demo works without a key
- Pure-Ruby client usable outside Rails
Caveats
- Jev access requires an early-access key
- json gem pin needed on activesupport 8.1
- Stored judgments can go stale if recompute is disabled
Getting started
Add gem "judge_rails", run bin/rails generate judge:install and judge:attribute, migrate, and set JEV_API_KEY.At a glance
- Type
- Library
- Status
- beta
- Language
- Ruby
- Runtime
- Rails gem / plain Ruby
- Has code
- yes
Use cases and integrations
How curated lists describe it
Ruby gem where Jev answers Noul, Choice, and Score questions about a record's text and each answer is stored in an ordinary ActiveRecord column with a jsonb provenance sidecar; code owns the thresholds, the SQL scopes such as `urgency_above(0.8)`, and a background recompute when the source text changes.
cobanov/awesome-jev
Frequently asked questions
Do queries call the API?
No. Judgments are stored in columns; only writes and recomputes call Jev.
Can I try it without a key?
Yes, the demo app seeds 250 already-judged tickets.
Do I need Rails?
No, it also works as a plain Ruby client.
Related projects
Local service to define, test and publish versioned Jev judgment functions, callable over HTTP by backends and over MCP by agents.
MCP serverbetaTypeScriptUnofficial Go client for TypeSafe System One with generics that bind each choice, score and noul answer to a declared Go type.
ProjectbetaGoPython dialect that adds a '~' operator and jev/case blocks so a branch can ask Jev a yes/no, scale or choice question.
ProjectprototypePythonProvider-independent .NET decision engine with a separate TypeSafe Jev provider package mapping Choice, Score and Noul to /v1/systemone.
LibrarybetaC#Elixir/OTP library treating Jev as a peer process whose answers arrive as messages you pattern match in GenServer clauses.
LibrarybetaElixirRuby gem for the Jev API with ask (Noul), choose (Choice) and score (Score) builders and a uniform result accessor.
LibrarybetaRuby