Exploring LLM-Based Agents for Root Cause Analysis

Devjeet Roy, Xuchao Zhang, Rashi Bhave, Chetan Bansal, Pedro Henrique B. Las-Casas, Rodrigo Fonseca, Saravan Rajmohan · DOI · OpenReview

TL;DR

This paper introduces LLM-based agents, specifically using the ReAct framework, to automate Root Cause Analysis (RCA) for cloud incidents. By equipping these agents with tools to interact with diagnostic services, they can dynamically gather information, overcoming limitations of previous LLM approaches and showing promise for practical deployment in incident management.

What Problem Does This Paper Address?

Cloud-based software systems are increasingly complex, leading to frequent production incidents. Identifying the root cause of these incidents (Root Cause Analysis or RCA) is a critical but labor-intensive task for on-call engineers (OCEs). It requires deep domain knowledge and extensive experience. While LLMs have shown potential for RCA, they often struggle because they can't dynamically access real-time diagnostic data like logs, metrics, or databases, which OCEs rely on heavily. This paper aims to bridge this gap by exploring LLM agents that can reason, plan, and interact with external tools to gather this crucial information.

Methods

The core of this work is the application of LLM-based agents, specifically leveraging the ReAct (Reasoning and Acting) framework. ReAct agents combine reasoning capabilities with the ability to use tools. The authors equip their ReAct agent with a set of tools, including:

  • Incident Details Tool: For answering questions about the incident report.
  • Historical Incidents Tool: To retrieve past incidents that might offer clues. This tool has two variants: one that directly uses the incident title/description and another that involves a two-step retrieval process.
  • Database Query Tool: Designed to query databases using a custom SQL-like language and analyze the results.
  • KBA Q/A Tool: To answer questions based on Knowledge Base Articles (KBAs), which are crucial for incident management at Microsoft.
  • KBA Planning Tool: A variant of the KBA Q/A tool specifically designed to help the agent create high-level diagnostic plans.
  • Human Interaction Tool: Allows OCEs to provide information or intervene when the agent struggles.

The evaluation is conducted in a "zero-shot" setting, meaning the LLM agent is not fine-tuned on the specific incident data, making it more challenging but also more generalizable.

Datasets

The study uses an internal incident portal dataset from Microsoft, collected between January 2019 and September 2021. This dataset contains approximately 107,000 incidents. For evaluation, they sampled 100 incidents from the evaluation set and 500 from the test set. The training set is primarily used as a retrieval corpus for historical incidents.

Key Insights and Ideas

  • Agents are Key for Dynamic Data Gathering: The most significant insight is that LLM agents, by being able to interact with external tools, can overcome the limitations of static LLM approaches that only rely on incident descriptions. This dynamic data collection is crucial for effective RCA.
  • ReAct Framework is a Good Fit: The ReAct framework's ability to interleave reasoning and tool usage naturally aligns with the iterative and exploratory nature of RCA.
  • Discussion Comments Don't Significantly Boost Performance (in this setup): Surprisingly, incorporating discussion comments from historical incidents into the retrieval corpus didn't lead to substantial improvements in performance, suggesting that static historical data alone has limitations.
  • KBAs are Indispensable: Knowledge Base Articles are highlighted as critical resources, providing essential domain knowledge and operational details that even experienced engineers rely on. Agents can leverage these KBAs effectively.
  • Human-in-the-Loop is Essential for Trust and Complex Scenarios: For practical deployment, a human-in-the-loop mechanism is vital. It builds trust, allows for intervention in complex or ambiguous situations, and helps the agent learn.

Key Results

  • Competitive Performance: In an out-of-distribution, zero-shot setting, the ReAct agent performed competitively with strong baselines like retrieval-augmented generation (RB) and Chain-of-Thought (CoT) on semantic similarity metrics.
  • Reduced Hallucinations: A key advantage of ReAct was its substantially lower rate of factual inaccuracies (hallucinations) compared to baselines. For correct predictions, ReAct had <1% hallucinations, while CoT had <1% and RB (k=10) had 26%. For incorrect predictions, ReAct had 6% hallucinations, compared to 18% for CoT and 49% for RB (k=10).
  • Discussion Comments' Limited Impact: While some lexical metrics showed minor improvements with discussion comments, semantic metrics remained largely unchanged. The authors attribute this to the inability of models to replicate the diagnostic steps taken by OCEs.
  • Case Study Success: In a practical case study with a Microsoft team, the ReAct agent, equipped with specialized tools (Database Query, KBA Q/A), successfully handled simple incidents, demonstrating its ability to autonomously leverage KBAs and diagnostic services. For more complex incidents, human intervention was still necessary.

Limitations and Future Work

  • Static Dataset Limitations: The evaluation on a static dataset limits the assessment of the agent's ability to dynamically interact with real-time diagnostic services.
  • Simulated RCA Environment Needed: The authors suggest that constructing a simulated RCA environment would be a crucial next step to overcome static dataset limitations and accelerate agent development.
  • Complex Workflows Require Experiential Learning: For incidents requiring long and complex diagnostic sequences, a multi-trial workflow with reflection and long-term memory components is necessary.
  • Tool Usage Nuances: While LLMs are good at general tool use, specialized query languages for diagnostic services require careful error surfacing and potentially fine-tuned models for specific tools.
  • Generalizability: The evaluation was conducted on an internal Microsoft dataset, and its generalizability to other organizations might vary.
  • Budget Constraints: The test set size was limited by budget constraints, which might not fully reflect performance on larger datasets.

Summary updated

BibTeX
@inproceedings{roy2024exploring,
  author = {Devjeet Roy and Xuchao Zhang and Rashi Bhave and Chetan Bansal and Pedro Henrique B. Las-Casas and Rodrigo Fonseca and Saravan Rajmohan},
  title = {{Exploring LLM-Based Agents for Root Cause Analysis}},
  booktitle = {SIGSOFT FSE Companion},
  year = {2024},
  doi = {10.1145/3663529.3663841},
}
Figure