Empowering Practical Root Cause Analysis by Large Language Models for Cloud Incidents

Yinfang Chen, Huaibing Xie, Minghua Ma, Yu Kang, Xin Gao, Liu Shi, Yunjie Cao, Xuedong Gao, Hao Fan, Ming Wen, Jun Zeng, Supriyo Ghosh, Xuchao Zhang, Chaoyun Zhang, Qingwei Lin, Saravan Rajmohan, Dongmei Zhang · DOI

Abstract

Cloud service disruptions require rapid Root Cause Analysis (RCA), yet on-call engineers (OCEs) often struggle with the "information spectrum" problem—either too little data or an overwhelming volume of logs. This paper presents RCACopilot, an automated system that leverages Large Language Models (LLMs) to diagnose cloud incidents. RCACopilot utilizes specialized "incident handlers" for structured data collection and GPT-4 for root cause categorization and explanation. Evaluation on a year of real-world Microsoft incident data demonstrates a Micro-F1 score of 0.766, significantly surpassing traditional machine learning baselines.

Introduction

As cloud computing scales, identifying the root cause of service disruptions becomes increasingly complex. On-call engineers must navigate a sea of logs, metrics, and traces under intense time pressure. Traditional Troubleshooting Guides (TSGs) are often manual, stale, or incomplete, failing to address the "long-tail" of unique failures. RCACopilot addresses these challenges by automating both diagnostic data collection and high-level reasoning.

System Architecture

RCACopilot operates in two primary stages: the Collection Stage and the Prediction Stage.

Overview of the RCACopilot architecture, illustrating the end-to-end flow from an incoming incident to root cause prediction.
  1. Diagnostic Information Collection: To avoid noise, the system uses "Incident Handlers"—automated workflows triggered by specific alerts. These handlers perform targeted actions, such as querying specific databases or narrowing the investigation scope, to provide a clean, relevant data snapshot.
  2. Root Cause Prediction: The collected data is first summarized by an LLM to fit context windows. Then, a Retrieval-Augmented Generation (RAG) approach is used to find similar historical incidents. Finally, Chain-of-Thought (CoT) prompting guides the LLM to provide a categorized root cause and a detailed explanation.

Temporal-Aware Retrieval

A key innovation in RCACopilot is its similarity formula for RAG, which incorporates temporal distance. Analysis of real-world data reveals that 93.8% of recurring incidents occur within 20 days of each other.

Probability distribution of time intervals between recurring incidents, highlighting the short-term recurrence pattern.

By weighting recent incidents more heavily, the system provides more relevant demonstrations to the LLM, enhancing its reasoning accuracy for current issues.

Experimental Evaluation

The system was evaluated using a dataset of 653 incidents from Microsoft’s "Transport" service over one year.

  • Performance: RCACopilot achieved a Micro-F1 score of 0.766, vastly outperforming traditional classifiers like XGBoost and FastText, which failed to reach a 0.10 F1 score on the same imbalanced dataset.
  • Efficiency: The prediction module executes in approximately 4.2 seconds, providing near-instantaneous support to OCEs.
  • Generalization: The system successfully identified "unseen" incident categories, such as new I/O bottlenecks, demonstrating reasoning capabilities beyond fixed-label classifiers.

Conclusion

RCACopilot demonstrates the viability of using LLMs for practical, automated RCA in large-scale cloud environments. By combining structured automated data collection with the reasoning power of GPT-4 and temporal-aware retrieval, the system provides accurate, explainable diagnoses that significantly reduce the burden on human engineers. Future work will explore "closed-loop" mitigation strategies to further automate incident resolution.

Summary updated

BibTeX
@inproceedings{chen2024empowering,
  author = {Yinfang Chen and Huaibing Xie and Minghua Ma and Yu Kang and Xin Gao and Liu Shi and Yunjie Cao and Xuedong Gao and Hao Fan and Ming Wen and Jun Zeng and Supriyo Ghosh and Xuchao Zhang and Chaoyun Zhang and Qingwei Lin and Saravan Rajmohan and Dongmei Zhang},
  title = {{Empowering Practical Root Cause Analysis by Large Language Models for Cloud Incidents}},
  booktitle = {EuroSys},
  year = {2024},
  doi = {10.1145/3627703.3629553},
}
Figure