Jev retrieved passage relevance

Check whether a passage is relevant beyond shared keywords

Compare the query's subject with a candidate passage's meaning. Separate genuine topic relevance from keyword overlap in a different sense; relevant passages may still lack the facts needed to answer.

Is this passage about the requested subject?Live API
Try an example

Original input for the Relevant topic outcome. Edit the evidence to send a new request.

Source: Background discussion on X

Source and example scope

These fictional inputs and decision rules were written for this page. The linked X discussion provides background; the technical implementation follows TypeSafe's Choice contract.

Compare query subject with passage meaning.

Decision rules and labels
Relevant topicKeyword overlap onlyUnrelatedUnclear meaningNeed evidence
A real response from the Jev API

Edit any input to explore a different decision. No request is sent until you run it.

Your next decision

Not run yet

Choose an example or write your own input, then run it to see the ranked choices.

Results are not stored by this site. Your submitted text is processed by the API provider.

The decision

Relevance is an intake check, not an answer check.

A passage can discuss quote-aware CSV parsing without explaining its algorithm. It is relevant to the query but may still be insufficient for answering. The separate answer-coverage example evaluates that later question.

The bank example checks a word with two meanings. The duplicate-row example checks the opposite case: a subject connection expressed through different words. These fixtures make lexical overlap and semantic relevance distinguishable.

A relevant-topic label can help construct a shortlist. It does not verify the passage, assign a rank across all results or guarantee a grounded answer.

These fictional inputs and decision rules were written for this page. The linked X discussion provides background; the technical implementation follows TypeSafe's Choice contract.

Illustration of matching a question to supplied passages and identifying missing evidence
Illustration of the decision flow.
How it works

Try the example in four steps

Use the sample to understand the rule, then test your own input for retrieved passage relevance.

  1. Illustration of adding the text or evidence for a decision

    Add the information to check

    Compare the query's subject with a candidate passage's meaning.

  2. Illustration of defining a question and its allowed choices

    Confirm the question and labels

    Open the decision rules and keep the intended distinction between Relevant topic, Keyword overlap only, Unrelated, Unclear meaning, Need evidence. Edit the choices only when testing your own rule.

  3. Illustration of sending one input and comparing the returned choices

    Run the decision

    Use a sample first, then try your own input. Compare the selected label with the other returned probabilities.

  4. Illustration of reviewing a result and an uncertain item before using it

    Review the next step

    Review Unclear meaning, Need evidence before using a result. The label is a decision about the supplied information, not an executed action.

Our API test

Recorded API observations

Recorded API observations
Original inputObserved labelLeading probability
Relevant but incompleteRelevant topic89.0%
Same word, other senseKeyword overlap only98.0%
Another subjectUnrelated99.0%
Unresolved abbreviationKeyword overlap only72.0%
Paraphrased connectionRelevant topic100%
No passageNeed evidence100%

These are six original synthetic inputs, tested once per request revision. The percentage is the leading option probability, not measured accuracy. Authored expectations and any disagreements remain in the downloadable evidence. 5 of 6 results matched the authored fixture expectations. For Unresolved abbreviation, the expectation was Unclear meaning; the observed choice was Keyword overlap only.Verified

Understand the results

Source and example scope

Compare each saved result with its authored expectation. A disagreement remains in the fixture review; the call is not repeated to obtain a preferred label.

Using the result in your application

The single-request SDK runner uses your private TYPESAFE_API_KEY. The offline consumer reads saved observations, checks request hashes and prints a pending output. It does not call the model or change any external system.

Runnable offline example

Run one sample, then inspect the local packet

View the code example
Single-request replay
npm install @typesafe-ai/sdk@0.6.0
# Set TYPESAFE_API_KEY privately in your shell.
node run-choice-sample.mjs samples.json case-1
python preview_choice_workflow.py samples.json saved-api-results.json
Scope of this demo

Where this decision fits

Useful scope

  • Screening candidate context before answer generation
  • Testing paraphrases and ambiguous keyword matches
  • Replaying the exact synthetic requests and inspecting their distributions

Outside this demonstration

  • Calling every relevant passage a complete answer
  • Ranking absent candidates or verifying source truth
  • Treating six fixture expectations as measured production accuracy
Example FAQ

Questions about retrieved passage relevance.

The rubric explains the decision; the application owns the next step.

How is this different from answer coverage?

Relevance asks whether a passage concerns the query’s subject. Answer coverage asks whether it supplies the particular facts requested. A passage can pass the first check and fail the second.

Does Relevant topic mean the source is trustworthy?

No. This input does not establish source reliability. Keep provenance and factual verification separate from topical matching.

Does the leading probability measure production accuracy?

No. It is the model distribution for this one request. The six examples are functional checks with authored expectations, not a representative benchmark. Inspect disagreements and evaluate your own examples before using the label.

What happens when the API fails?

The window shows an error and supplies no fresh judgment. The downloadable runner sends one request without retries. Need evidence is a valid outcome about incomplete input; it does not stand in for a network or provider failure.

Try your own retrieved passage relevance input

Edit the evidence above or use the Playground to test another bounded question.