{"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/2408-03246","title":"Making Long-Context Language Models Better Multi-Hop Reasoners","arxiv_id":"2408.03246","date":"2024-08-06","proceeding":null,"authors":["Yanyang Li","Shuo Liang","Michael R. Lyu","LiWei Wang"],"abstract":"Recent advancements in long-context modeling have enhanced language models (LMs) for complex tasks across multiple NLP applications. Despite this progress, we find that these models struggle with multi-hop reasoning and exhibit decreased performance in the presence of noisy contexts. In this paper, we introduce Reasoning with Attributions, a novel approach that prompts LMs to supply attributions for each assertion during their reasoning. We validate our approach through experiments on three multi-hop datasets, employing both proprietary and open-source models, and demonstrate its efficacy and resilience. Furthermore, we explore methods to augment reasoning capabilities via fine-tuning and offer an attribution-annotated dataset and a specialized training strategy. Our fine-tuned model achieves competitive performance on multi-hop reasoning benchmarks, closely paralleling proprietary LMs such as ChatGPT and Claude-instant.","url_abs":"https://arxiv.org/abs/2408.03246v1","url_pdf":"https://arxiv.org/pdf/2408.03246v1.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":"2408-03246","repo_url":"https://github.com/lavi-lab/longcontextreasoner","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"none","reach":null}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2408.03246","atlas_url":"https://app.syntology.ai/?focus=2408.03246","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2408.03246"}},"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/lavi-lab/longcontextreasoner","reach":null}],"summary":{"ran":4,"ran_draft_wrong":3},"by_repo_kind":{"official":{"samples":7,"ran":7,"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":"88820be8a1a1e750","entry":"Evidence","repo":"lavi-lab/longcontextreasoner","repo_kind":"official","path":"common.py","file_url":"https://github.com/lavi-lab/longcontextreasoner/blob/HEAD/common.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"88820be8a1a1e750"}},{"code_sha256_prefix":"f4be9d5f5352ce94","entry":"Instance","repo":"lavi-lab/longcontextreasoner","repo_kind":"official","path":"common.py","file_url":"https://github.com/lavi-lab/longcontextreasoner/blob/HEAD/common.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f4be9d5f5352ce94"}},{"code_sha256_prefix":"07715f312f69c9d9","entry":"PromptTemplate","repo":"lavi-lab/longcontextreasoner","repo_kind":"official","path":"common.py","file_url":"https://github.com/lavi-lab/longcontextreasoner/blob/HEAD/common.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"07715f312f69c9d9"}},{"code_sha256_prefix":"b32c2ee36198ee17","entry":"Thought","repo":"lavi-lab/longcontextreasoner","repo_kind":"official","path":"common.py","file_url":"https://github.com/lavi-lab/longcontextreasoner/blob/HEAD/common.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b32c2ee36198ee17"}},{"code_sha256_prefix":"2ab175c33301ed89","entry":"from_sample_to_instance","repo":"lavi-lab/longcontextreasoner","repo_kind":"official","path":"common.py","file_url":"https://github.com/lavi-lab/longcontextreasoner/blob/HEAD/common.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2ab175c33301ed89"}},{"code_sha256_prefix":"44d2cdf12ebc2222","entry":"get_prompt_from_instance","repo":"lavi-lab/longcontextreasoner","repo_kind":"official","path":"common.py","file_url":"https://github.com/lavi-lab/longcontextreasoner/blob/HEAD/common.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"44d2cdf12ebc2222"}},{"code_sha256_prefix":"59973ecb913e19ac","entry":"quotation_identification","repo":"lavi-lab/longcontextreasoner","repo_kind":"official","path":"common.py","file_url":"https://github.com/lavi-lab/longcontextreasoner/blob/HEAD/common.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"59973ecb913e19ac"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}