Abstract
Root Cause Analysis (RCA) plays a pivotal role in the incident diagnosis process for cloud services, requiring on-call engineers to identify the primary issues and implement corrective actions to prevent future recurrences. Improving the incident RCA process is vital for minimizing service downtime, customer impact and manual toil. Recent advances in artificial intelligence have introduced state-of-the-art Large Language Models (LLMs) like GPT-4, which have proven effective in tackling various AIOps problems, ranging from code authoring to incident management. Nonetheless, the GPT-4 model's immense size presents challenges when trying to fine-tune it on user data because of the significant GPU resource demand and the necessity for continuous model fine-tuning with the emergence of new data. To address the high cost of fine-tuning LLM, we propose an in-context learning approach for automated root causing, which eliminates the need for fine-tuning. We conduct extensive study over 100,000 production incidents, comparing several large language models using multiple metrics. The results reveal that our in-context learning approach outperforms the previous fine-tuned large language models such as GPT-3 by an average of 24.8% across all metrics, with an impressive 49.7% improvement over the zero-shot model. Moreover, human evaluation involving actual incident owners demonstrates its superiority over the fine-tuned model, achieving a 43.5% improvement in correctness and an 8.7% enhancement in readability. The impressive results demonstrate the viability of utilizing a vanilla GPT model for the RCA task, thereby avoiding the high computational and maintenance costs associated with a fine-tuned model.
Introduction
When a major cloud service goes down, "on-call" engineers must perform Root Cause Analysis (RCA) to identify what went wrong and how to fix it. In modern, hyper-scale cloud environments, this is a "needle in a haystack" problem involving massive logs and complex dependencies. While Large Language Models (LLMs) are great at processing text, applying them to RCA faces three major hurdles: the high cost of fine-tuning, data staleness in rapidly changing cloud environments, and the risk of hallucinations where models "remember" past incidents incorrectly.
Methods
To overcome these challenges, we propose an In-Context Learning (ICL) framework that treats the LLM as a "vanilla" reasoning engine, feeding it the necessary domain knowledge on the fly. The pipeline consists of four main stages:
- Data Cleaning & Summarization: Raw incident reports are condensed using GPT-3.5-turbo into 5–6 sentence summaries that capture core symptoms.
- Retrieval Indexing: Summaries are converted into mathematical vectors using a Sentence Transformer and stored in a FAISS database.
- In-Context Retrieval: When a new incident occurs, the system searches for the $k$ most semantically similar historical incidents.
- Prompt Engineering: The final prompt sent to GPT-4 includes a task description, the retrieved historical examples (acting as "demonstrations"), and the details of the current incident.
This approach allows the model to "learn" the specific patterns of the cloud environment from the examples provided in the prompt, rather than relying on internal weights from a training phase.
Experimental Setup
The study utilized a massive, real-world dataset from Microsoft consisting of 101,308 production incidents spanning January 2021 to September 2022. The dataset covers over 1,000 different cloud services. We compared our GPT-4 ICL approach against fine-tuned versions of GPT-3, CodeGen, OPT, and Bloom.
Key Results
Our quantitative analysis shows that the GPT-4 ICL approach outperformed the fine-tuned GPT-3 baseline by an average of 24.8% across lexical and semantic metrics. Notably, moving from zero-shot (no examples) to 20-shot learning improved GPT-4's performance by 49.7%.
In a blind study with actual incident owners, the ICL approach achieved a 43.5% improvement in correctness and an 8.7% improvement in readability over the fine-tuned model. These results suggest that for rapidly changing domains like AIOps, retrieval of relevant context is more valuable than model memorization via fine-tuning.
Discussion and Future Work
While highly effective, the system relies on historical similarity. If a completely novel "Black Swan" bug occurs, the retriever may provide irrelevant examples. Furthermore, the current system does not account for the age of an incident, which may lead to retrieving outdated root causes. Future work will explore integrating "online" diagnostic tools, such as live log queries, directly into the LLM's reasoning loop to enable real-time causal reasoning.
Summary updated