Leveraging AI for efficient incident response
Meta's AI-assisted root cause analysis system narrows suspect code changes in its web monorepo by combining a heuristic retriever with a fine-tuned Llama 2 (7B) ranker. The retriever uses signals such as code and directory ownership and the runtime code graph to cut thousands of changes down to a few hundred. The ranker then runs an 'election': each prompt holds up to 20 changes and picks the top five, and results are aggregated and repeated until five candidates remain. Backtesting shows the root cause lands in the top five for 42% of investigations at creation time. The biggest gain came from continued pre-training on internal artifacts plus supervised fine-tuning on about 5,000 historical RCA examples, including logprob-ranked list outputs, while confidence thresholds suppress low-confidence suggestions in favor of precision.
Related posts
- Detecting malicious pull requests at scale with LLMs
Datadog Engineering mediumAdeptDatadog's SDLC Security team built BewAIre, an LLM-based reviewer that classifies the diff of every merged PR (nearly 10,000 a week) as benign or malicious, with a written rationale emitted as a security signal for real-time triage. Large diffs are recursively chunked at file markers, then newlines, then midpoints, and the most severe chunk verdict wins, with depth and chunk limits to bound cost. A hand-curated, weekly-updated dataset of real and simulated attacks, prompt-level false-positive exclusions, balanced accuracy as the metric, shadow-mode triage and red teaming cut false positives from over 10% to 0.03%. On the curated set it reached over 99.3% accuracy and caught the tj-actions and Nx s1ngularity malicious commits.
- DrP: Meta’s Root Cause Analysis Platform at Scale
Meta Engineering easyNoviceDrP is Meta's root cause analysis platform that lets engineers codify incident investigation playbooks as "analyzers" using an SDK with helpers for anomaly detection, event isolation, time series correlation and dimension analysis. Analyzers are backtested in code review, chained across dependent services, auto-triggered by alerts, and run on a multi-tenant backend with a request queue and worker pool. A post-processing system annotates alerts and can open tasks or pull requests for mitigation. Used by 300+ teams with 2,000 analyzers running 50,000 analyses daily, DrP has cut MTTR by 20-80%.
- From single pull requests to full software packages: Detecting malicious code at scale
Datadog Engineering mediumAdeptDatadog extended BewAIre, its LLM-based malicious code detector, from pull requests to full dependency packages by stacking a cheap filter model in front of an agentic investigation model. The agent uses GitHub APIs, osv.dev and SCA to check context such as author history and reverted commits. On 690 test diffs the two-stage design raised accuracy from 97.4% to 99.86% by cutting false positives from 17 to 0, and static typosquat-domain checks cover gaps in the filter. For large packages, giving the agent a codemap plus an on-demand ReadFile tool beat both forwarding the flagged chunk and rechunking, reaching 95.2% end-to-end accuracy with no runtime errors. Projected costs are about $0.025 per median package and $0.072 at p90, and a crawler polls npm and PyPI every 10 minutes, caching verdicts by hash and diffing against the previous version.
- Can LLMs replace on call SREs today?
ClickHouse mediumAdept
LLMs were tested on autonomous root cause analysis of production incidents and fell short of replacing on-call SREs. ClickHouse gave Claude Sonnet 4, OpenAI o3, GPT-4.1 and Gemini 2.5 Pro (plus GPT-5) access to OpenTelemetry demo telemetry stored in ClickHouse via an MCP server and LibreChat, injected four anomalies with feature flags (payment failures for gold-tier users, a recommendation cache memory leak, a product catalog error and a payment cache leak), and compared each model against a manual ClickStack investigation on accuracy, guidance needed, token usage and time. Some models found simple root causes from a naive prompt, while others chased irrelevant latency signals or needed explicit hints. The recommendation is to use LLMs as assistants for summarizing, drafting updates and suggesting next steps, with engineers in control and backed by a fast, searchable observability stack.
- Your AI SRE needs better observability, not bigger models.
ClickHouse mediumAdept
AI SRE copilots fail at root cause analysis mainly because of their data, not their models: legacy inverted-index observability stacks keep only 7-14 days of logs, drop high-cardinality fields like request and user IDs, answer queries slowly, and often charge per query. ClickHouse's own tests found an agent issues 6-27 queries per investigation and that even GPT-5 could not reliably find root causes without better context. The proposed fix is a columnar OLAP substrate with months of full-fidelity telemetry, sparse primary indexes, fast vectorized queries and standard SQL that LLMs already know. The reference architecture adds OpenTelemetry ingestion, logs, metrics and traces in MergeTree tables, and context tables for deployments and feature flags, with humans approving every action instead of auto-remediation.