Recipe catalog / issue-recurrence
Check whether an issue returned
Label a reported issue as new, ongoing without resolution, or returned after reported recovery.
You need to distinguish a new problem, one that never stopped, and an issue that came back after recovery.
Explore this recipe interactively ยท Source and implementation guide
Use issue-recurrence 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 { issueRecurrence } from 'jev-recipes/issue-recurrence';
const result = await issueRecurrence({
"issue": "CSV export fails with error E42.",
"message": "The same E42 error is back when I export a CSV.",
"history": "Monday, customer: CSV exports fail with E42. Tuesday, customer: CSV exports work again; E42 is gone."
});
console.log(result);
Input contract
| Field | Type | Needed |
|---|---|---|
| issue | string | Required |
| message | string | Required |
| history | string | Optional |
| minConfidence | number | Optional |
Full input and result schemas
{
"input": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"issue": {
"type": "string",
"description": "One specific problem whose reported recurrence should be assessed."
},
"message": {
"type": "string",
"description": "The latest customer report about the issue."
},
"history": {
"type": "string",
"description": "Earlier reports in chronological order, oldest first, with speaker identities and reported outcomes."
},
"minConfidence": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"required": [
"issue",
"message"
]
},
"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"
]
},
"verdict": {
"type": "string",
"enum": [
"new",
"ongoing",
"returned",
"unclear"
]
},
"confidence": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"probabilities": {
"type": "object",
"propertyNames": {
"type": "string",
"enum": [
"new",
"ongoing",
"returned",
"unclear"
]
},
"additionalProperties": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"required": [
"new",
"ongoing",
"returned",
"unclear"
]
}
},
"required": [
"model",
"usage",
"status",
"verdict",
"confidence",
"probabilities"
],
"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 issue-recurrence.
{
"model": "demo-fixture",
"usage": {
"input_tokens": 0,
"output_tokens": 0
},
"status": "ready",
"verdict": "returned",
"confidence": 0.97,
"probabilities": {
"new": 0.01,
"ongoing": 0.01,
"returned": 0.97,
"unclear": 0.01
}
}
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
- Classifies the supplied customer reports; it does not verify system health or prove a common root cause.
- Missing history does not mean new, and a ticket closure or attempted fix does not prove recovery.
- Callers supply chronology and issue identity; the recipe does not fetch history or update tickets.
Related recipes
- resolution-check: Use resolution-check to check whether the current message reports resolution.
- ticket-match: Use ticket-match to compare whether two reports concern the same underlying issue.
- repeated-attempt: Use repeated-attempt to check whether a proposed troubleshooting step repeats an earlier attempt.