{"id":939198,"date":"2023-05-16T09:00:00","date_gmt":"2023-05-16T16:00:00","guid":{"rendered":"https:\/\/www.microsoft.com\/en-us\/research\/?p=939198"},"modified":"2023-05-11T10:59:06","modified_gmt":"2023-05-11T17:59:06","slug":"large-language-models-for-automatic-cloud-incident-management","status":"publish","type":"post","link":"https:\/\/www.microsoft.com\/en-us\/research\/blog\/large-language-models-for-automatic-cloud-incident-management\/","title":{"rendered":"Large-language models for automatic cloud incident management"},"content":{"rendered":"\n

This research was accepted by the IEEE\/ACM International Conference on Software Engineering (ICSE) (opens in new tab)<\/span><\/a>, which is a forum for researchers, practitioners, and educators to gather, present, and discuss the most recent innovations, trends, experiences, and issues in the field of software engineering.<\/em><\/p>\n\n\n\n

<\/div>\n\n\n\n

The Microsoft 365 Systems Innovation<\/a> research group has a paper accepted at the 45th<\/sup> International Conference on Software Engineering (ICSE)<\/a>, widely recognized as one of the most prestigious research conferences on software engineering. This paper, Recommending Root-Cause and Mitigation Steps for Cloud Incidents using Large Language Models<\/a>, focuses on using state-of-the-art large language models (LLMs) to help generate recommendations for cloud incident root cause analysis and mitigation plans. With a rigorous study on real production incidents and analysis of several LLMs in different settings using semantic and lexical metrics as well as human evaluation, the research shows the efficacy and future potential of using AI for resolving cloud incidents.<\/p>\n\n\n\n

Challenges of building reliable cloud services<\/h2>\n\n\n\n

Building highly reliable hyperscale cloud services such as Microsoft 365 (M365), which supports the productivity of hundreds of thousands of organizations, is very challenging. This includes the challenge of quickly detecting incidents<\/em>, then performing root cause analysis<\/em> and mitigation<\/em>.<\/p>\n\n\n\n

Our recent research starts with understanding the fundamentals of production incidents: we analyze the life cycle of incidents, then determine the common root causes, mitigations, and engineering efforts for resolution. In a previous paper: How to Fight Production Incidents? An Empirical Study on a Large-scale Cloud Service (opens in new tab)<\/span><\/a>, which won a Best Paper award at SoCC\u201922 (opens in new tab)<\/span><\/a>, we provide a comprehensive, multi-dimensional empirical study of production incidents from Microsoft Teams. From this study, we envision that automation should support incident diagnosis and help identify the root cause and mitigation steps to quickly resolve an incident and minimize customer impact. We should also leverage past lessons to build resilience for future incidents. We posit that adopting AIOps and using state-of-the-art AI\/ML technologies can help achieve both goals, as we show in the ICSE paper.<\/em><\/p>\n\n\n\n

<\/div>\n\n\n\n\t
\n\t\t\n\n\t\t

\n\t\tSpotlight: blog post<\/span>\n\t<\/p>\n\t\n\t

\n\t\t\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\"GraphRAG\n\t\t\t\t<\/a>\n\t\t\t<\/div>\n\t\t\t\n\t\t\t
\n\n\t\t\t\t\t\t\t\t\t

GraphRAG auto-tuning provides rapid adaptation to new domains<\/h2>\n\t\t\t\t\n\t\t\t\t\t\t\t\t

GraphRAG uses LLM-generated knowledge graphs to substantially improve complex Q&A over retrieval-augmented generation (RAG). Discover automatic tuning of GraphRAG for new datasets, making it more accurate and relevant.<\/p>\n\t\t\t\t\n\t\t\t\t\t\t\t\t

\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tRead more\t\t\t\t\t\t<\/a>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t<\/div>\n\t<\/div>\n\t\n\n\n

Adapting large-language models for automated incident management<\/h2>\n\n\n\n

Recent breakthroughs in AI have enabled LLMs to develop a rich understanding of natural language. They can understand and reason over large volumes of data and complete a diverse set of tasks, such as code completion, translation, and Q&A. Given the complexities of incident management, we sought to evaluate the effectiveness of LLMs in analyzing the root cause of production incidents and generating mitigation steps.<\/p>\n\n\n\n

\"A
Figure 1: Leveraging GPT-3.x for root cause analysis and mitigation<\/figcaption><\/figure>\n\n\n\n

In our recently published ICSE paper<\/a>, we demonstrated the usefulness of LLMs for production incident diagnosis <\/strong>for the first time. When an incident ticket is created, the author specifies a title for each incident created and describes any relevant details, such as error messages, anomalous behavior, and other details which might help with resolution. We used the title and the summary of a given incident as the input for LLMs and generated root cause and mitigation steps, as shown in Figure 1.<\/p>\n\n\n\n

We did a rigorous study on more than 40,000 incidents generated from more than 1000 services and compared several LLMs in zero-shot, fine-tuned, and multi-task settings. We find that fine-tuning the GPT-3 and GPT-3.5 models significantly improves the effectiveness of LLMs for incident data.<\/p>\n\n\n\n

Effectiveness of GPT-3.x models at finding root causes<\/h3>\n\n\n\n
Model<\/td>BLEU-4<\/td>ROUGE-L<\/td>METEOR<\/td>BERTScore<\/td>BLEURT<\/td>NUBIA<\/td><\/tr>
Top1<\/td>Top5<\/td>Top1<\/td>Top5<\/td>Top1<\/td>Top5<\/td>Top1<\/td>Top5<\/td>Top1<\/td>Top5<\/td>Top1<\/td>Top5<\/td><\/tr>
RoBERTa<\/td>4.21<\/td>NA<\/td>12.83<\/td>NA<\/td>9.89<\/td>NA<\/td>85.38<\/td>NA<\/td>35.66<\/td>NA<\/td>33.94<\/td>NA<\/td><\/tr>
CodeBERT<\/td>3.38<\/td>NA<\/td>10.17<\/td>NA<\/td>6.58<\/td>NA<\/td>84.88<\/td>NA<\/td>33.19<\/td>NA<\/td>39.05<\/strong><\/td>NA<\/td><\/tr>
Curie<\/td>3.40<\/td>6.29<\/td>19.04<\/td>15.44<\/td>7.21<\/td>13.65<\/td>84.90<\/td>86.36<\/td>32.62<\/td>40.08<\/td>33.52<\/td>49.76<\/td><\/tr>
Codex<\/td>3.44<\/td>6.25<\/td>8.98<\/td>15.51<\/td>7.33<\/td>13.82<\/td>84.85<\/td>86.33<\/td>32.50<\/td>40.11<\/td>33.64<\/td>49.77<\/td><\/tr>
Davinci<\/td>3.34<\/td>5.94<\/td>8.53<\/td>15.10<\/td>6.67<\/td>12.95<\/td>83.13<\/td>84.41<\/td>31.06<\/td>38.61<\/td>35.28<\/td>50.79<\/td><\/tr>
Davinci-002<\/td>4.24<\/strong><\/td>7.15<\/strong><\/td>11.43<\/strong><\/td>17.2<\/strong><\/td>10.42<\/strong><\/td>16.8<\/strong><\/td>85.42<\/strong><\/td>86.78<\/strong><\/td>36.77<\/strong><\/td>42.87<\/strong><\/td>32.3<\/td>51.34<\/strong><\/td><\/tr>
%gain for Davinci-002<\/td>23.26<\/td>13.67<\/td>26.44<\/td>10.90<\/td>42.16<\/td>21.56<\/td>0.61<\/td>0.49<\/td>12.72<\/td>6.88<\/td>-8.45<\/td>1.08<\/td><\/tr><\/tbody><\/table>
Table 1: Lexical and semantic performance of different LLMs<\/center><\/figcaption><\/figure>\n\n\n\n

In our offline evaluation, we compared the performance of GPT-3.5 against three GPT-3 models by computing several semantic and lexical metrics (which measures the text similarity) between the generated recommendations and the ground truth of root cause or mitigation steps mentioned in incident management (IcM) portal. The average <\/em>gains for GPT-3.5 metrics for different tasks were as follows: <\/p>\n\n\n\n

    \n
  1. For root cause and mitigation recommendation tasks, Davinci-002 (GPT-3.5) provided at least 15.38% and 11.9% gains over all the GPT-3 models<\/strong>, respectively, as shown in Table 1.<\/li>\n\n\n\n
  2. When we generated mitigation plans by adding root cause as input to the model, GPT-3.5 model provided at least an 11.16% gain over the GPT-3 models.<\/li>\n\n\n\n
  3. LLMs performed better on machine reported incidents (MRIs) as opposed to customer reported incidents (CRIs), due to the repetitive nature of the MRIs.<\/li>\n\n\n\n
  4. Fine-tuning LLMs with incident data improved performance significantly. A fine-tuned GPT-3.5 model improved the average lexical similarity score by 45.5% for root cause generation and 131.3% for mitigation generation tasks over zero-shot (i.e., inferencing directly on pretrained GPT-3 or GPT-3.5 model) setting.<\/li>\n<\/ol>\n\n\n\n

    Looking through the incident owners\u2019 eyes<\/h3>\n\n\n\n

    In addition to analysis with semantic and lexical metrics, we also interviewed the incident owners to evaluate the effectiveness of the generated recommendations. Overall, GPT-3.5 outperforms GPT-3 in a majority of the metrics. More than 70% of on-call engineers gave a rating of 3 out of 5 or better for the usefulness of recommendations in a real-time production setting.<\/strong><\/p>\n\n\n\n

    Looking forward<\/h2>\n\n\n\n

    With future versions of LLMs coming, we expect the performance for automatic incident resolution will further improve, and the need for fine-tuning may decrease. Yet we are in the initial stage, with many open research questions in this field. For instance, how can we incorporate additional context about the incident, such as discussion entries, logs, service metrics, and even dependency graphs of the impacted services to improve the diagnosis? Another challenge is staleness since the models would need to be frequently retrained with the latest incident data. To solve these challenges, we are working on leveraging the latest LLMs combined with retrieval augmented approaches to improve incident diagnosis via a conversational interface, as shown in Figure 2.<\/p>\n\n\n\n

    \"A
    Figure 2: Workflow of retrieval-augmented root cause analysis<\/figcaption><\/figure>\n\n\n\n

    Moreover, ChatGPT can be actively integrated into the “discussion” of the incident diagnosis. By collecting evidence from available documents and logs, the model can generate coherent, contextual, natural-sounding responses to inquiries and offer corresponding suggestions, thereby facilitating the discussion and accelerating the incident resolution process. We believe this could deliver a step function improvement in the overall incident management process with contextual and meaningful root causes analysis and mitigation, thereby reducing significant human effort required and bolstering reliability and customer satisfaction.<\/em><\/p>\n\n\n\n

    Acknowledgement<\/h3>\n\n\n\n

    This post includes contributions from <\/em>Toufique Ahmed<\/em> (opens in new tab)<\/span><\/a> during his internship at Microsoft.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"

    This research was accepted by the IEEE\/ACM International Conference on Software Engineering (ICSE) (opens in new tab), which is a forum for researchers, practitioners, and educators to gather, present, and discuss the most recent innovations, trends, experiences, and issues in the field of software engineering. The Microsoft 365 Systems Innovation research group has a paper […]<\/p>\n","protected":false},"author":42183,"featured_media":939207,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"msr-url-field":"","msr-podcast-episode":"","msrModifiedDate":"","msrModifiedDateEnabled":false,"ep_exclude_from_search":false,"_classifai_error":"","footnotes":""},"categories":[1],"tags":[],"research-area":[13556,13545,13560],"msr-region":[],"msr-event-type":[],"msr-locale":[268875],"msr-post-option":[243984],"msr-impact-theme":[],"msr-promo-type":[],"msr-podcast-series":[],"class_list":["post-939198","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-research-blog","msr-research-area-artificial-intelligence","msr-research-area-human-language-technologies","msr-research-area-programming-languages-software-engineering","msr-locale-en_us","msr-post-option-blog-homepage-featured"],"msr_event_details":{"start":"","end":"","location":""},"podcast_url":"","podcast_episode":"","msr_research_lab":[199565],"msr_impact_theme":[],"related-publications":[],"related-downloads":[],"related-videos":[],"related-academic-programs":[],"related-groups":[793670,811276],"related-projects":[],"related-events":[],"related-researchers":[{"type":"user_nicename","value":"Rujia Wang","user_id":42549,"display_name":"Rujia Wang","author_link":"Rujia Wang<\/a>","is_active":false,"last_first":"Wang, Rujia","people_section":0,"alias":"rujiawang"},{"type":"user_nicename","value":"Chetan Bansal","user_id":31394,"display_name":"Chetan Bansal","author_link":"Chetan Bansal<\/a>","is_active":false,"last_first":"Bansal, Chetan","people_section":0,"alias":"chetanb"},{"type":"user_nicename","value":"Supriyo GHOSH","user_id":41179,"display_name":"Supriyo GHOSH","author_link":"Supriyo GHOSH<\/a>","is_active":false,"last_first":"GHOSH, Supriyo","people_section":0,"alias":"supriyoghosh"},{"type":"user_nicename","value":"Xuchao Zhang","user_id":42045,"display_name":"Xuchao Zhang","author_link":"Xuchao Zhang<\/a>","is_active":false,"last_first":"Zhang, Xuchao","people_section":0,"alias":"xuchaozhang"},{"type":"user_nicename","value":"Saravan Rajmohan","user_id":41039,"display_name":"Saravan Rajmohan","author_link":"Saravan Rajmohan<\/a>","is_active":false,"last_first":"Rajmohan, Saravan","people_section":0,"alias":"saravar"}],"msr_type":"Post","featured_image_thumbnail":"\"asdf\"","byline":"","formattedDate":"May 16, 2023","formattedExcerpt":"This research was accepted by the IEEE\/ACM International Conference on Software Engineering (ICSE) (opens in new tab), which is a forum for researchers, practitioners, and educators to gather, present, and discuss the most recent innovations, trends, experiences, and issues in the field of software engineering.…","locale":{"slug":"en_us","name":"English","native":"","english":"English"},"_links":{"self":[{"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/posts\/939198"}],"collection":[{"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/users\/42183"}],"replies":[{"embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/comments?post=939198"}],"version-history":[{"count":25,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/posts\/939198\/revisions"}],"predecessor-version":[{"id":940383,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/posts\/939198\/revisions\/940383"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/media\/939207"}],"wp:attachment":[{"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/media?parent=939198"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/categories?post=939198"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/tags?post=939198"},{"taxonomy":"msr-research-area","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/research-area?post=939198"},{"taxonomy":"msr-region","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-region?post=939198"},{"taxonomy":"msr-event-type","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-event-type?post=939198"},{"taxonomy":"msr-locale","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-locale?post=939198"},{"taxonomy":"msr-post-option","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-post-option?post=939198"},{"taxonomy":"msr-impact-theme","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-impact-theme?post=939198"},{"taxonomy":"msr-promo-type","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-promo-type?post=939198"},{"taxonomy":"msr-podcast-series","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/research\/wp-json\/wp\/v2\/msr-podcast-series?post=939198"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}