Skip to content

Experiment menu: Jev (typed decision model) to replace LLM-as-classifier lanes #14835

Open

Description

@Git-on-my-level

What Jev is

Jev (TypeSafe AI, launched 2026-09-15) is a decision model, not a chat model: shared state in → typed answers out — Boolean probability (noul), Choice over ≤255 options, Score on an ordered rubric (2–10 rungs) — all questions answered in one parallel call. No text generation, schema-conformant output, probabilities attached to every answer. $0.042/1M input tokens, output unmetered, ZDR + no-training claimed on all routes, 64k-token state context, ~1,200 req/min.

Verified access reality (probed live 2026-09-19):

  • Vercel AI Gateway hosts it but exposes NO HTTP route for it — POST /v1/evaluate → 404; POST /v1/chat/completions with the model → 400 Model 'typesafe-ai/jev' is an evaluation model, not a language model. Use the evaluation generation API instead. Per docs, evaluation is AI SDK 7+ (JS) only (experimental_evaluate).
  • Python/shell path is TypeSafe direct:
curl https://api.typesafe.ai/v1/systemone -H "Authorization: Bearer $TYPESAFE_KEY" -d '{
  "state": "The API returned 429 twice, backoff elapsed.",
  "model": "jev-latest",
  "questions": {
    "should_retry": {"type": "noul", "instructions": "Should the workflow retry now?"},
    "action":      {"type": "choice", "instructions": "Next step?", "criteria": {"retry": "...", "ask_user": "...", "stop": "..."}},
    "risk":        {"type": "score", "instructions": "Risk of retrying?", "criteria": ["low", "medium", "high"]}
  }
}'
# answers: {"should_retry": {"type":"noul","noul":0.92}, "action": {"choice":"retry","probabilities":{...},"confidence":0.82}, "risk": {"score":0.4,"probabilities":{...}}}
  • Escape hatch if we like the primitive but not the vendor: AI SDK's adapters serve the same evaluate API from OpenAI/Anthropic/Google models via structured output (uncalibrated probabilities) — the contract is portable; we could implement it behind our own llm_gateway.

Ground rules for every experiment

  1. Shadow-mode first — log Jev's answers beside the current LLM call, never act on them; measure agreement vs current labels before any cutover.
  2. Confidence-threshold gate with LLM fallback — act on Jev only when probability/confidence clears a calibrated threshold; low confidence falls through to the existing path.
  3. Privacy review before any user-content lane — state would flow to a new hosted third party (ZDR/no-training claimed, still needs review). Internal-only lanes (gateway routing, ops) can pilot sooner.
  4. Known caveat: vendor's own benchmark shows ~68% workflow accuracy; calibration is group-level; "cannot hallucinate" means schema conformance only — it can be confidently wrong.

Things to try (ranked)

1. Memory ingestion save/discard + importance + category — backend/utils/memory_ingestion/pipeline.py, backend/utils/memory/
Our highest-volume LLM-as-classifier. One Jev pass per segment: noul(should_save) + score(importance) + choice(category); memory prose stays with the writer LLM. Potential 80–95% token reduction on the lane. Highest risk: a wrong discard silently loses user memories → strict threshold + audit log.

2. LLM gateway lane routing — backend/llm_gateway/gateway/resolver.py
choice(lane/model) + noul(needs_frontier) + score(complexity) per request. Internal-only state, no user PII, recoverable misroutes → lowest-risk pilot. Vendor's canonical use case; compounds across every downstream lane.

3. Proactive notification / advice gating — backend/database/advice.py, app-integrations notification paths
noul(should_interrupt) + score(urgency) + choice(notification_type) per event. A calibrated threshold replaces prompt-edit tuning of interrupt aggressiveness; false-positive interrupts damage trust, so tune on real data before auto-send.

4. Pusher finalization gating — backend/pusher/main.py
noul(segment_worth_processing) per conversation chunk before generation calls; skip no-op segments entirely. Cuts latency + spend on the hot path, but this is the highest blast-radius discard in the system — full shadow comparison before cutover.

5. Support triage
choice(category) + score(urgency) + noul(needs_human) over ticket state — the vendor's own demo case. Start suggest-only beside human triage.

6. Web-search trigger pre-gate — omi:auto:web-search lane
noul(needs_web_search) before the paid Perplexity hop (skip chit-chat), optional score(relevance) filter on results. Wrongly-skipped searches degrade answers subtly → shadow-compare triggers first.

Measurement (any experiment that wants to graduate)

Agreement rate vs current LLM labels, p50/p95 latency, $/1k decisions, and a hand-audit of disagreements (Jev-wrong vs LLM-wrong vs both-wrong). Adopt only if Jev-wrong cases are within the lane's error budget after threshold tuning.

Activity

  1. Git-on-my-level commented on Sep 19, 2026

    @Git-on-my-level
    MemberAuthor

    Correction to this issue's access notes (verified live 2026-09-19): the Vercel AI Gateway does expose an HTTP route for evaluation models — it is just undocumented and not reachable via /v1/*. Verified working from plain curl/Python:

    POST https://ai-gateway.vercel.sh/v4/ai/evaluation-model
    Authorization: Bearer $VERCEL_AI_GATEWAY_KEY
    ai-gateway-protocol-version: 0.0.1
    ai-gateway-auth-method: api-key
    ai-evaluation-model-specification-version: 4
    ai-model-id: typesafe-ai/jev
    {"state": "...", "questions": {"q": {"type": "boolean"|"choice"|"score", ...}}}
    

    → 200 with answers (boolean→probability, choice→choice+probabilities, score→score+probabilities), usage.inputTokens, and providerMetadata.typesafe.confidence. Extracted from the @ai-sdk/gateway client source (baseURL …/v4/ai + gateway-evaluation-model.ts), then live-verified: a retry-decision ask returned should_retry p=0.92, choice=retry 0.99, score 0.02, 416 input tokens, cost $0.

    Practical consequences:

    • The "no Python/shell path" statement above is superseded — TypeSafe-direct is now just one of two working paths, and a Python client needs no second key.
    • Caveats: the route is undocumented and the protocol headers (…/v4/ai, spec version 4, protocol version 0.0.1) may change under us — a thin client should pin them and fail loudly. Free-tier accounts hit per-minute rate limits (~429s observed after ~5 rapid calls) — paid credits remove this. Ground rules (shadow-mode first, confidence gates, privacy review for user-content lanes) are unchanged.
  2. Git-on-my-level commented on Sep 20, 2026

    @Git-on-my-level
    MemberAuthor

    Fleet shadow (Hermes Multica watchers, not Omi product lanes) extended 2026-09-20.

    Observer-only Jev is now on m4-air, m4-mini, and m5-mbp (m5 watcher still paused). Record: https://github.com/Git-on-my-level/jevkit/blob/main/pilot/EXPERIMENT.md

    Still shadow-only. Omi classifier lanes in this issue are unchanged.

  3. IRONICBo commented on Sep 20, 2026

    @IRONICBo

    One measurement I would add before graduating any of these lanes: separate decision quality from downstream outcome. A Jev choice can be sensible while the real operation still fails because the available target changed or execution produced only partial evidence.

    For each shadow row, I would retain the observed candidate IDs, Jev choice and distribution, policy accept/abstain decision, and the actual executor result. If the choices are dynamic, rebuild them immediately before evaluation and reject a returned ID that is no longer present. Also report Jev latency separately from end-to-end lane latency; otherwise a fast classifier can hide a slow or failed operation.

    We use that boundary in Jev Social: fresh candidate construction, execute then observe, and separate timing/outcome fields. I maintain that project; sharing the implementation pattern, not a benchmark claim.

  4. added
    intelligence
    p3
    and removed
    intelligence
    p3
    on Oct 6, 2026
  5. ramarlina commented on Oct 23, 2026

    @ramarlina

    I would start with memory save/discard, because a false discard is the one error you cannot undo later. That argues for shadow mode with a deliberately conservative threshold: log what the decision model would have dropped, compare it against the current LLM lane on fixed labeled cases, and only look at agreement on the easy majority after the disagreement cases make sense.

    I work on a small typed decision model aimed at exactly these bounded calls. If an additional arm in this experiment menu would be useful, I can help prepare the comparison on the same labeled set, including the false-discard rate broken out separately from overall accuracy. No behaviour change proposed, just the measurement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    intelligencep3

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions