Jev knowledge base·verified Sep 22, 2026

jev for search reranking

Rerank a retrieved shortlist with Jev semantic judgments, while measuring top-k quality, latency and cost against BM25 and vectors.

the short answer

Use ordinary retrieval to produce a small candidate set, then ask Jev to judge query-to-candidate relevance with a consistent Choice, Score or Noul design. Do not apply Jev blindly to an entire corpus. Measure top-k relevance, ordering errors, latency and cost against BM25 or vector retrieval; a public field report found one Jev reranking setup did not improve its vector baseline.

Semantic decision
Estimate semantic relevance between a query and each retrieved candidate.
Likely primitive
Comparable Scores or Nouls per candidate, or Choice within a carefully bounded shortlist.
Relevant state
the query, one candidate or bounded shortlist and fields needed to judge relevance.
Keep deterministic
Code performs first-stage retrieval, access control, batching, stable sorting and metric calculation.

The Useful Jev Decision

Estimate semantic relevance between a query and each retrieved candidate. Jev should receive only the state needed for that judgment: the query, one candidate or bounded shortlist and fields needed to judge relevance. The application defines the possible answers before inference and consumes the typed result; Jev does not own the surrounding workflow.

A legal search system can rerank a BM25 shortlist and evaluate top-1 and top-10 relevance on held-out queries. This is a design pattern, not evidence that every implementation will perform well. Test the exact state, question, model version and action against representative outcomes.

Architecture: Evidence in, Judgment Out, Action in Code

The source record and projected state are not interchangeable. If decisive evidence never enters state, the model cannot recover it; if irrelevant or adversarial text is copied wholesale, it can move the result. Give the projection its own version and test it with the question. The state-design guide shows how to separate trusted fields, untrusted content and derived values.

01Source evidencethe query, one candidate or bounded shortlist and fields needed to judge relevance.
02Deterministic preparationValidate fields, remove irrelevant context and construct only permitted candidates.
03Jev judgmentEstimate semantic relevance between a query and each retrieved candidate. Use Comparable Scores or Nouls per candidate, or Choice within a carefully bounded shortlist.
04Application decisionCode performs first-stage retrieval, access control, batching, stable sorting and metric calculation.
05Observed outcomeRecord what happened after the action so the configured evaluator can be measured.
A jev for search reranking system should expose each boundary instead of treating Jev as the whole application.

What Remains in Code

Code performs first-stage retrieval, access control, batching, stable sorting and metric calculation. Exact checks should run before the model when they can narrow or reject candidates. After Jev returns, code applies thresholds, permissions, fallbacks and the final action. Store the raw distribution rather than only the selected label so later evaluation can distinguish a close decision from a concentrated one.

Version the Complete Decision Instrument

A final label alone is not enough to investigate a regression. The same label can come from a clear distribution or a near-tie, and it may have been produced by a different candidate set or projection. Keep the record append-only so a later threshold change can be replayed without rewriting history. The evaluator scorecard defines validity, robustness, calibration and utility checks for this complete instrument.

ComponentWhat to record
Evidence unitThe source record and projection used for: the query, one candidate or bounded shortlist and fields needed to judge relevance.
Question contractEstimate semantic relevance between a query and each retrieved candidate.
Primitive and criteriaComparable Scores or Nouls per candidate, or Choice within a carefully bounded shortlist.
Inference identityRequested model, resolved model, provider, timestamp and request ID
Raw resultSelected answer, complete distribution, confidence where defined, latency and failure state
Application outcomeThreshold branch, review or fallback, final action and later ground truth

How to Evaluate This Use Case

  1. Collect representative examples and define the observable outcome before tuning the question.
  2. Split broad quality into independently useful Choice, Score or Noul judgments.
  3. Pin the Jev model, question, criteria and state projection.
  4. Measure class-level errors, calibration, coverage, latency and cost against the simplest baseline.
  5. Add review or fallback behavior, then monitor drift and real downstream outcomes.

Run a Decision-Level Baseline Experiment

Compare the Jev design with the simplest credible existing method: deterministic rules, a keyword or embedding classifier, the current LLM prompt, or human-only handling. Hold the evidence unit and outcome definition constant, but allow each method to use its native interface. Include invalid responses, timeouts, retries and review work in the result instead of scoring only successful model calls.

The primary metric should reflect the cost of getting “Estimate semantic relevance between a query and each retrieved candidate.” wrong. Report class or rubric errors by important slice, calibration where the output supports it, automation coverage at the proposed threshold, p50/p95 latency and total workflow cost. Use grouped or time-based splits when related records could leak across train and test. The benchmark methodology gives a reproducible protocol.

Main Failure Mode

Question formulation, batching and candidate-set construction can change ordering, and added inference may fail to beat a strong baseline. Jev 1.13 can also read instructions literally, lose accuracy in irrelevant long state and be steered by adversarial content. Keep state narrow, define boundary cases and never treat model confidence as authorization.

FAQ

Is Jev a good fit for search reranking?

Use ordinary retrieval to produce a small candidate set, then ask Jev to judge query-to-candidate relevance with a consistent Choice, Score or Noul design. Do not apply Jev blindly to an entire corpus. Measure top-k relevance, ordering errors, latency and cost against BM25 or vector retrieval; a public field report found one Jev reranking setup did not improve its vector baseline.

Which Jev primitive should I start with?

Comparable Scores or Nouls per candidate, or Choice within a carefully bounded shortlist. Start from what the answer means: Choice for one option, Score for ordered levels and Noul for one independent yes/no condition.

What should not be sent to Jev?

Do not send fields irrelevant to the decision. Code performs first-stage retrieval, access control, batching, stable sorting and metric calculation. Keep secrets and regulated data within the deployment's approved data-handling design.

How do I know whether the integration works?

Compare it with a deterministic or existing baseline on held-out outcomes. Report errors and coverage at the operating threshold, not only average accuracy or a demo result.

Sources

Checked against the sources below on September 22, 2026. Model versions, prices and limits change.

  1. TypeSafe AI docs: Example use cases
  2. TypeSafe AI docs: How to build with System One
  3. TypeSafe AI docs: Primitives
  4. TypeSafe AI docs: Confidence
  5. TypeSafe AI docs: Jev 1.13 jaggedness
  6. Community index: awesome-jev