---
title: "Leveraging AI for efficient incident response"
description: "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."
url: "https://swe.quest/articles/leveraging-ai-for-efficient-incident-response-c0ed9d554ec34552"
canonical: "https://engineering.fb.com/2024/06/24/data-infrastructure/leveraging-ai-for-efficient-incident-response/"
source: "Meta Engineering"
published: "2024-06-24"
difficulty: "medium"
kind: "Case study"
reading_minutes: 5
tags: ["incident-response","llms","model-training","debugging"]
---

# Leveraging AI for efficient incident response

A post on [Meta Engineering](https://swe.quest/sources/meta.md), published 2024-06-24, 5 min read, Case study. Original: [https://engineering.fb.com/2024/06/24/data-infrastructure/leveraging-ai-for-efficient-incident-response/](https://engineering.fb.com/2024/06/24/data-infrastructure/leveraging-ai-for-efficient-incident-response/)

## Summary

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.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Incidents & postmortems](https://swe.quest/tags/incident-response.md) (Reliability & operations)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)
- [Model training](https://swe.quest/tags/model-training.md) (AI & ML)
- [Debugging](https://swe.quest/tags/debugging.md) (Engineering practices)

## Prerequisites

- LLM fine-tuning basics ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))
- incident investigation workflows ([easy posts on Incidents & postmortems](https://swe.quest/tags/incident-response.md?difficulty=easy))

## Keywords

Llama 2, Meta, Hawkeye, supervised fine-tuning, continued pre-training

## Related posts

- [Detecting malicious pull requests at scale with LLMs](https://swe.quest/articles/detecting-malicious-pull-requests-at-scale-with-llms-18b7d45442154d44.md): Datadog Engineering · 2025-10-21 · Medium · 12 min read · Supply chain security, Threat detection, LLMs, Code review, Evaluation
  Datadog'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.
- [DrP: Meta’s Root Cause Analysis Platform at Scale](https://swe.quest/articles/drp-meta-s-root-cause-analysis-platform-at-scale-0643de72e5c8817c.md): Meta Engineering · 2025-12-19 · Easy · 5 min read · Incidents & postmortems, SRE, Observability, Developer tools
  DrP 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.
- [From single pull requests to full software packages: Detecting malicious code at scale](https://swe.quest/articles/from-single-pull-requests-to-full-software-packages-detecting-malicious-code-at-717a58a001a046a1.md): Datadog Engineering · 2026-06-02 · Medium · 12 min read · Supply chain security, Threat detection, AI agents, LLMs, Cost optimization
  Datadog 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.
- [Can LLMs replace on call SREs today?](https://swe.quest/articles/can-llms-replace-on-call-sres-today-892e82a344776e7f.md): ClickHouse · 2025-08-14 · Medium · 57 min read · SRE, Observability, LLMs, AI agents, Evaluation
  LLMs were tested on autonomous root cause analysis of production incidents and fell short of replacing on-call SREs.
- [Your AI SRE needs better observability, not bigger models.](https://swe.quest/articles/your-ai-sre-needs-better-observability-not-bigger-models-2fd1d44f22e0b806.md): ClickHouse · 2026-01-01 · Medium · 20 min read · Observability, AI agents, Analytics & OLAP, Incidents & postmortems, SRE
  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.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
