Log parsing aims to transform raw log information into structured log templates and parameters, enabling automated analysis and improving downstream tasks such as anomaly detection. Existing LLM-based log parsing approaches primarily rely on manually crafted prompts or static prompt selection, which limits their adaptability to diverse real-world log formats. To address this issue, we introduce NLGLP, a framework for automated prompt tuning. Specifically, NLGLP first selects representative examples that best match the current task through a candidate example set, then applies natural language gradient–based optimization to iteratively refine prompts. This dynamic adjustment improves both adaptability and parsing accuracy across heterogeneous log data. Experiments on 16 public loghub datasets demonstrate the effectiveness of our method. The codes are available at: https://github.com/Theshy1245/AutoPrompt.git .

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Towards Automation in Log Parsing: Auto-Prompt Optimization with Natural Language Gradients

  • Jie Chen,
  • Yunpeng Hong,
  • Jiacheng Liu,
  • Chenyang Bu

摘要

Log parsing aims to transform raw log information into structured log templates and parameters, enabling automated analysis and improving downstream tasks such as anomaly detection. Existing LLM-based log parsing approaches primarily rely on manually crafted prompts or static prompt selection, which limits their adaptability to diverse real-world log formats. To address this issue, we introduce NLGLP, a framework for automated prompt tuning. Specifically, NLGLP first selects representative examples that best match the current task through a candidate example set, then applies natural language gradient–based optimization to iteratively refine prompts. This dynamic adjustment improves both adaptability and parsing accuracy across heterogeneous log data. Experiments on 16 public loghub datasets demonstrate the effectiveness of our method. The codes are available at: https://github.com/Theshy1245/AutoPrompt.git .