{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,10,15]],"date-time":"2026-10-15T19:16:37Z","timestamp":1792091797121,"version":"4.4.0"},"reference-count":88,"publisher":"Association for Computing Machinery (ACM)","issue":"9","content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. VLDB Endow."],"published-print":{"date-parts":[[2025,5]]},"abstract":"<jats:p>\n            Modern computing systems, such as HDFS and Spark, produce vast quantities of logs that developers use for tasks like anomaly detection and error analysis. To simplify log analysis, template generation methods have been proposed to standardize log formats, transforming unstructured data into structured templates. Existing heuristic-based methods and neural network-based methods suffer from low accuracy problems due to the reliance on handcrafted heuristics or specific log patterns in training sets. Recently, large language models (LLMs) have shown great potential in log template generation. However, they often struggle with ambiguous, complex, or highly specific log content, which can lead to errors in generating accurate templates. To address these challenges, we propose LLMLog, a multi-round annotation framework with adaptive in-context learning. We first propose an edit-distance-based similarity metric to evaluate log similarity. Then, we introduce a method to select the most informative\n            <jats:italic toggle=\"yes\">k<\/jats:italic>\n            unlabeled logs for annotation by considering both the representativeness of the logs and the confidence of LLM predictions. Additionally, we design an adaptive context selection strategy that adaptively selects labeled logs to ensure comprehensive keyword coverage for unlabeled logs. These labeled logs serve as the context for LLMs to better understand the unlabeled logs, thereby enhancing the accuracy of template generation. Extensive experiments on sixteen datasets demonstrate that LLMLog outperforms the state-of-the-art approaches.\n          <\/jats:p>","DOI":"10.14778\/3746405.3746433","type":"journal-article","created":{"date-parts":[[2025,9,3]],"date-time":"2025-09-03T17:06:20Z","timestamp":1756919180000},"page":"3134-3148","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":1,"title":["LLMLog: Advanced Log Template Generation via LLM-Driven Multi-Round Annotation"],"prefix":"10.14778","volume":"18","author":[{"given":"Fei","family":"Teng","sequence":"first","affiliation":[{"name":"CSE, HKUST"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Haoyang","family":"Li","sequence":"additional","affiliation":[{"name":"Computing, PolyU"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Lei","family":"Chen","sequence":"additional","affiliation":[{"name":"DSA, HKUST &amp; HKUST (GZ)"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2025,9,3]]},"reference":[{"key":"e_1_2_1_1_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE.2019.00031"},{"key":"e_1_2_1_2_1","unstructured":"Apache Software Foundation. [n.d.]. Hadoop. https:\/\/hadoop.apache.org"},{"key":"e_1_2_1_3_1","doi-asserted-by":"publisher","DOI":"10.14778\/3705829.3705831"},{"key":"e_1_2_1_4_1","volume-title":"Kulkarni","author":"Bagban Tanveer I.","year":"2020","unstructured":"Tanveer I. Bagban and Prakash J. Kulkarni. 2020. Template Based Clustering of Web Documents Using Locality Sensitive Hashing (LSH). In Computing in Engineering and Technology, Brijesh Iyer, P. S. Deshpande, S. C. Sharma, and Ulhas Shiurkar (Eds.). Springer Singapore, Singapore, 567\u2013584."},{"key":"e_1_2_1_5_1","volume-title":"First Conference on Language Modeling. https:\/\/openreview.net\/forum?id=IW1PR7vEBf","author":"BehnamGhader Parishad","year":"2024","unstructured":"Parishad BehnamGhader, Vaibhav Adlakha, Marius Mosbach, Dzmitry Bahdanau, Nicolas Chapados, and Siva Reddy. 2024. LLM2Vec: Large Language Models Are Secretly Powerful Text Encoders. In First Conference on Language Modeling. https:\/\/openreview.net\/forum?id=IW1PR7vEBf"},{"key":"e_1_2_1_6_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICDE55515.2023.00122"},{"key":"e_1_2_1_7_1","doi-asserted-by":"publisher","DOI":"10.14778\/3149193.3149196"},{"key":"e_1_2_1_8_1","volume-title":"Lin (Eds.)","volume":"33","author":"Brown Tom","year":"2020","unstructured":"Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel Ziegler, Jeffrey Wu, Clemens Winter, Chris Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. 2020. Language Models are Few-Shot Learners. In Advances in Neural Information Processing Systems, H. Larochelle, M. Ranzato, R. Hadsell, M.F. Balcan, and H. Lin (Eds.), Vol. 33. Curran Associates, Inc., 1877\u20131901. https:\/\/proceedings.neurips.cc\/paper_files\/paper\/2020\/file\/1457c0d6bfcb4967418bfb8ac142f64a-Paper.pdf"},{"key":"e_1_2_1_9_1","doi-asserted-by":"publisher","DOI":"10.1109\/TKDE.2006.152"},{"key":"e_1_2_1_10_1","doi-asserted-by":"publisher","DOI":"10.5555\/3327345.3327465"},{"key":"e_1_2_1_11_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICDE60146.2024.00317"},{"key":"e_1_2_1_12_1","doi-asserted-by":"publisher","DOI":"10.1145\/2463676.2465341"},{"key":"e_1_2_1_13_1","doi-asserted-by":"publisher","DOI":"10.1287\/moor.4.3.233"},{"key":"e_1_2_1_14_1","doi-asserted-by":"publisher","DOI":"10.1145\/3133956.3134015"},{"key":"e_1_2_1_15_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICDE.2011.5767843"},{"key":"e_1_2_1_16_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICDE60146.2024.00284"},{"key":"e_1_2_1_17_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICDE60146.2024.00019"},{"key":"e_1_2_1_18_1","doi-asserted-by":"publisher","DOI":"10.14778\/3611479.3611527"},{"key":"e_1_2_1_19_1","doi-asserted-by":"publisher","DOI":"10.14778\/3665844.3665857"},{"key":"e_1_2_1_20_1","doi-asserted-by":"publisher","DOI":"10.14778\/3641204.3641221"},{"key":"e_1_2_1_21_1","first-page":"1","article-title":"Adaptive submodularity: theory and applications in active learning and stochastic optimization","volume":"42","author":"Golovin Daniel","year":"2011","unstructured":"Daniel Golovin and Andreas Krause. 2011. Adaptive submodularity: theory and applications in active learning and stochastic optimization. J. Artif. Int. Res. 42, 1 (Sept. 2011), 427\u2013486.","journal-title":"J. Artif. Int. Res."},{"key":"e_1_2_1_22_1","doi-asserted-by":"publisher","DOI":"10.1145\/2983323.2983358"},{"key":"e_1_2_1_23_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICWS.2017.13"},{"key":"e_1_2_1_24_1","doi-asserted-by":"publisher","DOI":"10.1145\/3236024.3236083"},{"key":"e_1_2_1_25_1","doi-asserted-by":"publisher","DOI":"10.1109\/ISSRE.2016.21"},{"key":"e_1_2_1_26_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICDE60146.2024.00066"},{"key":"e_1_2_1_27_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICDE51399.2021.00075"},{"key":"e_1_2_1_28_1","doi-asserted-by":"publisher","DOI":"10.14778\/3696435.3696439"},{"key":"e_1_2_1_29_1","doi-asserted-by":"publisher","DOI":"10.14778\/1920841.1920928"},{"key":"e_1_2_1_30_1","doi-asserted-by":"publisher","DOI":"10.1109\/TKDE.2004.1264821"},{"key":"e_1_2_1_31_1","doi-asserted-by":"publisher","DOI":"10.1145\/3510003.3510101"},{"key":"e_1_2_1_32_1","doi-asserted-by":"publisher","DOI":"10.1016\/S0020-0190(99)00031-9"},{"key":"e_1_2_1_33_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE48619.2023.00204"},{"key":"e_1_2_1_34_1","doi-asserted-by":"publisher","DOI":"10.14778\/3685800.3685838"},{"key":"e_1_2_1_35_1","volume-title":"A survey on large language model acceleration based on kv cache management. arXiv preprint arXiv:2412.19442","author":"Li Haoyang","year":"2024","unstructured":"Haoyang Li, Yiming Li, Anxin Tian, Tianhao Tang, Zhanchao Xu, Xuejia Chen, Nicole Hu, Wei Dong, Qing Li, and Lei Chen. 2024. A survey on large language model acceleration based on kv cache management. arXiv preprint arXiv:2412.19442 (2024)."},{"key":"e_1_2_1_36_1","doi-asserted-by":"publisher","DOI":"10.1109\/ISSRE5003.2020.00018"},{"key":"e_1_2_1_37_1","doi-asserted-by":"publisher","DOI":"10.14778\/3696435.3696440"},{"key":"e_1_2_1_38_1","doi-asserted-by":"publisher","DOI":"10.1145\/2889160.2889232"},{"key":"e_1_2_1_39_1","doi-asserted-by":"publisher","DOI":"10.1145\/3560815"},{"key":"e_1_2_1_40_1","first-page":"8097","article-title":"Enhancing Large Language Models with Multimodality and Knowledge Graphs for Hallucination-free Open-set Object Recognition. Proceedings of the VLDB Endowment","volume":"2150","author":"Liu Xinfu","year":"2024","unstructured":"Xinfu Liu, Yirui Wu, Yuting Zhou, Junyang Chen, Huan Wang, Ye Liu, and Shaohua Wan. 2024. Enhancing Large Language Models with Multimodality and Knowledge Graphs for Hallucination-free Open-set Object Recognition. Proceedings of the VLDB Endowment. ISSN 2150 (2024), 8097.","journal-title":"ISSN"},{"key":"e_1_2_1_41_1","doi-asserted-by":"publisher","DOI":"10.1145\/3485447.3511993"},{"key":"e_1_2_1_42_1","doi-asserted-by":"publisher","DOI":"10.1109\/TKDE.2011.138"},{"key":"e_1_2_1_43_1","doi-asserted-by":"publisher","DOI":"10.14778\/3705829.3705836"},{"key":"e_1_2_1_44_1","doi-asserted-by":"publisher","DOI":"10.14778\/3587136.3587151"},{"key":"e_1_2_1_45_1","unstructured":"Costas Mavromatis Balasubramaniam Srinivasan Zhengyuan Shen Jiani Zhang Huzefa Rangwala Christos Faloutsos and George Karypis. 2023. Which Examples to Annotate for In-Context Learning? Towards Effective and Efficient Selection. arXiv:2310.20046 [cs.CL] https:\/\/arxiv.org\/abs\/2310.20046"},{"key":"e_1_2_1_46_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICDE60146.2024.00106"},{"key":"e_1_2_1_47_1","doi-asserted-by":"publisher","DOI":"10.1109\/SCC.2013.73"},{"key":"e_1_2_1_48_1","doi-asserted-by":"publisher","DOI":"10.1145\/2939672.2939712"},{"key":"e_1_2_1_49_1","volume-title":"Machine Learning and Knowledge Discovery in Databases: Applied Data Science Track, Yuxiao Dong, Dunja Mladeni\u0107","author":"Nedelkoski Sasho","unstructured":"Sasho Nedelkoski, Jasmin Bogatinovski, Alexander Acker, Jorge Cardoso, and Odej Kao. 2021. Self-supervised Log Parsing. In Machine Learning and Knowledge Discovery in Databases: Applied Data Science Track, Yuxiao Dong, Dunja Mladeni\u0107, and Craig Saunders (Eds.). Springer International Publishing, Cham, 122\u2013138."},{"key":"e_1_2_1_50_1","doi-asserted-by":"publisher","DOI":"10.1145\/3588911"},{"key":"e_1_2_1_51_1","unstructured":"OpenAI. 2024. Introducing gpt-4o: our fastest and most affordable flagship model. https:\/\/platform.openai.com\/docs\/guides\/vision 2024-11-07."},{"key":"e_1_2_1_52_1","doi-asserted-by":"publisher","DOI":"10.1145\/3589322"},{"key":"e_1_2_1_53_1","doi-asserted-by":"publisher","DOI":"10.1145\/3589324"},{"key":"e_1_2_1_54_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICDE60146.2024.00009"},{"key":"e_1_2_1_55_1","doi-asserted-by":"publisher","DOI":"10.14778\/3565816.3565831"},{"key":"e_1_2_1_56_1","doi-asserted-by":"publisher","DOI":"10.14778\/3685800.3685835"},{"key":"e_1_2_1_57_1","doi-asserted-by":"publisher","DOI":"10.1145\/3448016.3457250"},{"key":"e_1_2_1_58_1","volume-title":"Selective Annotation Makes Language Models Better Few-Shot Learners. In The Eleventh International Conference on Learning Representations. https:\/\/openreview.net\/forum?id=qY1hlv7gwg","author":"Jungo Kasai Hongjin SU","year":"2023","unstructured":"Hongjin SU, Jungo Kasai, Chen Henry Wu, Weijia Shi, Tianlu Wang, Jiayi Xin, Rui Zhang, Mari Ostendorf, Luke Zettlemoyer, Noah A. Smith, and Tao Yu. 2023. Selective Annotation Makes Language Models Better Few-Shot Learners. In The Eleventh International Conference on Learning Representations. https:\/\/openreview.net\/forum?id=qY1hlv7gwg"},{"key":"e_1_2_1_59_1","doi-asserted-by":"publisher","DOI":"10.1145\/3514221.3517906"},{"key":"e_1_2_1_60_1","doi-asserted-by":"publisher","unstructured":"Yushi Sun Wang Jiachuan Peng Cheng Libin Zheng Lei Chen and Jian Yin. 2024. Cross-Domain-Aware Worker Selection with Training for Crowdsourced Annotation. 249\u2013262. 10.1109\/ICDE60146.2024.00026","DOI":"10.1109\/ICDE60146.2024.00026"},{"key":"e_1_2_1_61_1","doi-asserted-by":"publisher","DOI":"10.14778\/3583140.3583149"},{"key":"e_1_2_1_62_1","doi-asserted-by":"publisher","DOI":"10.1145\/2063576.2063690"},{"key":"e_1_2_1_63_1","doi-asserted-by":"publisher","DOI":"10.14778\/3705829.3705840"},{"key":"e_1_2_1_64_1","unstructured":"Qwen Team. 2024. Qwen2.5: A Party of Foundation Models. https:\/\/qwenlm.github.io\/blog\/qwen2.5\/"},{"key":"e_1_2_1_65_1","volume-title":"LLMLog: Advanced Log Template Generation via LLM-driven Multi-Round Annotation. Online","author":"Teng Fei","year":"2025","unstructured":"Fei Teng, Haoyang Li, and Lei Chen. 2025. LLMLog: Advanced Log Template Generation via LLM-driven Multi-Round Annotation. Online (2025). https:\/\/github.com\/XinTT\/LLMLog"},{"key":"e_1_2_1_66_1","unstructured":"The Apache Software Foundation. 2024. SparkR: R Front End for 'Apache Spark'. https:\/\/www.apache.orghttps:\/\/spark.apache.org R package version 3.5.1https:\/\/www.apache.org https:\/\/spark.apache.org."},{"key":"e_1_2_1_67_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICDE60146.2024.00175"},{"key":"e_1_2_1_68_1","doi-asserted-by":"publisher","DOI":"10.1145\/3186728.3164137"},{"key":"e_1_2_1_69_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICDE48307.2020.00045"},{"key":"e_1_2_1_70_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICDE60146.2024.00083"},{"key":"e_1_2_1_71_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICDE60146.2024.00112"},{"key":"e_1_2_1_72_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICDE60146.2024.00243"},{"key":"e_1_2_1_73_1","doi-asserted-by":"publisher","DOI":"10.1109\/TMM.2024.3453062"},{"key":"e_1_2_1_74_1","doi-asserted-by":"publisher","DOI":"10.1145\/3597503.3639155"},{"key":"e_1_2_1_75_1","doi-asserted-by":"publisher","DOI":"10.1145\/3589274"},{"key":"e_1_2_1_76_1","doi-asserted-by":"publisher","DOI":"10.1109\/TKDE.2021.3126631"},{"key":"e_1_2_1_77_1","doi-asserted-by":"publisher","DOI":"10.14778\/3554821.3554837"},{"key":"e_1_2_1_78_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICDE.2018.00157"},{"key":"e_1_2_1_79_1","unstructured":"Shaokun Zhang Xiaobo Xia Zhaoqing Wang Ling-Hao Chen Jiale Liu Qingyun Wu and Tongliang Liu. 2024. IDEAL: Influence-Driven Selective Annotations Empower In-Context Learners in Large Language Models. In The Twelfth International Conference on Learning Representations. https:\/\/openreview.net\/forum?id=Spp2i1hKwV"},{"key":"e_1_2_1_80_1","doi-asserted-by":"publisher","DOI":"10.1109\/TKDE.2022.3222417"},{"key":"e_1_2_1_81_1","doi-asserted-by":"publisher","DOI":"10.14778\/3632093.3632114"},{"key":"e_1_2_1_82_1","doi-asserted-by":"publisher","DOI":"10.1145\/3338906.3338931"},{"key":"e_1_2_1_83_1","doi-asserted-by":"publisher","DOI":"10.14778\/3685800.3685905"},{"key":"e_1_2_1_84_1","doi-asserted-by":"publisher","DOI":"10.1145\/2723372.2747648"},{"key":"e_1_2_1_85_1","doi-asserted-by":"publisher","DOI":"10.14778\/3685800.3685908"},{"key":"e_1_2_1_86_1","doi-asserted-by":"publisher","DOI":"10.14778\/3579075.3579090"},{"key":"e_1_2_1_87_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE-SEIP.2019.00021"},{"key":"e_1_2_1_88_1","doi-asserted-by":"publisher","DOI":"10.14778\/3685800.3685885"}],"container-title":["Proceedings of the VLDB Endowment"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.14778\/3746405.3746433","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,9,4]],"date-time":"2025-09-04T19:53:20Z","timestamp":1757015600000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.14778\/3746405.3746433"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2025,5]]},"references-count":88,"journal-issue":{"issue":"9","published-print":{"date-parts":[[2025,5]]}},"alternative-id":["10.14778\/3746405.3746433"],"URL":"https:\/\/doi.org\/10.14778\/3746405.3746433","relation":{},"ISSN":["2150-8097"],"issn-type":[{"value":"2150-8097","type":"print"}],"subject":[],"published":{"date-parts":[[2025,5]]},"assertion":[{"value":"2025-09-03","order":3,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}