TL;DR
KRCA is an end-to-end Root Cause Analysis (RCA) system designed for hyper-scale microservice environments that combines API-level drilldown, structured causal skeletons, and a memory-augmented multi-agent LLM framework. Successfully deployed at Kuaishou, it slashes average incident diagnosis time by 77.3% while outperforming the strongest LLM baselines by over 31% in accuracy.
What Problem Does This Paper Address?
Modern internet companies rely on hyper-scale microservice architectures containing hundreds of thousands of loosely coupled services. Managing these systems is an operational nightmare for Site Reliability Engineers (SREs). When a failure occurs, it quickly propagates through complex dependency chains, triggering a cascade of alerts across thousands of downstream services and metrics.
Existing RCA methods fall short under two main dimensions:
- Extreme Dynamism: Microservices change constantly across independent team deployment cycles. Deep learning-based RCA models require frequent, time-consuming retraining, making them impractical for real-time deployment.
- Massive Scale: Traditional statistical causal discovery algorithms (like Peter-Clark or Granger causality) degrade rapidly in accuracy and become computationally prohibitive when dealing with hundreds of metrics. Meanwhile, naive Large Language Model (LLM) approaches suffer from the "Lost in the Middle" dilemma, hallucinating false causal relationships when overwhelmed by massive, noisy context windows.
Methods
KRCA addresses these challenges using a progressive, multi-stage diagnosis pipeline that systematically narrows down the search space before introducing LLM reasoning.
- API-Level Drilldown: Instead of analyzing coarse service-level metrics, KRCA starts directly at the alerting API. It recursively traverses the downstream dependency graph using a robust scoring function that combines failure rate synchronization (via Pearson correlation) and a composite latency score. This prunes irrelevant paths and isolates a compact set of top-$N$ suspicious services.
- Skeleton-Based Causal Graph Instantiation: For each suspicious service, KRCA bypasses slow statistical algorithms. Instead, it uses an anomaly detection blend (Isolation Forest + PatternMatcher) and maps anomalous metrics onto a predefined, high-recall causal skeleton graph. This skeleton categorizes metrics into four meta-types: External factors (E), Internal resources (I), Dependencies (D), and KPIs (K).
- Memory-Augmented Multi-Agent Collaboration: KRCA employs a master-slave multi-agent framework. A Main Agent coordinates a pool of domain-specific Sub Agents (e.g., Traffic, CPU, or Database Experts). These agents execute parallel tool calls to verify fine-grained causality, prune spurious edges, and uncover implicit links. This reasoning is supported by a three-tiered memory system (Working, Factual, and Experiential) that uses Retrieval-Augmented Generation (RAG) to pull insights from historical failures.
Datasets
The authors evaluated KRCA using a real-world production dataset collected from Kuaishou's internal monitoring platform, Tianwen.
- The Dataset: Contains 300 system-related failures sampled between October 2025 and March 2026.
- Coverage: Spans multiple major business lines (Short Video, E-commerce, Algorithms) and encompasses nine classical failure types (e.g., abnormal traffic, CPU/GPU saturation, and MySQL slow queries).
- Ground Truth: Labeled by a dedicated annotation team of five SREs, each possessing over five years of operational experience.
Key Insights and Ideas
- API-Level Granularity is Mandatory: Service-level metrics aggregate multiple APIs, which often masks severe degradation in low-traffic but critical APIs. High-traffic APIs dominate the aggregated metrics, hiding the true root cause.
- Structure Constraints Tame LLM Hallucinations: As the number of anomalous metrics grows, unconstrained LLMs become overconfident and hallucinate non-existent causal links. Providing a structured, skeleton-based causal prior keeps the LLM robust and accurate (as empirically shown in the paper's baseline studies).
- Progressive Context Disclosure Builds Trust: KRCA provides SREs with immediate link topology visualizations (< 5s) and anomaly detection results (< 10s) before delivering the final comprehensive LLM failure report (< 3 mins). This staged approach gives engineers actionable insights quickly during high-pressure incidents.
Key Results
KRCA was evaluated against prominent agent frameworks (CoT, ReAct, Reflexion, and RCA-Agent) using Top-$k$ Accuracy (AC@k).
- Diagnostic Accuracy: KRCA achieved an AC@1 of 0.88 for root cause service localization and 0.79 for failure type classification, outperforming the strongest baseline (RCA-Agent) by absolute gains of 31% and 32%, respectively.
- Production Impact: Deployed at Kuaishou for over six months, KRCA handles more than 2,000 alerts per day. It successfully reduced the average manual diagnosis time from 52 minutes down to 11.8 minutes—a 77.3% reduction in Mean Time to Recovery (MTTR).
Limitations and Future Work
The authors noted two primary limitations currently facing KRCA:
- Observability Gaps: If critical downstream services lack essential observability signals (like availability metrics), the API-level drilldown process can terminate prematurely, missing the root cause.
- Simultaneous Cascading Failures: When multiple independent cascading anomalies occur at the exact same time, separating the true propagation path from correlated background noise remains highly challenging.
Future work will likely focus on improving robustness against missing telemetry and refining multi-root cause isolation techniques.
Summary updated