LILAC: Log Parsing using LLMs with Adaptive Parsing Cache

Author:

Jiang Zhihan1ORCID,Liu Jinyang1ORCID,Chen Zhuangbin2ORCID,Li Yichen1ORCID,Huang Junjie1ORCID,Huo Yintong1ORCID,He Pinjia3ORCID,Gu Jiazhen1ORCID,Lyu Michael R.1ORCID

Affiliation:

1. The Chinese University of Hong Kong, Hong Kong, China

2. Sun Yat-sen University, Zhuhai, China

3. The Chinese University of Hong Kong, Shenzhen, China

Abstract

Log parsing transforms log messages into structured formats, serving as the prerequisite step for various log analysis tasks. Although a variety of log parsing approaches have been proposed, their performance on complicated log data remains compromised due to the use of human-crafted rules or learning-based models with limited training data. The recent emergence of powerful large language models (LLMs) demonstrates their vast pre-trained knowledge related to code and logging, making it promising to apply LLMs for log parsing. However, their lack of specialized log parsing capabilities currently hinders their parsing accuracy. Moreover, the inherent inconsistent answers, as well as the substantial overhead, prevent the practical adoption of LLM-based log parsing. To address these challenges, we propose LILAC, the first practical Log parsIng framework using LLMs with Adaptive parsing Cache. To facilitate accurate and robust log parsing, LILAC leverages the in-context learning (ICL) capability of the LLM by performing a hierarchical candidate sampling algorithm and selecting high-quality demonstrations. Furthermore, LILAC incorporates a novel component, an adaptive parsing cache, to store and refine the templates generated by the LLM. It helps mitigate LLM's inefficiency issue by enabling rapid retrieval of previously processed log templates. In this process, LILAC adaptively updates the templates within the parsing cache to ensure the consistency of parsed results. The extensive evaluation on public large-scale datasets shows that LILAC outperforms state-of-the-art methods by 69.5% in terms of the average F1 score of template accuracy. In addition, LILAC reduces the query times to LLMs by several orders of magnitude, achieving a comparable efficiency to the fastest baseline.

Publisher

Association for Computing Machinery (ACM)

Reference73 articles.

1. 2023. Jaccard index - Wikipedia. https://en.wikipedia.org/wiki/Jaccard_index [Online; accessed 1 Aug 2023]

2. 2023. OpenAI API. https://openai.com/blog/openai-api [Online; accessed 1 Aug 2023]

3. 2023. The repository of LILAC. https://github.com/logpai/LILAC [Online; accessed 29 Jan 2024]

4. 2023. Scipy. https://scipy.org/ [Online; accessed 1 Aug 2023]

5. Shan Ali Chaima Boufaied Domenico Bianculli Paula Branco Lionel Briand and Nathan Aschbacher. 2023. An Empirical Study on Log-based Anomaly Detection Using Machine Learning. arXiv preprint arXiv:2307.16714 https://doi.org/10.48550/arXiv.2307.16714 10.48550/arXiv.2307.16714

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3