Skip to content

madoo.decision-questions/v1

Madoo decision questions — The questions Decide with a Model asks about its content: yes/no, a choice between options or a score on levels, each with its instructions and the threshold its answer must reach. Each question names output ports of the step.

Reference madoo.decision-questions/v1
Schema id urn:madoo:schema:decision-questions:v1
Version 1.0.0
Served at GET /api/v1/json-schemas/madoo.decision-questions/v1 · MCP get_json_schema
  • Saved in the parameter: ai/decide → questions
Field Type Required Rules Description
schema "madoo.decision-questions/v1" yes
questions array of objects yes min items 1; max items 16
questions[].name string yes pattern “^[a-z][a-z0-9_]{0,39}$” Unique in the step. Names the output ports of the question: , and _probability (yes_no, choice) or _level (score). Must not be one of the step’s own ports (decision, all_accepted, content, images, image_set) nor end with _probability or _level.
questions[].type one of "yes_no", "choice", "score" yes yes_no: is the statement in the instructions true? choice: which of the options? score: where on the levels, lowest first?
questions[].instructions string yes min length 1; max length 2000 What the model judges, in observable terms. For yes_no a statement to test (“The product in the photo is damaged.”); for choice and score a question.
questions[].threshold number ≥ 0; ≤ 1 The probability the answer must reach to be accepted. yes_no (0.5 to 1): the probability of true (answer true) or of false (answer false); choice: the probability of the chosen option; score: the probability of the most likely level. Default 0.8 for yes_no, 0.7 for choice, 0.6 for score.
questions[].options array of objects min items 2; max items 50 choice only: the possible answers, values unique. Add an “other” option when the content may fit none of them.
questions[].options[].value string yes min length 1; max length 100
questions[].options[].description string max length 500
questions[].levels array of objects min items 2; max items 10 score only: the levels from lowest to highest. The score is the probability-weighted average of their positions (0 for the first).
questions[].levels[].label string yes min length 1; max length 100
questions[].levels[].description string max length 500
madoo.decision-questions/v1 (JSON Schema)
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "urn:madoo:schema:decision-questions:v1",
"title": "Madoo decision questions",
"description": "The questions Decide with a Model (ai/decide) asks about its content: each a yes/no, a choice between options or a score on a scale, with the instructions the model reads and the threshold its answer must reach to be accepted. Every question becomes output ports of the step named after it.",
"type": "object",
"required": [
"schema",
"questions"
],
"additionalProperties": false,
"properties": {
"schema": {
"const": "madoo.decision-questions/v1"
},
"questions": {
"type": "array",
"minItems": 1,
"maxItems": 16,
"items": {
"$ref": "#/$defs/question"
}
}
},
"$defs": {
"question": {
"type": "object",
"required": [
"name",
"type",
"instructions"
],
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]{0,39}$",
"description": "Unique in the step. Names the output ports of the question: <name>, and <name>_probability (yes_no, choice) or <name>_level (score). Must not be one of the step's own ports (decision, all_accepted, content, images, image_set) nor end with _probability or _level."
},
"type": {
"enum": [
"yes_no",
"choice",
"score"
],
"description": "yes_no: is the statement in the instructions true? choice: which of the options? score: where on the levels, lowest first?"
},
"instructions": {
"type": "string",
"minLength": 1,
"maxLength": 2000,
"description": "What the model judges, in observable terms. For yes_no a statement to test (\"The product in the photo is damaged.\"); for choice and score a question."
},
"threshold": {
"type": "number",
"minimum": 0,
"maximum": 1,
"description": "The probability the answer must reach to be accepted. yes_no (0.5 to 1): the probability of true (answer true) or of false (answer false); choice: the probability of the chosen option; score: the probability of the most likely level. Default 0.8 for yes_no, 0.7 for choice, 0.6 for score."
},
"options": {
"type": "array",
"minItems": 2,
"maxItems": 50,
"description": "choice only: the possible answers, values unique. Add an \"other\" option when the content may fit none of them.",
"items": {
"type": "object",
"required": [
"value"
],
"additionalProperties": false,
"properties": {
"value": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"description": {
"type": "string",
"maxLength": 500
}
}
}
},
"levels": {
"type": "array",
"minItems": 2,
"maxItems": 10,
"description": "score only: the levels from lowest to highest. The score is the probability-weighted average of their positions (0 for the first).",
"items": {
"type": "object",
"required": [
"label"
],
"additionalProperties": false,
"properties": {
"label": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"description": {
"type": "string",
"maxLength": 500
}
}
}
}
},
"allOf": [
{
"if": {
"properties": {
"type": {
"const": "choice"
}
}
},
"then": {
"required": [
"options"
],
"not": {
"required": [
"levels"
]
}
}
},
{
"if": {
"properties": {
"type": {
"const": "score"
}
}
},
"then": {
"required": [
"levels"
],
"not": {
"required": [
"options"
]
}
}
},
{
"if": {
"properties": {
"type": {
"const": "yes_no"
}
}
},
"then": {
"properties": {
"threshold": {
"minimum": 0.5
}
},
"not": {
"anyOf": [
{
"required": [
"options"
]
},
{
"required": [
"levels"
]
}
]
}
}
}
]
}
}
}