1. Data source
  2. Decision schema
  3. Model inference
  4. Structured result
2 Decision schema 3 typed questions
  • next_actionchoicegenerateretrieve_morediscardreview
  • relevancescorelowmediumhigh
  • evidence_enoughnoulprobability 0–1

3 Model inference typesafe/jev-1.13

Waiting for a run.

4 Structured result

Run the demo to see the JSON answers, the highlighted pick and the final action.

Call Jev yourselfSame data and schema, straight to Flatkey. Set FLATKEY_API_KEY and run.
curl -sS https://router.flatkey.ai/api/alpha/decisions \
  -H "Authorization: Bearer $FLATKEY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "typesafe/jev-1.13",
  "state": "Question: What is our refund window for annual Business plans purchased in the EU?\n\nRetrieved chunk (#3, score 0.71):\n\"Our Help Center notes that monthly Starter plans can cancel anytime. Shipping SLAs for hardware accessories are 5–7 business days in North America. A 2023 blog post mentions a winter promo that extended trials to 30 days.\"\n\nAlready kept: none.\nTask: next_action (generate / retrieve_more / discard / review), relevance, evidence_enough.",
  "questions": {
    "next_action": {
      "type": "choice",
      "instructions": "Given the user question and this retrieved chunk (plus any already-kept evidence), what should the RAG pipeline do next? Prefer the cheapest safe path.",
      "criteria": {
        "generate": "The kept evidence is on-topic and sufficient to answer without guessing; proceed to the generator",
        "retrieve_more": "The chunk is partly useful but evidence is still thin, incomplete, or missing a key fact—fetch more before answering",
        "discard": "This chunk is off-topic, outdated, or contradictory noise; drop it and do not put it in context",
        "review": "Relevance or conflict is ambiguous enough that a human or stronger judge should decide before generation"
      }
    },
    "relevance": {
      "type": "score",
      "instructions": "How relevant is this retrieved chunk to answering the user question, ignoring how well-written it is.",
      "criteria": [
        "low",
        "medium",
        "high"
      ]
    },
    "evidence_enough": {
      "type": "noul",
      "instructions": "Together with already-kept evidence, there is enough specific support to answer the question without inventing missing facts."
    }
  }
}'

No Flatkey key yet? Get one for Jev 1.13 →

Run with real Jev

Sign in and connect a key

  1. Sign in with Google.
  2. Connect your Flatkey or OpenRouter key on the next screen. Get a Flatkey key for Jev 1.13.
  3. Come straight back here and press Run again.

This site is for researching, sharing and cataloguing Jev use cases. Your key is only there to make trying Jev convenient: it is stored encrypted, used only for runs you trigger, never used for anything else, and you can delete it anytime.

About this use case

Use Jev as RAG gates after retrieval: incoming state, Jev decision, routed outcome

Who / when

Audience

  • RAG builders who want a cheap relevance and sufficiency gate between retrieval and generation
  • search and support teams tired of answers that cite off-topic chunks
  • evals engineers calibrating retrieve-more loops without another full chat model call

Triggers

  • the generator invents answers from weakly related or conflicting chunks
  • you need a typed keep / drop / retrieve-more decision per chunk at high QPS
  • keyword or embedding scores alone still pass noisy neighbors into context
  • you want calibrated thresholds before paying for a long generation call

The workflow

  1. 01
    Query + chunkUser question and one retrieved passageInput
  2. 02
    Next actiongenerate / retrieve_more / discard / reviewJev
  3. 03
    Relevance + enough?Score relevance, Noul sufficiencyJev
  4. 04
    Code gateKeep, fetch more, or block generateYour code

Question shape

{
  "next_action": {
    "type": "choice",
    "instructions": "Given the user question and this retrieved chunk (plus any already-kept evidence), what should the RAG pipeline do next? Prefer the cheapest safe path.",
    "criteria": {
      "generate": "The kept evidence is on-topic and sufficient to answer without guessing; proceed to the generator",
      "retrieve_more": "The chunk is partly useful but evidence is still thin, incomplete, or missing a key fact—fetch more before answering",
      "discard": "This chunk is off-topic, outdated, or contradictory noise; drop it and do not put it in context",
      "review": "Relevance or conflict is ambiguous enough that a human or stronger judge should decide before generation"
    }
  },
  "relevance": {
    "type": "score",
    "instructions": "How relevant is this retrieved chunk to answering the user question, ignoring how well-written it is.",
    "criteria": [
      "low",
      "medium",
      "high"
    ]
  },
  "evidence_enough": {
    "type": "noul",
    "instructions": "Together with already-kept evidence, there is enough specific support to answer the question without inventing missing facts."
  }
}

Gate policy

≥ 0.90

Honor next_action: generate only when relevance is high and evidence_enough is true; otherwise retrieve_more or discard as chosen.

0.65–0.90

Prefer retrieve_more over generate; keep the chunk only if relevance is at least medium and log probabilities.

< 0.65

Discard or route to review; do not call the generator on low-confidence evidence.

Failure modes

Pre-launch checks before you trust auto-routing:

  • Passing every top-k chunk to the generator because the embedding score looked high;
  • Generating an answer when evidence_enough is false and inventing the missing policy detail;
  • Discarding a partially useful chunk without retrieving a better one, then answering from nothing;
  • Treating a conflicting or outdated passage as high relevance because it shares keywords;
  • Skipping the gate on "simple" questions and only discovering bad citations in production;
Keep exact work in code: top-k, dedupe, rerank indexes, token budgets, citation formatting and the final generate call stay deterministic. Use Jev only for the meaning-level gates—is this chunk relevant, is evidence enough, what next—then let your thresholds decide before the expensive model runs.

FAQ

How is this different from a grounding / hallucination judge?

RAG gates run after retrieval and before generation: they decide whether to keep a chunk, fetch more, or block the generate call. A grounding judge runs on a claim (or draft answer) against sources after the fact. Many stacks want both. See Grounding / hallucination judge.

Why not rely on embedding similarity alone?

Similarity ranks neighbors; it does not know whether the passage actually answers the question or whether the set is sufficient. Jev asks those atomic questions in plain English and returns calibrated probabilities you can threshold.

What does the Flatkey call look like?

POST https://router.flatkey.ai/api/alpha/decisions with Authorization: Bearer …, Content-Type: application/json, and a body of state, model (typesafe/jev-1.13), and questions (choice / score / noul). This is not an OpenAI-compatible /v1 chat endpoint.

Can I bring my own API key?

Yes. Try the free demo above without signing in. To run it live on your own text, sign in with Google and connect a Flatkey or OpenRouter key (a quick test call runs when you save it). Manage or delete it anytime under Dashboard → BYOK. Keys are stored encrypted on the server, used only for runs you trigger, and never sent back to the browser. Need a Flatkey key? Get one for Jev 1.13 on Flatkey.

Is this the official TypeSafe Jev product page?

No. jev-llm.com is an independent research and practice site. Verify pricing, models and terms at the original TypeSafe sources.

Sources

Seen on X
Independent-site note: jev-llm.com is an independent research and practice site. It is not the TypeSafe AI official site. Verify models, pricing and terms at the original source.