使用 LLM 实现更强大、更廉价且无需演示的日志解析
Stronger, Cheaper and Demonstration-Free Log Parsing with LLMs
AI总结:
针对基于 LLM 的日志解析依赖演示且调用成本高的问题,提出无需训练或标注的 LogBatcher,通过聚类分区、缓存模板匹配和分区日志批处理提示,在 16 个公开数据集上实现高效准确解析。
摘要:
日志解析是将原始日志消息转换为结构化格式的过程,也是对大规模软件系统日志进行自动化分析的重要初始步骤。传统日志解析器通常依赖启发式规则或手工特征,这可能无法很好地泛化到多样化的日志来源,或者需要大量模型调优。近来,一些日志解析器利用了大型语言模型(LLM)强大的生成能力。然而,它们严重依赖演示示例,导致 LLM 调用产生巨大开销。为解决这些问题,我们提出 LogBatcher,这是一种具有成本效益、基于 LLM 的日志解析器,不需要训练过程或标注数据。为利用日志数据的潜在特征并降低开销,我们通过聚类将日志划分为若干分区。随后,我们执行缓存匹配流程,将日志与此前已解析的日志模板进行匹配。最后,我们通过将来自每个分区的一组日志进行批处理,为 LLM 提供更适合日志解析的提示上下文。我们在 16 个公开日志数据集上进行了实验,结果表明 LogBatcher 在日志解析方面既有效又高效。
英文摘要:
Log parsing, the process of converting raw log messages into structured formats, is an important initial step for automated analysis of logs of large-scale software systems. Traditional log parsers often rely on heuristics or handcrafted features, which may not generalize well across diverse log sources or require extensive model tuning. Recently, some log parsers have utilized powerful generative capabilities of large language models (LLMs). However, they heavily rely on demonstration examples, resulting in substantial overhead in LLM invocations. To address these issues, we propose LogBatcher, a cost-effective LLM-based log parser that requires no training process or labeled data. To leverage latent characteristics of log data and reduce the overhead, we divide logs into several partitions through clustering. Then we perform a cache matching process to match logs with previously parsed log templates. Finally, we provide LLMs with better prompt context specialized for log parsing by batching a group of logs from each partition. We have conducted experiments on 16 public log datasets and the results show that LogBatcher is effective and efficient for log parsing.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。