{"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/how-are-prompts-different-in-terms-of","title":"How are Prompts Different in Terms of Sensitivity?","arxiv_id":"2311.07230","date":"2023-11-13","proceeding":null,"authors":["Sheng Lu","Hendrik Schuff","Iryna Gurevych"],"abstract":"In-context learning (ICL) has become one of the most popular learning paradigms. While there is a growing body of literature focusing on prompt engineering, there is a lack of systematic analysis comparing the effects of prompts across different models and tasks. To address this gap, we present a comprehensive prompt analysis based on the sensitivity of a function. Our analysis reveals that sensitivity is an unsupervised proxy for model performance, as it exhibits a strong negative correlation with accuracy. We use gradient-based saliency scores to empirically demonstrate how different prompts affect the relevance of input tokens to the output, resulting in different levels of sensitivity. Furthermore, we introduce sensitivity-aware decoding which incorporates sensitivity estimation as a penalty term in the standard greedy decoding. We show that this approach is particularly helpful when information in the input is scarce. Our work provides a fresh perspective on the analysis of prompts, and contributes to a better understanding of the mechanism of ICL.","url_abs":"https://arxiv.org/abs/2311.07230v2","url_pdf":"https://arxiv.org/pdf/2311.07230v2.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":"how-are-prompts-different-in-terms-of","repo_url":"https://github.com/ukplab/naacl2024-prompt-sensitivity","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"in-context-learning","task_name":"In-Context Learning"},{"task_slug":"prompt-engineering","task_name":"Prompt Engineering"},{"task_slug":"sensitivity","task_name":"Sensitivity"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2311.07230","atlas_url":"https://app.syntology.ai/?focus=2311.07230","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2311.07230"}},"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/ukplab/naacl2024-prompt-sensitivity","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":3,"ran_draft_wrong":1},"by_repo_kind":{"official":{"samples":4,"ran":4,"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":"abc6223d385b9dfc","entry":"concatenate","repo":"ukplab/naacl2024-prompt-sensitivity","repo_kind":"official","path":"utils.py","file_url":"https://github.com/ukplab/naacl2024-prompt-sensitivity/blob/HEAD/utils.py","link_basis":"first_harvest_node","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":"abc6223d385b9dfc"}},{"code_sha256_prefix":"4f8ea1ef4a3b4d38","entry":"model_preds","repo":"ukplab/naacl2024-prompt-sensitivity","repo_kind":"official","path":"lm_saliency.py","file_url":"https://github.com/ukplab/naacl2024-prompt-sensitivity/blob/HEAD/lm_saliency.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4f8ea1ef4a3b4d38"}},{"code_sha256_prefix":"90eb3b47a83484b3","entry":"register_embedding_gradient_hooks","repo":"ukplab/naacl2024-prompt-sensitivity","repo_kind":"official","path":"lm_saliency.py","file_url":"https://github.com/ukplab/naacl2024-prompt-sensitivity/blob/HEAD/lm_saliency.py","link_basis":"first_harvest_node","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":"90eb3b47a83484b3"}},{"code_sha256_prefix":"01030f17ec058041","entry":"register_embedding_list_hook","repo":"ukplab/naacl2024-prompt-sensitivity","repo_kind":"official","path":"lm_saliency.py","file_url":"https://github.com/ukplab/naacl2024-prompt-sensitivity/blob/HEAD/lm_saliency.py","link_basis":"first_harvest_node","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":"01030f17ec058041"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}