{"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/promptly-predicting-structures-the-return-of","title":"Promptly Predicting Structures: The Return of Inference","arxiv_id":"2401.06877","date":"2024-01-12","proceeding":null,"authors":["Maitrey Mehta","Valentina Pyatkin","Vivek Srikumar"],"abstract":"Prompt-based methods have been used extensively across NLP to build zero- and few-shot label predictors. Many NLP tasks are naturally structured: that is, their outputs consist of multiple labels which constrain each other. Annotating data for such tasks can be cumbersome. Can the promise of the prompt-based paradigm be extended to such structured outputs? In this paper, we present a framework for constructing zero- and few-shot linguistic structure predictors. Our key insight is that we can use structural constraints -- and combinatorial inference derived from them -- to filter out inconsistent structures predicted by large language models. We instantiated this framework on two structured prediction tasks, and five datasets. Across all cases, our results show that enforcing consistency not only constructs structurally valid outputs, but also improves performance over the unconstrained variants.","url_abs":"https://arxiv.org/abs/2401.06877v3","url_pdf":"https://arxiv.org/pdf/2401.06877v3.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":"promptly-predicting-structures-the-return-of","repo_url":"https://github.com/utahnlp/prompts-for-structures","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"none","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"structured-prediction","task_name":"Structured Prediction"},{"task_slug":null,"task_name":"valid"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2401.06877","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2401.06877"}},"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/utahnlp/prompts-for-structures","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":6},"by_repo_kind":{"official":{"samples":6,"ran":6,"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":"571a600006c3487b","entry":"add_parser_args","repo":"utahnlp/prompts-for-structures","repo_kind":"official","path":"src/model.py","file_url":"https://github.com/utahnlp/prompts-for-structures/blob/HEAD/src/model.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":"571a600006c3487b"}},{"code_sha256_prefix":"c050aaa66fbc820f","entry":"build_prompt","repo":"utahnlp/prompts-for-structures","repo_kind":"official","path":"src/tasks/srl/qasrl2/prompts.py","file_url":"https://github.com/utahnlp/prompts-for-structures/blob/HEAD/src/tasks/srl/qasrl2/prompts.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":"c050aaa66fbc820f"}},{"code_sha256_prefix":"24e8e9488cb47201","entry":"find_optimal_path","repo":"utahnlp/prompts-for-structures","repo_kind":"official","path":"src/graph.py","file_url":"https://github.com/utahnlp/prompts-for-structures/blob/HEAD/src/graph.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":"24e8e9488cb47201"}},{"code_sha256_prefix":"53b61dce974746e1","entry":"get_few_shot","repo":"utahnlp/prompts-for-structures","repo_kind":"official","path":"src/tasks/srl/qasrl2/prompts.py","file_url":"https://github.com/utahnlp/prompts-for-structures/blob/HEAD/src/tasks/srl/qasrl2/prompts.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":"53b61dce974746e1"}},{"code_sha256_prefix":"9102856265c82533","entry":"subseq_match","repo":"utahnlp/prompts-for-structures","repo_kind":"official","path":"src/graph.py","file_url":"https://github.com/utahnlp/prompts-for-structures/blob/HEAD/src/graph.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":"9102856265c82533"}},{"code_sha256_prefix":"6209c23f197fcf2c","entry":"yens_ksp","repo":"utahnlp/prompts-for-structures","repo_kind":"official","path":"src/graph.py","file_url":"https://github.com/utahnlp/prompts-for-structures/blob/HEAD/src/graph.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":"6209c23f197fcf2c"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}