Recipe catalog / question-relevance
Check interview question relevance
Does question ask only about matters relevant to the requirements of role, rather than personal circumstances unrelated to the work?
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.
Explore this recipe interactively ยท Source and implementation guide
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);
Input contract
| 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
}
}Saved example result
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"
}
Evaluation evidence
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.
Limitations
- 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.
Related recipes
- 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.