DivLog: Log Parsing with Prompt Enhanced In-Context Learning
DivLog: разбор журналов с использованием контекстного обучения, усиленного промптами
2024-04-12
SCID: 54.1/wbxkf8c4
Discuss with AI
in-context learninglarge language modelslog parsingprompt engineeringtemplate extraction
Figures from the paper
Abstract (AI)
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.
Key Findings
1
A dedicated prompt format improves extraction of generated outputs and the quality of resulting log templates.
2
Across 16 public datasets, DivLog achieves 98.1% average Parsing Accuracy, 92.1% Precision Template Accuracy, and 92.9% Recall Template Accuracy.
3
DivLog applies large language model in-context learning to log parsing, generating templates without model training or fine-tuning.
4
It maximizes diversity when sampling offline candidate logs, then selects five labeled examples tailored to each target log for prompt construction.
5
The reported results indicate state-of-the-art performance compared with existing log parsing approaches.
Research Object
semi-structured system logs and their extracted log templates
Research Subject
the effectiveness and accuracy of training-free log template extraction across diverse log sources using diversity-based in-context examples and prompt enhancement
Publication Details
Publication Date
2024-04-12
Journal
Publisher
ISSN
Cited by
70
Open access PDF
Access Type
Author Information
Download PDF
Subscribe to digest