Jev in production › Search, ranking and matching
This Rails search library asks Jev typed yes/no, choice and score questions at index and query time to rank and rerank records (Truffler).
Intent search for Rails apps, built on your own database and TypeSafe Jev.
When a record is saved, Truffler asks Jev the typed questions you declared about it (yes/no "nouls", choices, and scores) and stores each answer as a number in trufflerlabels. Taken together, a record's answers form a named-dimension embedding: one float per label, and one per option for choice labels. Optional text embeddings sit beside them. A search query is encoded the same way: for each label, Jev decides whether the query filters on it, prefers it, or ignores it. Keystroke search then ranks records in one SQL query that adds up a weighted dot product over the label dimensions, text similarity, keyword hits, and exact-source hits:
For the project's own README, linking back here: