提示用于自动日志模板提取
Prompting for Automatic Log Template Extraction
AI总结:
本文提出 DivLog 框架,利用 LLM 的上下文学习能力,通过多样性候选选择和示例提示实现免训练日志模板提取,并在16个公共数据集上取得最先进性能。
摘要:
日志解析涉及从半结构化日志中提取日志模板以生成结构化日志,是自动化日志分析中首要且最关键的一步。然而,当前日志解析器的有效性受限,原因有两点。首先,传统的数据驱动日志解析器仅依赖领域专家设计的启发式规则或手工特征,这在来自不同系统的日志上可能无法始终保持良好性能。其次,现有监督式日志解析器需要模型调优,通常局限于固定训练样本,并导致在整个日志来源上的性能次优。为解决这一局限,我们提出 DivLog,这是一个基于大型语言模型(LLM)上下文学习(ICL)能力的有效日志解析框架。具体而言,在日志解析之前,DivLog 通过最大化离线日志的多样性,采样少量离线日志作为候选。随后,在日志解析期间,DivLog 为每条目标日志选择五个合适的带标注候选作为示例,并将其构造成提示。通过挖掘提示中示例的语义,DivLog 以免训练的方式生成目标日志模板。此外,我们设计了一种简单而有效的提示格式,用于提取输出并提升所生成日志模板的质量。我们在16个广泛使用的公共数据集上进行了实验。结果表明,DivLog 平均达到(1)98.1%的解析准确率、(2)92.1%的精确模板准确率和(3)92.9%的召回模板准确率,展现出最先进的性能。
英文摘要:
Log parsing, which involves log template extraction from semi-structured logs to produce structured logs, is the first and the most critical step in automated log analysis. However, current log parsers suffer from limited effectiveness for two reasons. First, traditional data-driven log parsers solely rely on heuristics or handcrafted features designed by domain experts, which may not consistently perform well on logs from diverse systems. Second, existing supervised log parsers require model tuning, which is often limited to fixed training samples and causes sub-optimal performance across the entire log source. To address this limitation, we propose DivLog, an effective log parsing framework based on the in-context learning (ICL) ability of large language models (LLMs). Specifically, before log parsing, DivLog samples a small amount of offline logs as candidates by maximizing their diversity. Then, during log parsing, DivLog selects five appropriate labeled candidates as examples for each target log and constructs them into a prompt. By mining the semantics of examples in the prompt, DivLog generates a target log template in a training-free manner. In addition, we design a straightforward yet effective prompt format to extract the output and enhance the quality of the generated log templates. We conducted experiments on 16 widely-used public datasets. The results show that DivLog achieves (1) 98.1% Parsing Accuracy, (2) 92.1% Precision Template Accuracy, and (3) 92.9% Recall Template Accuracy on average, exhibiting state-of-the-art performance.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。