{"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/heuristics-driven-link-of-analogy-prompting","title":"LLMs Learn Task Heuristics from Demonstrations: A Heuristic-Driven Prompting Strategy for Document-Level Event Argument Extraction","arxiv_id":"2311.06555","date":"2023-11-11","proceeding":null,"authors":["Hanzhang Zhou","Junlang Qian","Zijian Feng","Hui Lu","Zixiao Zhu","Kezhi Mao"],"abstract":"In this study, we investigate in-context learning (ICL) in document-level event argument extraction (EAE) to alleviate the dependency on large-scale labeled data for this task. We introduce the Heuristic-Driven Link-of-Analogy (HD-LoA) prompting to address the challenge of example selection and to develop a prompting strategy tailored for EAE. Specifically, we hypothesize and validate that LLMs learn task-specific heuristics from demonstrations via ICL. Building upon this hypothesis, we introduce an explicit heuristic-driven demonstration construction approach, which transforms the haphazard example selection process into a methodical method that emphasizes task heuristics. Additionally, inspired by the analogical reasoning of human, we propose the link-of-analogy prompting, which enables LLMs to process new situations by drawing analogies to known situations, enhancing their performance on unseen classes beyond limited ICL examples. Experiments show that our method outperforms existing prompting methods and few-shot supervised learning methods on document-level EAE datasets. Additionally, the HD-LoA prompting shows effectiveness in diverse tasks like sentiment analysis and natural language inference, demonstrating its broad adaptability.","url_abs":"https://arxiv.org/abs/2311.06555v3","url_pdf":"https://arxiv.org/pdf/2311.06555v3.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":"abstracts"},"code_links":[{"paper_slug":"heuristics-driven-link-of-analogy-prompting","repo_url":"https://github.com/hzzhou01/hd-loa-prompting","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok"}}],"tasks":[{"task_slug":"event-argument-extraction","task_name":"Event Argument Extraction"},{"task_slug":"in-context-learning","task_name":"In-Context Learning"},{"task_slug":"natural-language-inference","task_name":"Natural Language Inference"},{"task_slug":"sentiment-analysis","task_name":"Sentiment Analysis"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2311.06555","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2311.06555"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+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/hzzhou01/hd-loa-prompting","reach":{"status":"ok"}}],"summary":{"ran":5,"unverified":1},"by_repo_kind":{"official":{"samples":6,"ran":5,"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":6,"samples":[{"code_sha256_prefix":"932df8cf8a209475","entry":"ans_extraction","repo":"hzzhou01/hd-loa-prompting","repo_kind":"official","path":"HD_LoA/DocEE/main_DocEE.py","file_url":"https://github.com/hzzhou01/hd-loa-prompting/blob/HEAD/HD_LoA/DocEE/main_DocEE.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"932df8cf8a209475"}},{"code_sha256_prefix":"3d73ee1369520558","entry":"ans_extraction","repo":"hzzhou01/hd-loa-prompting","repo_kind":"official","path":"HD_LoA/RAMS/main_RAMS.py","file_url":"https://github.com/hzzhou01/hd-loa-prompting/blob/HEAD/HD_LoA/RAMS/main_RAMS.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3d73ee1369520558"}},{"code_sha256_prefix":"1c76fac1fd53438a","entry":"ans_extraction_gpt4","repo":"hzzhou01/hd-loa-prompting","repo_kind":"official","path":"HD_LoA/DocEE/main_DocEE.py","file_url":"https://github.com/hzzhou01/hd-loa-prompting/blob/HEAD/HD_LoA/DocEE/main_DocEE.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1c76fac1fd53438a"}},{"code_sha256_prefix":"1543a653267f84a0","entry":"evaluate_prompt","repo":"hzzhou01/hd-loa-prompting","repo_kind":"official","path":"HD_LoA/RAMS/main_RAMS.py","file_url":"https://github.com/hzzhou01/hd-loa-prompting/blob/HEAD/HD_LoA/RAMS/main_RAMS.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1543a653267f84a0"}},{"code_sha256_prefix":"3fa776ff46467ded","entry":"gen_gpt_output","repo":"hzzhou01/hd-loa-prompting","repo_kind":"official","path":"HD_LoA/DocEE/main_DocEE.py","file_url":"https://github.com/hzzhou01/hd-loa-prompting/blob/HEAD/HD_LoA/DocEE/main_DocEE.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3fa776ff46467ded"}},{"code_sha256_prefix":"38f63e86116069ba","entry":"gen_gpt_output","repo":"hzzhou01/hd-loa-prompting","repo_kind":"official","path":"HD_LoA/RAMS/main_RAMS.py","file_url":"https://github.com/hzzhou01/hd-loa-prompting/blob/HEAD/HD_LoA/RAMS/main_RAMS.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"38f63e86116069ba"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}