基于大语言模型的AWS无服务器计算错误配置检测
LLM-Based Misconfiguration Detection for AWS Serverless Computing
AI总结:
针对无服务器应用配置复杂、传统数据驱动错误配置检测效果差的问题,提出基于大语言模型的SlsDetector框架,通过提示工程、多维度约束和思维链提升检测效果,在110个配置文件的数据集上性能显著优于现有方法,且泛化性良好。
摘要:
无服务器计算是一种新兴的云计算范式,支持开发者以函数为粒度构建应用,这类应用被称为无服务器应用。作为该领域的头部服务商,亚马逊云科技(Amazon Web Services, AWS)提供了无服务器应用模型(AWS Serverless Application Model, AWS SAM)——这是目前应用最广泛的配置模式,用于通过指定文件配置和管理无服务器应用。然而,错误配置是无服务器开发中的一大突出挑战。传统数据驱动技术在无服务器应用场景下往往效果不佳:一方面无服务器配置的复杂性会阻碍模式识别,另一方面也难以收集覆盖所有可能配置的完整数据集。大语言模型(LLM)在预训练阶段利用了海量公开数据,有潜力辅助识别并解释无服务器应用中的错误配置。\n本文提出了SlsDetector——首个利用大语言模型检测无服务器应用错误配置的框架。SlsDetector采用有效的提示工程结合零样本学习来识别配置问题,它针对无服务器应用的配置特点设计了多维度约束,并利用思维链(Chain of Thought)技术增强大语言模型的推理能力。我们在一个包含110个配置文件的精心整理的数据集上评估了SlsDetector的性能。结果显示,基于ChatGPT-4o的SlsDetector准确率达72.88%,召回率达88.18%,F1值达79.75%,分别比当前最优的数据驱动方法高出53.82、17.40和49.72个百分点。此外,我们通过接入Llama 3.1 (405B) Instruct Turbo和Gemini 1.5 Pro等近期的大语言模型,验证了SlsDetector的泛化能力,结果表明该框架在这些模型上均能保持稳定的高效能。
英文摘要:
Serverless computing is an emerging cloud computing paradigm that enables developers to build applications at the function level, known as serverless applications. Amazon Web Services (AWS), the leading provider in this domain, provides the Serverless Application Model (AWS SAM), the most widely adopted configuration schema for configuring and managing serverless applications through a specified file. However, misconfigurations pose a significant challenge in serverless development. Traditional data-driven techniques may struggle with serverless applications because the complexity of serverless configurations hinders pattern recognition, and it is challenging to gather complete datasets that cover all possible configurations. Leveraging vast amounts of publicly available data during pre-training, LLMs can have the potential to assist in identifying and explaining misconfigurations in serverless applications. In this paper, we introduce SlsDetector, the first framework leveraging LLMs to detect misconfigurations in serverless applications. SlsDetector utilizes effective prompt engineering with zero-shot learning to identify configuration issues. It designs multi-dimensional constraints specifically tailored to the configuration characteristics of serverless applications and leverages the Chain of Thought technique to enhance LLMs inferences. We evaluate SlsDetector on a curated dataset of 110 configuration files. Our results show that SlsDetector, based on ChatGPT-4o, achieves a precision of 72.88%, recall of 88.18%, and F1-score of 79.75%, outperforming state-of-the-art data-driven approaches by 53.82, 17.40, and 49.72 percentage points, respectively. Furthermore, we investigate the generalization capability of SlsDetector by applying recent LLMs, including Llama 3.1 (405B) Instruct Turbo and Gemini 1.5 Pro, with results showing consistently high effectiveness across these models.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。