TL;DR
This paper introduces RCAgent, a novel framework that empowers Large Language Models (LLMs) to autonomously perform complex cloud root cause analysis (RCA) tasks. By augmenting LLMs with tools and a sophisticated prompting strategy, RCAgent achieves superior performance in identifying issues, predicting solutions, and even assigning responsibility, all while prioritizing data privacy by using internally deployed models.
What Problem Does This Paper Address?
Cloud computing systems are increasingly complex, leading to frequent anomalies that significantly impact user experience and can violate service level agreements. Root Cause Analysis (RCA) is crucial for maintaining reliability, but traditional methods and even existing AI for Operations (AIOps) approaches struggle with challenges like poor data quality, shifting data distributions, laborious manual annotation, and limited generalization. While Large Language Models (LLMs) show promise for complex reasoning tasks, their application in industrial RCA is hindered by reliance on manual workflows, limited decision-making capabilities, and privacy concerns associated with sending sensitive data to external APIs. Existing LLM-based RCA solutions often require extensive fine-tuning or struggle to interact with the dynamic cloud environment.
Methods
RCAgent is built upon a tool-augmented autonomous agent paradigm, extending the ReAct framework. Key innovations include:
- Privacy-Aware Internal Deployment: RCAgent utilizes internally deployed LLMs (specifically, Vicuna-13B-V1.5-16K) rather than external APIs like GPT, addressing critical data privacy concerns for industrial use.
- Tool Augmentation: LLMs are equipped with "information-gathering tools" (e.g., data querying functions) and "analytical tools" (LLM-based expert agents for code and log analysis). These tools abstract away complex interactions with cloud systems.
- Observation Management (OBSK): To combat the context length limitations of LLMs, RCAgent employs an "Observation Snapshot Key" (OBSK) method. This technique provides only the head of an observation to the LLM, storing the full observation in a key-value store accessible via a snapshot key. This allows for efficient retrieval of necessary information without overwhelming the LLM's context window.
- Stabilization Techniques:
- JSON Repairing (JsonRegen): A method to ensure structured data interchange (JSON) by sanitizing input and iteratively regenerating output if parsing fails.
- Error Handling: RCAgent provides error messages and suggestions to the controller agent for issues like duplicate tool invocations or trivial inputs, reducing meaningless actions.
- Self-Consistency Aggregation: To improve robustness and performance, RCAgent uses self-consistency methods:
- Trajectory-level Self-Consistency (TSC): A novel approach that samples multiple action trajectories only when the agent is nearing finalization, balancing thoroughness with computational efficiency. This is applied to tool-using trajectories.
- Self-Consistency for Text Data: Utilizes embedding-based voting and LLM aggregation for text outputs.
- Enhanced Prompting Framework: RCAgent uses a structured prompting cycle that includes framework rules, task requirements, and tool documentation, guiding the LLM's reasoning and action generation.
Datasets
The paper uses a dataset of approximately 5,000 non-trivial anomalous jobs collected from Alibaba Cloud's Real-time Compute Platform over one month. This dataset was filtered from 15,616 anomalous jobs (unrecoverable failures or jobs failing to start within 6 minutes). The final offline dataset for evaluation consists of 161 jobs, balanced to ensure no more than two jobs share the same root cause. Annotations include root cause, solution, evidence, and responsibility determination, derived from the Flink Advisor knowledge base and refined by SRE teams. Data sources for information-gathering tools include logs (platform, runtime, infrastructure), advisor service history databases, and advisor service code repositories.
Key Insights and Ideas
- LLMs as Autonomous RCA Agents are Feasible and Effective: The core insight is that LLMs, when properly augmented with tools and a robust framework, can move beyond being mere analytical tools to become autonomous agents capable of complex, real-world RCA.
- Privacy is Paramount for Industrial LLM Adoption: The decision to use internally deployed models instead of external APIs like ChatGPT is a critical enabler for practical industrial adoption, directly addressing a major barrier.
- Context Management is Key for LLM Agents: The OBSK method demonstrates a practical and effective way to handle the vast amounts of data in cloud systems without sacrificing crucial information, a significant challenge for LLM-based agents.
- Stabilization is Crucial for Reliability: Techniques like JsonRegen and error handling are not just optimizations but necessities for ensuring the reliable operation of autonomous agents in noisy, real-world environments.
- Trajectory-level Self-Consistency Offers a Sweet Spot: TSC provides a way to leverage the benefits of self-consistency for complex action sequences without the prohibitive computational cost of full-process sampling, striking a practical balance.
- Semantically Minimalist Tools are Essential for Locally Hosted LLMs: The ablation study highlights that providing LLMs with overly complex tools (like SQL interfaces) can lead to poor performance, emphasizing the need for simplified interfaces when using less powerful, locally deployed models.
Key Results
- Superior Performance: RCAgent consistently outperforms the baseline ReAct framework across various metrics (METEOR, NUBIA, BLEURT, BARTScore, G-Correctness) for root cause prediction, solution generation, and evidence prediction. For example, RCAgent achieved a +8.71 METEOR improvement over ReAct in root cause prediction.
- TSC Enhancement: The Trajectory-level Self-Consistency (TSC) further boosts performance, particularly in solution generation, with gains of +3.51 METEOR and +4.50 BLEURT.
- High Stability: RCAgent achieves a 99.38% Pass Rate and only a 7.93% Invalid Rate, demonstrating remarkable stability compared to ReAct (86.33% Pass Rate, 40% Invalid Rate).
- Practical Deployment: RCAgent has been integrated into Alibaba Cloud's Real-time Compute Platform for Apache Flink, aiding in the diagnosis of anomalous jobs that existing automated tools cannot handle.
- Human Evaluation: Human evaluators rated RCAgent with an H-Helpfulness score of 2.92 (on a 0-5 scale), indicating moderate support, and RCAgent with TSC achieved a responsibility precision of 82.06%.
Limitations and Future Work
- LLM Capabilities: While RCAgent significantly improves upon existing methods, the performance is still limited by the capabilities of the underlying LLM, especially when dealing with novel or highly complex anomalies.
- Computational Cost: Although TSC aims to optimize self-consistency, the computational resources required for LLM inference and tool execution can still be substantial, especially with increasing data scales.
- Future Work: The authors suggest exploring more advanced LLM aggregation methods, further enhancing the toolset, and investigating more sophisticated self-consistency strategies. The practical application in Alibaba Cloud also opens avenues for continuous improvement based on real-world feedback.
Summary updated