Jev directory
CommunityJev Demos & Experiments
Is Even AI
A parody Ruby gem that answers whether an integer is even by asking TypeSafe Jev or a frontier LLM instead of computing n % 2. It ships calibrated confidence gating, System 1 to System 2 escalation, opt-in refinements, and a CLI, with zero runtime dependencies.
- Reading time
- 2 min
- Published by
- Community
- Added
- Nov 23, 2026
Highlights
- Supports TypeSafe Jev (System One), OpenAI, Anthropic Claude, Google Gemini, and any OpenAI-compatible endpoint such as Ollama, Groq, or OpenRouter.
- Confidence gate reads even at p >= 0.7 and odd at p <= 0.3; anything between escalates to a fallback provider or an on_uncertain proc.
- Requires Ruby 3.2 or newer and has no runtime dependencies; HTTP goes through Net::HTTP.
- Reads keys from TYPESAFE_API_KEY, OPENAI_API_KEY, ANTHROPIC_API_KEY, GEMINI_API_KEY or GOOGLE_API_KEY, or IS_EVEN_AI_API_KEY.
- The README states it is a parody and educational project, and that n.even? is faster, free, offline, and correct.
Questions about this entry
Short answers drawn from the linked project or page.
Add gem "is_even_ai" to your Gemfile and run bundle install, or run gem install is_even_ai. It requires Ruby 3.2 or newer and has no runtime dependencies.
It supports TypeSafe Jev (System One), OpenAI, Anthropic Claude, Google Gemini, and any OpenAI-compatible endpoint such as Ollama, Groq, or OpenRouter. Configure one with config.provider set to :jev, :openai, :anthropic, :gemini, or :openai_compatible.
With no provider configured, it is detected from IS_EVEN_AI_PROVIDER, then from the first present of TYPESAFE_API_KEY, OPENAI_API_KEY, ANTHROPIC_API_KEY, GEMINI_API_KEY or GOOGLE_API_KEY, and IS_EVEN_AI_API_KEY.
The confidence gate treats p >= yes_threshold (0.7) as even and 0.3 or below as odd. In between, it escalates to a configured fallback_provider or an on_uncertain proc; with strict_confidence set it raises UncertainParityError instead.
It returns a result object exposing even?, probability, confidence, uncertain?, model (for example jev-1.14.0), latency_ms, and a serializable to_h hash.
Inputs must be real Integers. Non-integers raise IsEvenAI::InvalidInputError unless you pass allow_non_integer: true, and the README advises against casting strings to work around it.
It is MIT licensed. Caching is opt-in through config.cache = true, which the README recommends enabling to limit API spend.
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.