Write a Recipe
Put the questions you want answered about every Record in one JSON file.
The guide sorts a support inbox. Every page uses the same Recipe, and it grows as you go.
A Recipe is a JSON file. It names the model, sets the review threshold, and lists the
Questions. Save this as recipe.json:
{
"format": 1,
"name": "support-inbox",
"version": 1,
"model": "jev-1.13.0",
"reviewThreshold": 0.7,
"questions": {
"category": {
"type": "choice",
"instructions": "Which category best describes this message?",
"criteria": {
"complaint": "The sender is unhappy with the product or service",
"question": "The sender asks how something works",
"other": "Anything else, including spam and thanks"
}
},
"wants_human": {
"type": "noul",
"instructions": "Does the sender ask to speak to a person?"
}
}
}
Two Questions so far. category is a Choice: the model picks one of the three labels, and the
description beside each label is what it picks on, so write descriptions that separate the
labels rather than restate them. wants_human is a yes/no Question, "type": "noul". It has
no criteria here, though it can carry a description for true and for false when the
boundary needs spelling out.
The fields around the Questions:
formatis the Recipe file format,1today. A breaking change to the format bumps it.nameandversionidentify the Recipe. Every Decision names both, so changeversionwhenever you change a Question.modelpins the model that answers.jev-1.13.0is the current one.reviewThresholdis the confidence below which a Decision is Unsure. It is required in the file, so a Recipe on disk never silently gets a default.
Question names are the keys under questions. They become keys in every Decision's
answers and in every Fixture's expect, so pick names you are happy to see in JSON and
in code.
Next: measure the Recipe against examples you label before it touches real Records.