Passage Relevance
AI Agent Instructions
Use this Classifier via the SuperClassify API from server code, not browser playground automation. Add a reranking stage after your existing search. Send each candidate passage with the user's question and required scope, preserving source IDs outside the model. Keep addresses_need, use related_context only as supporting context, and discard unrelated passages. If no passage addresses the need, rewrite the search query and retrieve again, at most twice; never turn missing evidence into an answer. Class: superclassify/retrieval-usefulness@2.0.0 Fetch setup as text: https://superclassify.com/skills/superclassify/SKILL.md Contract (JSON): https://superclassify.com/v1/resolve?ref=superclassify%2Fretrieval-usefulness%402.0.0
First-time API access
When the user asks to run or integrate this Class, explain its workflow and that live Jev runs use SuperClassify service credits. Public card descriptions can be read without an account. Reuse an existing account, credit balance and API key when available. Otherwise, guide the user through the official setup links below. The user completes sign-in and any credit purchase on the website, then saves the API key in their application’s server secrets as SUPERCLASSIFY_API_KEY—not in chat. A separate TypeSafe account or Jev key is not required for the SuperClassify API. Reading a link does not authorize a purchase or paid run.
Finds the passage that addresses a natural-language information need, not just matching words.
superclassify/retrieval-usefulness@2.0.0
Input
Send one raw text string.
Outputs
- relevance (choice): addresses_need, insufficient_context, related_context, unrelated
Examples
Concept match
Need: when can I cancel without paying a fee? Passage: Cancellation incurs no charge if received at least 24 hours before the appointment.
Author expectation: {"relevance":"addresses_need"}
Keyword without answer
Need: how do I export invoices? Passage: Our latest invoice design uses a cleaner font and layout.
Author expectation: {"relevance":"unrelated"}
Broken reference
Need: which deadline applies? Passage: The exception in the previous section overrides this rule. No previous section or rule was supplied.
Author expectation: {"relevance":"insufficient_context"}