LIVE · Thursday 3 December

AI Models for Bug Triage and Priority Assignment: Route With a Calibrated Classifier, Set Priority With Rules

The research on bug triage supports simple classifiers and fine-tuned encoders for routing, and confidence cutoffs for partial automation. Priority depends on business context, so it needs a written rubric.

By Nick15 min read

For bug triage, start with a logistic regression on report text and metadata to route reports to a team, and automate only the reports where its top probability passes a cutoff that you have validated. An Ericsson study found that this kind of classifier was 79% accurate across 43 teams, and 90% accurate on the 62% of reports that passed a 0.9 cutoff. Bug priority is a different target. It depends on affected users, the environment, workarounds and release commitments, so it should come from a versioned rubric that an LLM can feed with evidence but not replace.

No published study compares rules, logistic regression, a fine-tuned encoder, a large language model (LLM) with retrieved examples and an option-scoring model on the same bug reports. The comparison below is therefore built from separate studies, each of which answers a narrower question, plus a test protocol that a team can run on its own tracker.

Routing, severity and priority are three different targets, and each one needs its own label.

Routing asks which team or component should own a report. Severity asks how bad the defect is. Priority asks how soon the defect should be fixed. Mozilla's Firefox documentation keeps these apart: its severity field describes "the scope of a bug's effect on Firefox," while its priority scale runs from P1, "Fix in the current release cycle," to P3, "Backlog."

The gap between severity and priority is the reason why a severity model does not settle priority. A crash that loses data is severe wherever it happens. The same crash in a checkout flow used by many customers, with no workaround and a release next week, needs a P1. In a test environment that nobody uses, it can wait in the backlog. The defect is the same, but the operational context differs.

A team that wants to automate priority therefore needs to write down how context changes the answer. A practical rubric covers four inputs and carries a version number, so that every historical label can be tied to the rule set that produced it:

  • The affected users input records how many people hit the defect, and whether they are customers, internal staff or contractual partners.
  • The environment input records whether the defect occurs in production, staging or a test system.
  • The workaround input records whether users can avoid the defect, and at what cost.
  • The release commitment input records whether the defect blocks a dated release or a promise to a customer.

Mozilla's severity guide shows why the third and fourth inputs matter. It lists bugs that involve contractual partners as an example of S2 severity, which means that a business relationship changes the rating even when the code fault stays the same.

A logistic regression with text and metadata routed 79% of Ericsson reports correctly, and a confidence cutoff raised that to 90% on 62% of reports.

The most detailed evidence for simple routing models in production comes from Sarkar, Rigby and Bartalos, who studied Ericsson's tracker for ICSME 2019. Their dataset held 11,570 fixed reports from July 2016 to June 2018, across 9 products and 43 teams. The load was uneven, because 8 teams fixed 81% of the reports.

A logistic regression that combined report text with categorical fields such as product and severity reached 78.09% precision and 79.00% recall. The authors found that the categorical fields carried the most predictive power. A linear SVM came within one percentage point but took substantially longer to train. Naive Bayes and nearest-neighbour models scored far lower. Adding alarm logs and crash dumps, which were present in 51% and 5.5% of reports, did not improve the results.

The authors also tested their models in a realistic order. They trained on all earlier weeks and tested on the next week, because, in their words, cross validation is unrealistic when "future bug reports are used to assign developers to past bug reports."

Ericsson still judged 79% to be "too low to be used in production." Offering the top three teams raised accuracy to 90.02%, but Ericsson did not favour that option because a person still had to choose among the three. The approach that worked was to triage automatically only when the classifier's top probability passed a cutoff. With no cutoff, the classifier handled every report at 79% accuracy. With a cutoff of 0.9, it handled 61.71% of reports at 90.17% accuracy, and the rest went to people.

The authors say that the approach cut manual triage effort by more than half. They also state that their results "clearly do not generalize outside of Ericsson."

Fine-tuned encoders such as DeBERTa won most routing comparisons, but a TF-IDF SVM beat them on Mozilla developer assignment.

Dipongkor and Moran compared six fine-tuned transformer encoders with a TF-IDF and SVM baseline in a paper for ASE 2023. They used four open-source datasets: Eclipse JDT, Eclipse Platform, Mozilla Core and Mozilla SeaMonkey, with between 14,312 and 64,238 reports each. Like the Ericsson team, they split the data in time order and always tested on reports that came after the training data.

Their abstract calls DeBERTa "the most effective technique across the triaging tasks of developer and component assignment." The detailed tables give a more mixed result. For developer assignment, the SVM had the best top-1 accuracy on both Mozilla datasets, at 0.676 against DeBERTa's 0.653 on Mozilla Core. The authors conclude that "a well-tuned term frequency-based approach can perform well." For component assignment, DeBERTa had the highest F1 on all four datasets. On the two Mozilla datasets, however, its lead over the SVM was not statistically significant.

The encoder path is compact by the standards of current language models. DeBERTa-v3-base, for example, has 86 million backbone parameters and 98 million embedding parameters, according to its model card, and it carries an MIT licence. It still requires a GPU training run and a serving setup, which a logistic regression does not. The evidence supports trying an encoder for routing when the text carries the signal, and only after a TF-IDF baseline has set the bar.

Priority models such as DRONE and CLeBPI depend on historical priority labels, and those labels change over time.

Priority prediction has its own line of research. DRONE, by Tian, Lo and Sun at ICSM 2013, combined six groups of features: temporal, textual, author, related-report, severity and product. It used a classifier that was designed for ordered labels and imbalanced classes. On more than 100,000 Eclipse reports, it improved average F-measure by 58.61% relative to its baselines. CLeBPI, by Wang, Wu and He in Information and Software Technology in December 2023, pre-trained a language model on bug reports and added a contrastive objective to separate reports of different priorities. Its preprint abstract reports gains of 23.86% to 77.80% in weighted F1 over four baselines on one public dataset.

Both methods train on the priorities that past triagers assigned. That approach works only when those labels are consistent. A 2025 study of 32 Apache projects by Cai and colleagues, accepted to ACM TOSEM, starts from the observation that priority often changes while a bug is being fixed. Its model for predicting those changes in the fixing phase reached a macro F1 of 0.613. A tracker's final priority field can therefore differ from the priority that was set at triage time. A model that is trained on the final value uses information that did not exist at triage time.

The DRONE design is also close to the rubric approach. Its inputs include severity, product and related reports, which are structured facts rather than wording. A rubric makes the business context explicit in a similar way.

An LLM is most useful for extracting evidence with quotes, and the only direct test of LLM help with priority found no accuracy gain.

The one study that measured LLM assistance for priority directly is small. Nasui, Vescan and Marinescu, at ENASE 2026, asked 26 students to assign P1 to P5 priorities to 15 Mozilla Bugzilla reports. The 7 students who worked without an LLM got a mean of 4.71 right. The 19 students who used an LLM got a mean of 4.36 right. The difference was not significant (p = 0.70). The LLM group also reported lower confidence in their final priorities, at 37% against 72%. The authors list the small sample and the subjective nature of priority labels as limits.

That result does not show how an LLM performs in production triage. It is, however, a reason not to let an LLM pick a priority on its own. A more defensible job for an LLM is evidence extraction. In that role, the LLM reads the report and returns each rubric input with a supporting excerpt, or with the value unknown when the report does not say. Retrieved examples of past reports from the same product can be added to the prompt, so that the prompt contains examples of how the team describes its environments. The rubric then turns that evidence into a priority. A person can check each excerpt against the report.

Option scorers such as TOD and open-jev rank a fixed list of teams or priorities, but neither has a published bug-triage result.

A third model type sits between a classifier and a free-text LLM. An option scorer receives the report, the context and a list of allowed answers, and it returns a probability for each answer. It cannot return a team that is not on the list, which suits routing to the current list of owners.

Parsec's TOD is one example. Parsec calls it a "universal decision model" that ranks the next action from a list of allowed actions and generates no free text. Its repository documents a predict(state, options, question, images) call that returns one probability per supplied option. TOD has a confidence gate that passes uncertain turns to a larger model, and Parsec prices it at $0.30 per 1,000 decisions. The release is a set of LoRA adapters on Google's gemma-4-12B-it plus a ModernBERT retriever, so it is much larger than the encoder path. Users must also accept the Gemma 4 licence. According to Parsec's TOD page, TOD scored below its untrained base model on the public JevBench decision benchmark, and the repository says that TOD is not state of the art there. Parsec's open-jev repository offers a smaller, MIT-licensed option scorer that runs on a local Gemma 3 4B. Neither TOD nor open-jev has been evaluated on bug triage, so neither result says anything about routing or priority quality.

A leakage-resistant dataset uses only the fields that existed when the report was triaged.

Leakage in the evaluation data can make a triage benchmark misleading. A test set that includes the final resolution, the eventual assignee's comments or a priority set weeks later will make every model look better than it will be in use. The following schema keeps only what a triager could see, plus the labels that were set at triage time:

{
  "report_id": "BUG-48211",
  "created_at": "2026-10-02T09:14:00Z",
  "duplicate_group": "DG-3310",
  "title": "Checkout returns 500 after coupon applied",
  "description": "Steps: ... Expected: ... Actual: ...",
  "product": "web-store",
  "component_reported": "payments",
  "reporter_type": "customer",
  "environment_reported": "production",
  "attachments_at_triage": ["log"],
  "label_team_at_triage": "payments-core",
  "label_severity_at_triage": "S2",
  "label_priority_at_triage": "P1",
  "rubric_version": "2026-11-v1",
  "team_map_version": "2026-10"
}

The schema leaves out fields such as resolution, fix commit, final assignee, comment history and final priority. Three more problems need to be written down before any training:

  • Inconsistent historical labels arise when different triagers apply different standards, or when the rubric changes. Tagging each label with rubric_version lets the team relabel a sample under the current rubric and measure disagreement.
  • Changing team ownership means that a label from 2024 may name a team that no longer exists. A team_map_version field and a mapping table let old labels be translated to current owners, or dropped.
  • Class imbalance should be expected in triage data. At Ericsson, 8 of 43 teams fixed 81% of reports, so per-team accuracy matters as much as the overall figure.

The split should follow time. Scikit-learn's documentation says that ordinary cross-validation on time-ordered data "would lead to training on future data and evaluating on past data." Duplicate reports also need to stay together, because a near-copy in the training set makes the test copy easy. The Ericsson study kept duplicates in its data, which is a reasonable choice for training, but each duplicate group should sit entirely on one side of the split.

A working example routes with a calibrated classifier and sets priority with versioned rules.

The following Python sketch uses scikit-learn. It trains a team router on earlier reports, picks a confidence cutoff on a validation period, and applies a priority rubric to evidence that an extractor has already returned.

import numpy as np
import pandas as pd
from sklearn.compose import ColumnTransformer
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.linear_model import LogisticRegression
from sklearn.pipeline import Pipeline
from sklearn.preprocessing import OneHotEncoder

df = pd.read_json("triage_reports.jsonl", lines=True).sort_values("created_at")
df["text"] = df["title"] + "\n" + df["description"]

# Time-ordered split. A duplicate group goes to the latest period that it touches.
period = np.select(
    [df["created_at"] < "2026-07-01", df["created_at"] < "2026-09-01"],
    ["train", "val"], "test")
df["period"] = period
rank = {"train": 0, "val": 1, "test": 2}
group_period = df.groupby("duplicate_group")["period"].agg(lambda p: max(p, key=rank.get))
df["period"] = df["duplicate_group"].map(group_period)
train, val, test = (df[df["period"] == p] for p in ("train", "val", "test"))

meta = ["product", "component_reported", "reporter_type", "environment_reported"]
router = Pipeline([
    ("features", ColumnTransformer([
        ("text", TfidfVectorizer(min_df=2, ngram_range=(1, 2)), "text"),
        ("meta", OneHotEncoder(handle_unknown="ignore"), meta),
    ])),
    ("clf", LogisticRegression(C=5.0, class_weight="balanced", max_iter=2000)),
])
router.fit(train, train["label_team_at_triage"])

def cutoff_for_error(model, data, max_error=0.10):
    proba = model.predict_proba(data)
    conf = proba.max(axis=1)
    correct = model.classes_[proba.argmax(axis=1)] == data["label_team_at_triage"].to_numpy()
    for t in np.unique(conf):  # ascending, so the first pass gives the widest coverage
        keep = conf >= t
        if 1 - correct[keep].mean() <= max_error:
            return t, keep.mean()
    return None, 0.0

cutoff, val_coverage = cutoff_for_error(router, val)

RUBRIC_VERSION = "2026-11-v1"

def priority(evidence, context):
    """evidence: rubric inputs from the extractor, each {"value": ..., "quote": ...}."""
    v = {k: e["value"] for k, e in evidence.items()}
    if "unknown" in (v["environment"], v["users_affected"]):
        return None, "missing evidence"
    if context["blocks_dated_release"]:
        return "P1", "release commitment"
    if v["environment"] == "production" and v["users_affected"] == "many" and v["workaround"] == "none":
        return "P1", "production outage without workaround"
    if v["environment"] == "production":
        return "P2", "production impact"
    return "P3", "non-production"

The router stays in place unless another model beats it on the same test period. A fine-tuned encoder or an option scorer can replace router.predict_proba without changing anything else. For an option scorer, the options list is the current team map, and the returned probabilities feed the same cutoff_for_error function. The priority function returns None when evidence is missing, so the report goes to a person instead of receiving a guessed priority.

Uncertain cases go to a person, and application code makes every ticket change.

A score is a recommendation, not permission to act. The application should apply a recommendation only when the router's top probability passes the validated cutoff, when the priority function returns a value, and when no policy rule forbids the change. Everything else goes to a human triage queue, together with the evidence excerpts and the top three teams.

The policy rules belong in code that the triage team owns and reviews. Examples include a rule that a P1 is never set automatically for a new product, or a rule that customer-reported production defects never drop below P2. The application writes the ticket update, logs the rubric version and model version, and records whether a person later overrode the recommendation. That log becomes the next evaluation set.

Calibration matters because the cutoff depends on probabilities that match observed frequencies. Scikit-learn's documentation says that logistic regression "is more likely to return well calibrated predictions by itself" than many other models. A fine-tuned encoder or an LLM may need a separate calibration step. Isotonic calibration works well with more than about 1,000 samples but can overfit on smaller sets.

LLM fees for 10,000 reports a month come to between $4 and $80, so accuracy matters more than price.

The following example prices one month of evidence extraction for a tracker that receives 10,000 reports. Every assumption is shown so that a team can substitute its own figures:

  • Each extraction call sends 2,500 input tokens, made up of about 800 tokens of report, 700 tokens of rubric instructions and 1,000 tokens of retrieved examples. It returns 300 output tokens of rubric values and excerpts.
  • Token counts differ between tokenizers. Anthropic's pricing page says that Claude 4.7 and later models produce about 30% more tokens for the same text, so these counts are for the model being priced.
  • A person needs 3 minutes to triage a report by hand. This figure is an assumption, because none of the studies above measured triage time.

At Anthropic's list price for Claude Haiku 5.5, $0.10 per million input tokens and $0.50 per million output tokens, the extractor costs $2.50 for 25 million input tokens and $1.50 for 3 million output tokens. That is $4.00 a month. Claude Sonnet 5.5, at $2 and $10 per million, costs $50 plus $30, or $80 a month. Anthropic's Batch API halves both figures, but it suits only reports that can wait for an asynchronous job. The logistic regression adds no per-report fee.

Manual triage on the same assumptions takes 10,000 times 3 minutes, or 500 hours a month. If a router automates 62% of reports, which is Ericsson's coverage at a 0.9 cutoff and is used here only as an illustration, about 310 hours of routing work leave the queue. That saving depends on coverage at an acceptable error rate, so a gain in accuracy on automated reports matters more than any difference in fees.

Each option earns its place only by beating the simpler option on the same held-out reports.

Before any model goes into use, the team should measure these quantities on reports that came after the training period, with uncertainty shown as confidence intervals across several time windows:

  1. Measure routing accuracy at top 1 and top 3, for every team and not only the large ones.
  2. Measure priority macro-F1, which scikit-learn defines as an unweighted mean across classes, so that rare priorities count as much as common ones.
  3. Measure urgent-bug recall, which is the share of true P1 reports that the system marked P1 or sent to a person. A system with high overall accuracy can still miss rare urgent defects.
  4. Measure calibration with a reliability curve, and coverage at a fixed error rate, such as the share of reports that can be automated at 5% or 10% error.
  5. Measure human overrides, triage time, latency and workflow cost in a live shadow period, and record the model version and hardware for every figure.

None of these quantities has been measured for the full set of options on a common dataset. The published studies measured parts of the problem on different data.

The decision then follows from the measurements. Keep plain rules when the team has few reports or when routing follows product fields almost exactly. Keep the logistic regression when a fine-tuned encoder does not beat it by more than the variation between time windows, which is what happened on the Mozilla developer-assignment data. Move to a fine-tuned encoder when the text carries signal that the TF-IDF model misses, and when the gain shows up in coverage at your chosen error rate. Use an untuned LLM for evidence extraction when the rubric needs facts that sit in free text, and measure extraction accuracy against a hand-labelled sample. Consider an option scorer, or any fine-tuning or custom deployment work, only after it shows a measured improvement over the logistic regression on your own held-out reports, because no published triage result supports it yet.

Sources

More in Research

All Research →