Recipe catalog / question-relevance
Check interview question relevance
question-relevance is a Jev recipe from the jev-recipes TypeScript package. Does question ask only about matters relevant to the requirements of role, rather than personal circumstances unrelated to the work? Use it when you generate or review screening and interview questions and want to flag ones that stray from the job into personal territory before they reach a candidate.
Last updated .
Explore this recipe interactively · Source and implementation guide · Markdown version
How do I use question-relevance in TypeScript?
Install with npm install jev-recipes. Requires Node.js 22.9 or newer and ES modules. Set TYPESAFE_API_KEY in your server environment for live calls, which send input to TypeSafe and use API quota. See the installation guide.
import { questionRelevance } from 'jev-recipes/question-relevance';
const result = await questionRelevance({
"question": "You mentioned you have young kids. How would you handle the on-call rotation, and do you plan to have more children in the next couple of years?",
"role": "Site Reliability Engineer. Requirements: 3+ years running production services, experience with incident response, participation in a weekly on-call rotation, strong Linux and networking fundamentals.",
"minConfidence": 0.8
});
console.log(result);
What input does question-relevance take?
| Field | Type | Needed |
|---|---|---|
| question | string | Required |
| role | string | Required |
| minConfidence | number | Optional |
Full input and result schemas
{
"input": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"question": {
"type": "string"
},
"role": {
"type": "string"
},
"minConfidence": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"required": [
"question",
"role"
]
},
"result": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"model": {
"type": "string"
},
"usage": {
"type": "object",
"properties": {
"input_tokens": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"output_tokens": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"input_tokens",
"output_tokens"
],
"additionalProperties": false
},
"status": {
"type": "string",
"enum": [
"ready",
"review"
]
},
"probability": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"confidence": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"verdict": {
"type": "string",
"enum": [
"relevant",
"unrelated"
]
}
},
"required": [
"model",
"usage",
"status",
"probability",
"confidence",
"verdict"
],
"additionalProperties": false
}
}What does a question-relevance result look like?
This hand-authored response demonstrates the contract. It is not a model accuracy measurement. Run it without an API key: npx jev-recipes demo question-relevance.
{
"model": "demo-fixture",
"usage": {
"input_tokens": 0,
"output_tokens": 0
},
"status": "ready",
"probability": 0.05,
"confidence": 0.95,
"verdict": "unrelated"
}
Input
See shared options and behavior for client configuration, validation, and errors. Types are inferred from this folder's Zod 4 schemas.
Result
verdict is relevant when Jev's yes probability is at least 0.5 and unrelated otherwise. probability is that yes probability. confidence is the probability of the chosen side, so a 0.05 yes probability yields unrelated with 0.95 confidence.
A result is ready when confidence meets minConfidence. Otherwise it is review. Treat a review result as unknown and hold the question for a human check rather than sending it to a candidate.
Reuse and calls
Uses the shared gate helper, a single yes/no question. This folder owns the question wording, the outcome descriptions, and the review policy. A live invocation makes one logical Jev request.
Limits
The recipe judges whether every part of the question stays on the role's stated requirements and duties. A question that mixes a work topic with a personal probe is unrelated, because the personal part is what matters for screening. It is not legal advice: which topics are prohibited, and the exceptions for genuine occupational requirements, differ by jurisdiction and belong in application policy. A relevant question can still be leading or poorly worded; use question-leading for that check.
Example input
demo.json contains editable input and a hand-authored response. After installing jev-recipes, npx jev-recipes demo question-relevance shows an offline illustration, not an accuracy measurement. Use npx jev-recipes describe question-relevance to inspect the input and result schemas.
How accurate is question-relevance?
No verified live accuracy measurement is available. Evaluate representative cases before using this decision in your workflow.
Use the evaluation guide to measure this decision on your own labeled cases.
What are the limits of question-relevance?
- Not legal advice. Which topics are prohibited varies by jurisdiction and belongs in application policy.
- Judges relevance to the stated role only; a relevant question can still be poorly worded or leading.
- Cannot see how the interviewer will use the answer, only what the question asks.
Which recipes are related to question-relevance?
- question-leading: Use question-leading to check whether a question steers the candidate toward an answer.
- instruction-fit: Use instruction-fit to check whether a written policy or rubric covers a given task.