Skip to content
Open access

Retrieval Supersedes Scale: Efficient Log Level Prediction via Multiplex Socio-Technical Context

Nov 2026 · IEEE Transactions on Software Engineering · pp. 1-12 · 0 citations · 37 references
Computer Science

TL;DR

This paper proposes a retrieval approach for LLM-powered log level prediction that prioritizes context relevance over random selection and basic similarity, and retrieves logging examples relevant along two socio-technical dimensions: functionality and ownership.

Abstract

Developers insert logging statements in source code to record its execution, and the resulting logs are essential for detecting and troubleshooting system anomalies. A key part of these statements is the log level (e.g., DEBUG, INFO, WARN, ERROR), which determines whether a message is recorded. Choosing it is a trade-off: levels set too low mask important information in production, while levels set too high create noisy logs and extra I/O and storage overhead. Recent work uses Large Language Models (LLMs) with In-Context Learning (ICL) to predict log levels, but typically augments the prompt with randomly sampled examples. We argue that this overlooks the socio-technical nature of logging, where conventions vary by component and development team. Off-the-shelf LLMs using random examples are reported to achieve median AUCs of only 0.56 to 0.76, leaving room for improvement without fine-tuning. In this paper, we propose a retrieval approach for LLM-powered log level prediction that prioritizes context relevance over random selection and basic similarity. Our method retrieves logging examples relevant along two socio-technical dimensions: (i) functionality (code performing similar operations) and (ii) ownership (code maintained by the same developers). Evaluating four LLMs across ten popular Java projects, we find that this retrieval improves AUC over random baselines by 0.07 (median), and combining both signals yields median AUCs of 0.83 to 0.97. Our ablation studies show that each signal improves on random retrieval, and that combining them outperforms the stronger of the two on all ten projects. Our results also significantly exceed state-of-the-art supervised predictors (e.g., DeepLV) by a median AUC of 0.12 to 0.19. Our findings highlight the importance of socio-technical signals such as code functionality and ownership for LLM-powered log level prediction.

Read PDF

Similar papers

Configuration, Not Conscience: A Large-Scale Empirical Study of LLM System Prompts

Analysis of leaked system prompts from 62 vendors across four community collections supports treating leaked prompts as operational specifications, closer to configuration files than value statements, and treats reuse and prompt rot as engineering and supply-chain concerns.

C. Patsakis, Vasileios Argyropoulos, E. Alepis · 0 citations
Sep 2026

TAILOR: Template-Preserving Augmentation for Long-Tailed Log Parsing

TAILOR, a log parsing framework that improves template inference for rare log groups through template-preserving augmentation, is proposed and experimental results show that TAILOR improves parsing accuracy on rare log groups by 19% over the strongest baseline while maintaining competitive performance on complete datas...

Sepideh Hodaeian, Zhen-Hao Li, An-Ran Chen · 0 citations

RAILS: Retrieval-Augmented Incremental LLM Clustering at Scale

RAILS is presented, a retrieval-augmented incremental LLM clusterer that turns clustering into a simple loop over a growing label pool and scales through document batching with bounded concurrency.

Armin Oliya, Aleksandra Sawczuk, Radosław Białobrzeski · 0 citations
Conference Open access Sep 2026

Constitutional Sanitization and Fine-Tuning for Robustness to Prompt Injection in LLM-Based Log Analysis

Large language models (LLMs) are increasingly used in log-analysis workflows to summarize operational logs, alerts, tickets, and other external records. Because these records are untrusted data, they may contain malicious instructions. This paper studies indirect prompt injection in a scoped LLM-based loganalysis task...

Wen-Kai Ma, Fariza Fauzi · 0 citations
Preprint Sep 2026

TRAIL: Towards Effective Log Parsing for Rare Logs through Template-Preserving Augmentation

Log parsing is essential for system log analysis because it supports tasks such as debugging, monitoring, and anomaly detection by transforming unstructured log messages into structured log templates. However, real-world log datasets exhibit highly imbalanced, long-tailed distributions, where a small number of frequent...

Sepideh Hodaeian, Zhen-Hao Li, An-Ran Chen · 0 citations
Book Open access Nov 2026

POSTER: LHPD: LLM-Based Heuristic Pre-Training for Malware Detection

Malware sandboxes produce rich behavioral reports, yet these reports are lengthy, deeply nested JSON documents that defy direct analysis. In this paper, we address how general-purpose Large Language Models (LLMs) can reconstruct coherent behavioral chains of malware from such reports, and propose LHPD, a detection fram...

Tian-Shuai Zhan, Pei Yan, Ji-Wu Huang · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.