TL;DR
INQUEST is a new "staged" AI agent designed to find the specific code responsible for production bugs using only issue reports and logs. By replacing the typical "free-form" agent loop with a fixed, code-controlled procedure and leveraging "incident memory" from past bugs, it achieves a 68.6% top-1 accuracy in identifying faulty files, significantly outperforming unconstrained LLM agents.
What Problem Does This Paper Address?
When a production system breaks, engineers usually start with two things: a bug report and a snippet of logs. The fundamental challenge is that logs typically show where a failure was detected, not where it was caused.
For example, a stack trace might point to a file-flushing method that crashed because it hit a closed channel. The "innocent" flushing code is what appears in the logs, but the "guilty" root cause—the code that prematurely closed the channel—might be in an entirely different module. The authors found that in 49% of real-world bug reports, the text names none of the files that actually needed to be fixed. Existing tools often rely on failing tests (which don't exist yet at triage) or simple keyword matching (which fails when the logs are "innocent").
Methods
The authors introduce INQUEST, an agent powered by a 27B open-weights model (Qwen). Unlike most AI agents that operate in an autonomous loop—deciding what to do next until they feel finished—INQUEST follows a staged workflow controlled by traditional code.
The process consists of seven specific steps:
- Gather: Code collects evidence from logs, stack traces, and "incident memory."
- Route & Table: Evidence is organized into a candidate table.
- Shortlist: The model picks up to five files to examine closely.
- Examine: The model looks at each file in isolation to determine its role (Cause, Detector, or Unrelated).
- Walk Back: If a file is just a "detector," the code automatically finds its callers to look for the "cause."
- Rank: The model orders the files and identifies the affected module.
- Build Regions: The system identifies specific faulty functions.
A critical component is Incident Memory. The system searches the project's history for similar past issues. To prevent "cheating" during evaluation, they use a temporal firewall, ensuring the agent only sees bugs resolved before the current one was reported.
Datasets
The authors found that existing benchmarks were insufficient for this specific "logs-only" triage setting. They created a massive new benchmark:
- 38,001 resolved incidents mined from 27 major open-source projects (including Apache, Red Hat, MongoDB, and MariaDB).
- Multi-language support: Primarily Java, Scala, C, and C++.
- Real-world complexity: Each instance pairs a report and its logs with the exact code snapshot where the bug existed and the ground-truth fix.
- Stratification: They explicitly separate "easy" cases (where the report mentions the faulty file) from "hard" cases (where it doesn't).
Key Insights and Ideas
- Structure Trumps Freedom: A "free agent" loop with the same model and tools finds files just as well as INQUEST, but it is much worse at pinpointing the specific function. The staged approach provides the discipline needed for fine-grained localization, improving function-level accuracy by 14 points.
- History is a Powerful Signal: "Incident memory" is the only signal that doesn't collapse when a report contains no file names. Because software bugs often recur in similar patterns, looking at what was fixed in the past is a vital "cheat sheet" for the present.
- The "Innocent" Log Problem: By explicitly asking the model to distinguish between code that creates a bad state and code that merely reports it, INQUEST can "walk back" the call stack to find the true root cause.
Key Results
On a massive evaluation set of over 26,000 reports:
- File Localization: INQUEST ranks a correctly changed file at #1 for 68.6% of cases and in the top five for 85.9%.
- Hard Cases: On the 49% of reports that mention no faulty files, it still hits 52.8% top-1 accuracy.
- Module Identification: It correctly identifies the affected software module 90.2% of the time.
- Comparison: In a head-to-head sample, it beat reimplementations of published agents (like LocAgent and CoSIL) by 7 to 20 points in top-1 accuracy.
- Efficiency: The system averages about 15.7 model calls per issue, taking roughly 286 seconds of wall time when running concurrently.
Limitations and Future Work
- Reporter-Curated Logs: The benchmark uses logs that were manually pasted into reports by humans. In a real production environment, an agent might have to sift through "raw" log bundles, which are much noisier.
- Single-Hop Walk-back: The current "walk-back" mechanism only looks one hop back in the call graph. More complex bugs might require deeper data-flow analysis.
- Human-in-the-loop: While the system produces a "causal chain" to explain its reasoning, the authors note that no user study has yet been conducted to see if these explanations actually help engineers work faster.
Summary updated