Jev directory
CommunityJev Integrations & Adapters
Truffler
Truffler is a Ruby gem that labels Rails records with TypeSafe Jev when saved, stores answers as numbers, and turns search queries into label filters and boosts. It returns plain Ruby data and ships no UI components.
- Reading time
- 2 min
- Published by
- Community
- Added
- Nov 23, 2026
Highlights
- Labels records with TypeSafe Jev when saved, storing each answer as a number in truffler_labels.
- Encodes search queries the same way, ranking records in one SQL query with a weighted dot product.
- Requires Ruby 3.2+, Rails 7.2 or 8.x, a job backend, and a cache store supporting increment.
- Smart search reranks top candidates in chunks, streaming into Strong, Possible, and Unlikely buckets.
- Ships no UI components; returns plain Ruby data for your controllers and views.
Questions about this entry
Short answers drawn from the linked project or page.
Add gem "truffler" and gem "ruby_llm-typesafe" to your Gemfile, then run bin/rails generate truffler:install and bin/rails db:migrate. The generator writes a migration, an initializer, and a channel file.
Truffler requires Ruby 3.2+, Rails (Active Record, Active Job, Active Support) 7.2 or 8.x, a job backend, and a cache store shared by web and job processes that supports increment, such as Solid Cache, Redis, or Memcached.
When a record is saved, Truffler asks Jev the typed questions you declared about it, such as yes/no, choice, and score labels. It digests user keys and query misses with secret_key_base. The default Jev client is ruby_llm-typesafe.
No. Truffler ships no UI components. It returns plain Ruby data, which your controllers pass to your own views. The docs/host-integration.md file maps every field to the UI state it drives.
A search query is encoded the same way as records. Keystroke search ranks records in one SQL query that adds a weighted dot product over label dimensions, text similarity, keyword hits, and exact-source hits. Smart search reranks top candidates in chunks on explicit action.
Truffler requires a cache store that supports increment and a job backend. Without the truffler_backfill_spends migration, backfills log a warning and cap spend per run. Without the tenant_key column, every tenant shares the model's app-wide ledger.
Avoid Truffler if you are not on Rails 7.2 or 8.x, lack a job backend, or do not have a cache store supporting increment. It also may not fit if you need built-in UI components, since it returns only plain Ruby data.
Reactions & coverage
Posts, threads, and videos about this entry from around the web.
X: LinkedIn bookmarks search
X: 1,066 reaction videos, searchable
X: Intent-based search in a Chrome extension
X: Margin, bookmark search
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.