DocsExamples
Issue triage
Label each new issue with its kind and owning team as it arrives, and leave only the ones decisio is unsure about for a maintainer.
It sorts issues well untaught: the script asks for the issue’s kind and applies the label only when the answer is certified:
Figure · How to use it
The model judges the input; your code chooses the action.
- InputAn issue description
- QuestionWhat kind of issue is this?
- Typed answerAn issue kind and probabilities
- Your codeApply the label for a certified answer; otherwise ask a maintainer.
The answer is under answers.kind. Check the certificate required by your application before automating the action.
Source: this recipe’s question and application policy. No model result is illustrated here.
Save the complete caller as issue-triage.py and run it with Python 3.12 or later.
Set DECISIO_BASE_URL to your server, or leave the local default.
Until you register and certify this question, the caller sends answers to review.
import jsonimport osimport urllib.errorimport urllib.request
QUESTION = { "type": "choice", "instructions": "What kind of issue is this?", "criteria": { "bug": "Something is broken", "feature": "A request for something new", "docs": "The documentation is wrong or missing", "question": "A question about how to use it", "other": "Anything else" }}BASE_URL = os.environ.get("DECISIO_BASE_URL", "http://127.0.0.1:8000").rstrip("/")TIMEOUT = 15REVIEW = "to a maintainer"
def route(text): request = urllib.request.Request( BASE_URL + "/v1/systemone", data=json.dumps({"state": text, "questions": {"kind": QUESTION}}).encode(), headers={"Content-Type": "application/json"}, ) try: with urllib.request.urlopen(request, timeout=TIMEOUT) as response: answer = json.load(response)["answers"]["kind"] if not isinstance(answer, dict) or answer.get("type") != QUESTION["type"]: return REVIEW if not (answer.get("choice") in QUESTION["criteria"]): return REVIEW # A gold certificate is about correctness; agreement alone is insufficient. if (answer.get("certified") is True and answer.get("certificate_kind") == "gold" and isinstance(answer.get("certificate"), str) and answer["certificate"]): return f"label {answer['choice']}" return f"to a maintainer, {answer['choice']} suggested" except (urllib.error.URLError, TimeoutError, OSError, ValueError, KeyError, TypeError): return REVIEW
if __name__ == "__main__": print(route("The scheduler crashes when a pod has no resource limits."))to a maintainer, bug suggestedIs it a good fit?
Section titled “Is it a good fit?”Good fit
- The kind of an issue, and the team that owns it: both work untaught.
Not a good fit
- Priority: the measured run below is right about half the time, taught or not.
- Whether an issue needs more information from its reporter: teaching lowers it slightly.
1. Write the question
Section titled “1. Write the question”One choice question per label family: one for the kind, one for the owning team.
Ask them in the same request, so the issue is read once (Scale).
2. Teach it and certify it
Section titled “2. Teach it and certify it”They work untaught, so there is little to teach; certify each question on labelled issues, so that each label says whether it can be applied on its own.
Send at least 118 labelled issues. The server holds back half to certify, and a 5% certificate needs 59 of those. More examples certify a larger share.
Prepare issue-triage-labels.jsonl with one JSON object per line, containing state and answer.
Use real inputs and labels chosen by a person; each answer is one of the question’s option keys.
The code below builds complete requests using the same question as the caller.
import jsonimport osimport urllib.request
QUESTION = { "type": "choice", "instructions": "What kind of issue is this?", "criteria": { "bug": "Something is broken", "feature": "A request for something new", "docs": "The documentation is wrong or missing", "question": "A question about how to use it", "other": "Anything else" }}# One JSON object per line: state and the answer chosen by a person.with open("issue-triage-labels.jsonl", encoding="utf-8") as source: rows = [json.loads(line) for line in source if line.strip()]examples = [ {"request": {"state": row["state"], "questions": {"kind": QUESTION}}, "answer": row["answer"]} for row in rows]body = {"id": "issue-triage", "examples": examples, "certify": {"alpha": 0.05}}base_url = os.environ.get("DECISIO_BASE_URL", "http://127.0.0.1:8000").rstrip("/")request = urllib.request.Request( base_url + "/v1/tasks", data=json.dumps(body).encode(), headers={"Content-Type": "application/json"},)# Registration reads all your examples; allow more time than an ordinary decision.with urllib.request.urlopen(request, timeout=300) as response: record = json.load(response)print(json.dumps(record.get("certificate"), indent=2))Needs the reader’s own human-labelled JSONL file.
Save the registration script beside the labels file and run it with Python.
Registration replaces a task of the same id.
Check the returned certificate: a null threshold means no answer can be certified.
Certify answers runs this call on a server, with its answer.
3. Route on the certificate
Section titled “3. Route on the certificate”The caller acts only when certified is true and certificate_kind is gold, with a certificate id.
A learned table’s agreement certificate measures agreement with the model, so it goes to review in this recipe.
- A certified answer applies its label.
- Everything else waits for a maintainer, with decisio’s suggestion beside it.
- If the issues change, a new component or a new kind of report, certification is suspended until you certify again (Watch for drift).
What it did
Section titled “What it did”- 85.1% right on the kind of an issue (macro-F1 81.2%) and 85.3% on its owning SIG, the 12 most frequent (macro-F1 81.0%), by Gemma 4 31B, untaught, on 1,000 real kubernetes/kubernetes issues.
- It works out of the box: teaching changed accuracy by under a point, except on the owning SIG at 1,000 examples, 85.3% to 85.9% (macro-F1 81.0% to 82.4%).
- Priority is 51.0% right, and needs-information has a balanced accuracy of 61.3%, which teaching lowers slightly.
- These figures are fitted offline on the readouts the server returns; the live server's head gave the same answer on every item we compared.
- Issues from kubernetes/kubernetes (Apache-2.0), created 2018-01-01 to 2026-09-30 and fetched through the GitHub API on 2026-10-14; used under the repository's licence (GitHub Terms of Service D.6: content added to a repository containing a licence notice is licensed under the same terms). No issue text, user name or e-mail address is shown or stored here; the results are aggregates.
Read through decisio v0.11.1 on vLLM 0.30.0, on one NVIDIA RTX PRO 6000 Blackwell Workstation Edition (600 W, AMD EPYC 9534 64-Core Processor, driver 595.104.02), on 2026-10-14 and 2026-10-15 (the session ran from 2026-10-14T19:34Z to 2026-10-15T03:38Z); the 31B is tachara-ai/decisio-gemma-4-31b at the recorded revision (fp8_e4m3 weights of google/gemma-4-31B-it), the 12B is tachara-ai/decisio-gemma-4-12b at the recorded revision (bfloat16 weights of google/gemma-4-12B-it); the teaching was fitted offline on the readouts afterwards.
Limits
Section titled “Limits”- An HTTP error, timeout or invalid response goes to the review path, like an uncertified answer (Handle review and service failures).
- Keep the question and options stable after registration, and certify again after changing the task or serving setup (Keep a certificate valid).
What next
Section titled “What next”- Support routing: the same recipe on a support inbox.
- Certify answers: the promise, and how to choose the error target.
- Use cases: the other recipes.