Knowledge-Augmented Log Anomaly Detection with Large Language Models
Yongliang Tao, Hongyu Zhang, Van-Hoang Le, Yi Xiao
Abstract
Log anomaly detection is critical for maintaining system reliability, yet existing large language model (LLM)-based methods suffer from limited accuracy, high computational costs, and poor explainability. In this paper, we introduce LogPipe, a novel framework that enhances LLM-based log anomaly detection by integrating a dynamic knowledge base. LogPipe constructs a knowledge base using discrete and semantic log patterns, augmented by dynamic patterns that are generated by a sentiment dictionary and frequent pattern mining. During inference, log sequences are matched against the knowledge base to provide specific guidance to the LLM, improving detection accuracy and generating detailed explanations. A continuous update mechanism ensures that the knowledge base remains relevant while minimizing redundant LLM queries, significantly reducing inference costs. Evaluated on eight public datasets, LogPipe achieves an average F1 score of 0.975, outperforming state-of-the-art models, with reduced token consumption. Additionally, LogPipe excels in fault localization, which enhances the explainability of detected anomalies.
Ask about this paper
Ask your agent about it.
Lune has read the top-tier papers around this one, so every answer names the papers it rests on.
Related papers
- CoLA: Model Collaboration for Log-based Anomaly DetectionXuhang Zhu, Xiu Tang, Sai Wu, Jichen Li et al.VLDB 2025 · 2 citations
- Log-based Anomaly Detection Without Log ParsingVan-Hoang Le, Hongyu ZhangASE 2021 · 249 citations
- LLMLog: Advanced Log Template Generation via LLM-driven Multi-Round AnnotationFei Teng, Haoyang Li, Lei ChenVLDB 2025 · 2 citations
- Semantic Curriculum for Anomaly Detection: A Unified Language-Driven Meta-Optimization FrameworkKai Tan, Yangliu Du, Dongyang Zhan, Haining Yu et al.INFOCOM 2026
- LLMParser: An Exploratory Study on Using Large Language Models for Log ParsingZeyang Ma, An Ran Chen, Dong Jae Kim, Tse-Hsun Chen et al.ICSE 2024 · 72 citations
