Classification with a parent-category fallback
Choose a broad category first, then refine it. When uncertain, keep the request at the broader level.
What the model decides. What code checks.
- The first Choice selects the technical or operations category. An unknown answer or low confidence goes straight to human review.
- The second request contains only children of the selected category. Other branches are never called.
- Code returns a specific queue or the parent queue flagged for review. Unknown routes are never executed.
Read. Run. Replay.
Unpack the archive and open its directory in a terminal. The first step needs neither a key nor a network connection.
python3 runner.py hierarchical-routingFor a real run, set SHVYDKO_API_KEY in your computer or server environment. Do not put the key in your browser or source code. Current account quotas and pricing apply.
python3 runner.py hierarchical-routing --live --output hierarchical-routing-run.jsonThe report contains requests, actual responses, elapsed times, and known usage. The file is created with private permissions and never overwrites an existing file. Network failures are not automatically retried: check Usage before another call.
python3 runner.py hierarchical-routing --replay hierarchical-routing-run.jsonReplay checks that the recipe, inputs, and requests match. A local file is editable, so it is not signed proof of where responses came from. If you replace the inputs with your own data, the report will contain those data too: keep it private.
An open contract, with every step visible.
The plan below was generated by the same runner from the bundled fixtures. It contains requests and author expectations, not model results.
{
"mode": "offline_plan",
"model_calls": 0,
"recipe": "hierarchical-routing",
"author_expectation": [
"technical",
"checkout"
],
"notice": "Requests only, no model answers. Hierarchy includes conditional branches; repetition requests are templates.",
"requests": [
{
"state": "Every card checkout shows a payment gateway timeout. Cash on delivery still works. No card was charged.",
"questions": {
"category": {
"type": "choice",
"instructions": "Choose the top-level support category.",
"criteria": {
"technical": "Website, payment integration or access failures",
"operations": "Shipping or review of a charged payment",
"unknown": "No category fits"
}
}
}
},
{
"state": {
"message": "Every card checkout shows a payment gateway timeout. Cash on delivery still works. No card was charged.",
"parent": "technical"
},
"questions": {
"subcategory": {
"type": "choice",
"instructions": "Choose the specific issue within this parent, or unknown.",
"criteria": {
"checkout": "Checkout or payment integration failure",
"access": "Login or account access failure",
"unknown": "Not enough evidence"
}
}
}
},
{
"state": {
"message": "Every card checkout shows a payment gateway timeout. Cash on delivery still works. No card was charged.",
"parent": "operations"
},
"questions": {
"subcategory": {
"type": "choice",
"instructions": "Choose the specific issue within this parent, or unknown.",
"criteria": {
"shipping": "Shipment or delivery question",
"charged_payment": "Refund or invoice for a payment already charged",
"unknown": "Not enough evidence"
}
}
}
}
]
}