VarParser: 解锁变量在基于大语言模型的日志解析中的被忽视的力量
VarParser: Unleashing the Neglected Power of Variables for LLM-based Log Parsing
AI总结:
VarParser通过变量中心策略提升日志解析效率,减少LLM调用成本,保留变量信息增强结果完整性。
摘要:
日志是工程师诊断大规模在线服务系统故障的主要信息来源。日志解析,即从大量无结构日志数据中提取结构化事件,是后续任务如异常检测和故障诊断的关键第一步。随着大语言模型(LLMs)的发展,利用其强大的文本理解能力已证明在准确日志解析中是有效的。然而,现有的基于LLM的日志解析器都专注于日志的常量部分,忽略了变量部分对日志解析的潜在贡献。这种以常量为中心的策略带来了四个关键问题。首先,仅使用常量信息导致日志分组和采样效率低下。其次,由于基于常量的缓存,导致大量的LLM调用,从而导致日志解析的准确性和效率较低。第三,由于提示中消耗了大量的常量标记,导致LLM调用成本较高。最后,这些方法只保留占位符,丢失了日志中变量信息带来的系统可见性。面对这些问题,我们提出了一种以变量为中心的日志解析策略,名为VarParser。通过变量贡献采样、变量为中心的解析缓存和自适应变量感知的上下文学习,我们的方法可以高效地捕捉日志的变量部分,并利用它们对解析的贡献。通过引入变量单元,我们保留了丰富的变量信息,增强了日志解析结果的完整性。在大规模数据集上的广泛评估表明,VarParser在准确性上优于现有方法,显著提高了解析效率,同时降低了LLM调用成本。
英文摘要:
Logs serve as a primary source of information for engineers to diagnose failures in large-scale online service systems. Log parsing, which extracts structured events from massive unstructured log data, is a critical first step for downstream tasks like anomaly detection and failure diagnosis. With advances in large language models (LLMs), leveraging their strong text understanding capabilities has proven effective for accurate log parsing. However, existing LLM-based log parsers all focus on the constant part of logs, ignoring the potential contribution of the variable part to log parsing. This constant-centric strategy brings four key problems. First, inefficient log grouping and sampling with only constant information. Second, a relatively large number of LLM invocations due to constant-based cache, leading to low log parsing accuracy and efficiency. Third, a relatively large number of consumed constant tokens in prompts leads to high LLM invocation costs. At last, these methods only retain placeholders in the results, losing the system visibility brought by variable information in logs. Facing these problems, we propose a variable-centric log parsing strategy named VarParser. Through variable contribution sampling, variable-centric parsing cache, and adaptive variable-aware in-context learning, our approach can efficiently capture the variable parts of logs and leverage their contributions to parsing. By introducing variable units, we preserve rich variable information, enhancing the integrity of log parsing results. Extensive evaluations on large-scale datasets demonstrate that VarParser achieves higher accuracy compared to existing methods, significantly improving parsing efficiency while reducing the LLM invocation costs.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。