电子学报2025,Vol.53Issue(4):1123-1141,19.DOI:10.12263/DZXB.20240801
基于LLM的日志故障诊断
Log Fault Diagnosis Based on Large Language Models
摘要
Abstract
As the software service systems become increasingly large and complex,log-based fault diagnosis is criti-cal to ensure the reliability of software services.Although existing research in log fault diagnosis methods can identify the type of the fault,they often fails to explain the reasoning process to convince the operation and maintenance personnel,which makes the above method challenging to apply in the production environment.The LogCoT(Log Chain of Thought)is proposed in this paper as a new framework for fault diagnosis based on automatically constructing chain of thought prompting(CoT-Prompting)to address the above issues.The auto-few-shot-CoT(Auto-FSC)algorithm of the two-stage CoT-Prompting engineering extracts semantic information from the large language mode(LLM)table root cause analysis re-ports.In addition,the combination of prompt-tuning with category-unlabelled and preference-tuning with category-labelled is used to optimally align the base model Mistral.Then,the large language model feedback identity preference optimisation(LLMf-IPO)algorithm is used to correct the wrong diagnosis results generated by the base model Mistral to better align the user's intention.Finally,we provide a comprehensive experimental evaluation of LogCoT's performance based on two log datasets collected from the production environment of the top-tier global Internet service provider and a cloud service pro-vider.The experimental results show that LogCoT outperforms the three baseline models in three performance metrics,in-cluding Accuracy,Macro-F1,and Weighted-F1 on two datasets,and outperforms the Accuracy of the best existing model by 31.88 percentage points,10.51 percentage points,respectively.关键词
日志故障诊断/可解释性/大语言模型/提示工程/偏好对齐/思维链Key words
fault diagnosis of log/interpretability/large language model/prompt engineering/preference alignment/chain of thought分类
信息技术与安全科学引用本文复制引用
许婷,肖桐,张圣林,孙一丹,孙永谦,裴丹..基于LLM的日志故障诊断[J].电子学报,2025,53(4):1123-1141,19.基金项目
国家自然科学基金(No.62272249,No.62302244) National Natural Science Foundation of China(No.62272249,No.62302244) (No.62272249,No.62302244)