{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/log-parsing-with-prompt-based-few-shot","title":"Log Parsing with Prompt-based Few-shot Learning","arxiv_id":"2302.07435","date":"2023-02-15","proceeding":null,"authors":["Van-Hoang Le","Hongyu Zhang"],"abstract":"Logs generated by large-scale software systems provide crucial information for engineers to understand the system status and diagnose problems of the systems. Log parsing, which converts raw log messages into structured data, is the first step to enabling automated log analytics. Existing log parsers extract the common part as log templates using statistical features. However, these log parsers often fail to identify the correct templates and parameters because: 1) they often overlook the semantic meaning of log messages, and 2) they require domain-specific knowledge for different log datasets. To address the limitations of existing methods, in this paper, we propose LogPPT to capture the patterns of templates using prompt-based few-shot learning. LogPPT utilises a novel prompt tuning method to recognise keywords and parameters based on a few labelled log data. In addition, an adaptive random sampling algorithm is designed to select a small yet diverse training set. We have conducted extensive experiments on 16 public log datasets. The experimental results show that LogPPT is effective and efficient for log parsing.","url_abs":"https://arxiv.org/abs/2302.07435v1","url_pdf":"https://arxiv.org/pdf/2302.07435v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"links_only","authors_date_abstract":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license), from the Kaggle arXiv metadata snapshot of 2026-09-12"},"code_links":[{"paper_slug":"log-parsing-with-prompt-based-few-shot","repo_url":"https://github.com/logintelligence/logppt","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2302.07435","atlas_url":"https://app.syntology.ai/?focus=2302.07435","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2302.07435"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/logintelligence/logppt","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":12,"unverified":1},"by_repo_kind":{"official":{"samples":13,"ran":12,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"0e78c01d28fd412e","entry":"batch_log_sum_exp","repo":"logintelligence/logppt","repo_kind":"official","path":"logppt/models/crf_layer.py","file_url":"https://github.com/logintelligence/logppt/blob/HEAD/logppt/models/crf_layer.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0e78c01d28fd412e"}},{"code_sha256_prefix":"615fd20e52fa8924","entry":"correct_single_template","repo":"logintelligence/logppt","repo_kind":"official","path":"logppt/postprocess.py","file_url":"https://github.com/logintelligence/logppt/blob/HEAD/logppt/postprocess.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"615fd20e52fa8924"}},{"code_sha256_prefix":"e774fbb783ae663a","entry":"correct_single_template_for_evaluation","repo":"logintelligence/logppt","repo_kind":"official","path":"logppt/postprocess.py","file_url":"https://github.com/logintelligence/logppt/blob/HEAD/logppt/postprocess.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e774fbb783ae663a"}},{"code_sha256_prefix":"6e2592283afbf0a6","entry":"get_abstract_transitions","repo":"logintelligence/logppt","repo_kind":"official","path":"logppt/models/viterbi.py","file_url":"https://github.com/logintelligence/logppt/blob/HEAD/logppt/models/viterbi.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"6e2592283afbf0a6"}},{"code_sha256_prefix":"3f0a1b40c7076813","entry":"get_template_line","repo":"logintelligence/logppt","repo_kind":"official","path":"logppt/parsing_base.py","file_url":"https://github.com/logintelligence/logppt/blob/HEAD/logppt/parsing_base.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"3f0a1b40c7076813"}},{"code_sha256_prefix":"bdc3b936caef3999","entry":"get_template_line","repo":"logintelligence/logppt","repo_kind":"official","path":"logppt/parsing_par.py","file_url":"https://github.com/logintelligence/logppt/blob/HEAD/logppt/parsing_par.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"bdc3b936caef3999"}},{"code_sha256_prefix":"22762e04b2d398ea","entry":"lcs_distance","repo":"logintelligence/logppt","repo_kind":"official","path":"logppt/sampling_base.py","file_url":"https://github.com/logintelligence/logppt/blob/HEAD/logppt/sampling_base.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"22762e04b2d398ea"}},{"code_sha256_prefix":"96569b4122986553","entry":"lcs_similarity","repo":"logintelligence/logppt","repo_kind":"official","path":"logppt/parsing_cache.py","file_url":"https://github.com/logintelligence/logppt/blob/HEAD/logppt/parsing_cache.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"96569b4122986553"}},{"code_sha256_prefix":"32a59d0f85c99b0a","entry":"map_template","repo":"logintelligence/logppt","repo_kind":"official","path":"logppt/models/roberta.py","file_url":"https://github.com/logintelligence/logppt/blob/HEAD/logppt/models/roberta.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"32a59d0f85c99b0a"}},{"code_sha256_prefix":"abd7b64c1a23f66c","entry":"message_split","repo":"logintelligence/logppt","repo_kind":"official","path":"logppt/parsing_cache.py","file_url":"https://github.com/logintelligence/logppt/blob/HEAD/logppt/parsing_cache.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"abd7b64c1a23f66c"}},{"code_sha256_prefix":"70ae2daa533bbc42","entry":"post_process_tokens","repo":"logintelligence/logppt","repo_kind":"official","path":"logppt/parsing_cache.py","file_url":"https://github.com/logintelligence/logppt/blob/HEAD/logppt/parsing_cache.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"70ae2daa533bbc42"}},{"code_sha256_prefix":"45739794b83069e8","entry":"verify_template","repo":"logintelligence/logppt","repo_kind":"official","path":"logppt/parsing_base.py","file_url":"https://github.com/logintelligence/logppt/blob/HEAD/logppt/parsing_base.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"45739794b83069e8"}},{"code_sha256_prefix":"93b15f86fa6aa34d","entry":"get_label_with_crf","repo":"logintelligence/logppt","repo_kind":"official","path":"logppt/models/roberta.py","file_url":"https://github.com/logintelligence/logppt/blob/HEAD/logppt/models/roberta.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"93b15f86fa6aa34d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}