Skip to content

jevish

Tiny JavaScript semantic matcher that classifies text locally in microseconds and escalates ambiguous cases to Jev.

ProjectbetaMIT

Overview

jevish is an npm package for semantic pattern matching and zero-shot labelling in JavaScript. You pass a string and either a map of label patterns to handlers, an array of labels, or a single predicate, and it returns the winning label, a boolean, or calls the matching handler. Patterns can carry thresholds, such as only filing a bug when confidence is above 0.8.

The default engine is deliberately simple and dependency-free: tokenisation, stemming, n-grams and synonym clusters, about 8.6 kB. It commits only when the top score and its margin are both high. With the cascade option, uncertain or out-of-vocabulary inputs are escalated to the hosted Jev model. It suits developers who want a cheap first-pass router for tickets, spam or intents in Node, edge workers or the browser, with Jev as the fallback. The README publishes a small benchmark (100 items per task) comparing the local engine, the cascade and Jev.

What the decision model decides

TypeQuestionAnswers
ChoiceWhich of these labels does the text belong to? (e.g. bug, feature, billing)bug · feature · billing
Yes / noIs this text an instance of the given label (e.g. spam)?—

How it works

  1. Call jevish(text, labels or handler map)
  2. Local engine scores labels from token, n-gram and synonym-cluster overlap
  3. If score and margin clear the thresholds, return the label or run the handler
  4. With cascade enabled, ambiguous inputs are sent to Jev for a calibrated answer
  5. Optional fallback handler catches anything unmatched

Strengths

  • Local path runs in well under a millisecond with zero dependencies
  • Cascade sends only hard cases to the paid API
  • Custom synonym clusters add domain vocabulary without retraining
  • Runs in Node, Bun, Deno, Workers and browsers

Caveats

  • The local engine is lexical, not a neural model, so accuracy depends on vocabulary
  • Benchmark sample sizes are small (100 per task)
  • Cascade requires network access and a TypeSafe key

Getting started

npm install jevish

At a glance

Type
Project
Status
beta
Language
JavaScript
Runtime
Node, Bun, Deno, Cloudflare Workers, browser
Has code
yes
License
MIT

Use cases and integrations

How curated lists describe it

Frequently asked questions

Is jevish a model?

No. It is a lexical matcher that mimics Jev's interface for easy cases and can hand hard cases to the real Jev API.

How fast is it?

The README reports under 0.05 ms per call for the local engine; cascaded calls take the network round trip.

Do I need a TypeSafe key?

Only if you enable the cascade to cloud Jev; the local engine makes no network calls.

Related projects

  • Pre-flight hook for WorkBuddy and Hermes Agent where Jev classifies each prompt on nine dimensions and injects routing cues.

    ProjectbetaPython
  • Transparent proxy that asks Jev to classify each coding-agent prompt and injects the decision into the agent's context before it generates.

    ProxybetaPython
  • OpenClaw plugin where Jev decides whether a group-chat bot should reply and, optionally, which model tier should answer.

    PluginbetaTypeScript
  • DeepSeek Harness plugin registering a jev_decide tool so the agent can ask Noul, Choice or Score questions and gate on probabilities.

    PluginbetaTypeScript
  • DeepSeek Harness Web GUI plugin giving the agent a jev_ask tool, usage tracking and an optional command guard with explicit caveats.

    PluginbetaTypeScript
  • Browser tool that finds bounded decisions in LLM prompts and proposes Jev Choice, Score and Noul questions with SDK code.

    ProjectbetaJavaScript