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.
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.
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.

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

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

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.

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

Review Unclear meaning, Need evidence before using a result. The label is a decision about the supplied information, not an executed action.
| Original input | Observed label | Leading probability |
|---|---|---|
| Relevant but incomplete | Relevant topic | 89.0% |
| Same word, other sense | Keyword overlap only | 98.0% |
| Another subject | Unrelated | 99.0% |
| Unresolved abbreviation | Keyword overlap only | 72.0% |
| Paraphrased connection | Relevant topic | 100% |
| No passage | Need evidence | 100% |
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
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.
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.
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.jsonThe rubric explains the decision; the application owns the next step.
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.
No. This input does not establish source reliability. Keep provenance and factual verification separate from topical matching.
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.
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.
Edit the evidence above or use the Playground to test another bounded question.