{"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/retrieval-enhanced-knowledge-editing-for","title":"Retrieval-enhanced Knowledge Editing in Language Models for Multi-Hop Question Answering","arxiv_id":"2403.19631","date":"2024-03-28","proceeding":null,"authors":["Yucheng Shi","Qiaoyu Tan","Xuansheng Wu","Shaochen Zhong","Kaixiong Zhou","Ninghao Liu"],"abstract":"Large Language Models (LLMs) have shown proficiency in question-answering tasks but often struggle to integrate real-time knowledge, leading to potentially outdated or inaccurate responses. This problem becomes even more challenging when dealing with multi-hop questions, since they require LLMs to update and integrate multiple knowledge pieces relevant to the questions. To tackle the problem, we propose the Retrieval-Augmented model Editing (RAE) framework for multi-hop question answering. RAE first retrieves edited facts and then refines the language model through in-context learning. Specifically, our retrieval approach, based on mutual information maximization, leverages the reasoning abilities of LLMs to identify chain facts that traditional similarity-based searches might miss. In addition, our framework includes a pruning strategy to eliminate redundant information from the retrieved facts, which enhances the editing accuracy and mitigates the hallucination problem. Our framework is supported by theoretical justification for its fact retrieval efficacy. Finally, comprehensive evaluation across various LLMs validates RAE's ability in providing accurate answers with updated knowledge. Our code is available at: https://github.com/sycny/RAE.","url_abs":"https://arxiv.org/abs/2403.19631v2","url_pdf":"https://arxiv.org/pdf/2403.19631v2.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":"retrieval-enhanced-knowledge-editing-for","repo_url":"https://github.com/sycny/rae","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"hallucination","task_name":"Hallucination"},{"task_slug":"in-context-learning","task_name":"In-Context Learning"},{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"model-editing","task_name":"Model Editing"},{"task_slug":"multi-hop-question-answering","task_name":"Multi-hop Question Answering"},{"task_slug":"question-answering","task_name":"Question Answering"},{"task_slug":"retrieval","task_name":"Retrieval"},{"task_slug":"knowledge-editing","task_name":"knowledge editing"}],"methods":[{"method_slug":"pruning","method_name":"Pruning"},{"method_slug":"rae","method_name":"RAE"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2403.19631","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2403.19631"}},"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/sycny/rae","reach":{"status":"ok"}}],"summary":{"ran":6,"unverified":2},"by_repo_kind":{"official":{"samples":8,"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":8,"samples":[{"code_sha256_prefix":"1817a570e2d473e2","entry":"QA_func","repo":"sycny/rae","repo_kind":"official","path":"utils_func.py","file_url":"https://github.com/sycny/rae/blob/HEAD/utils_func.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":"1817a570e2d473e2"}},{"code_sha256_prefix":"2e1d018f8ddcd027","entry":"find_lines_by_entity","repo":"sycny/rae","repo_kind":"official","path":"preprocess/edit_KG.py","file_url":"https://github.com/sycny/rae/blob/HEAD/preprocess/edit_KG.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":"2e1d018f8ddcd027"}},{"code_sha256_prefix":"c00af984e543d0dd","entry":"load_dataset","repo":"sycny/rae","repo_kind":"official","path":"preprocess/edit_KG.py","file_url":"https://github.com/sycny/rae/blob/HEAD/preprocess/edit_KG.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":"c00af984e543d0dd"}},{"code_sha256_prefix":"69e888532c040d61","entry":"load_orig_entity","repo":"sycny/rae","repo_kind":"official","path":"utils_func.py","file_url":"https://github.com/sycny/rae/blob/HEAD/utils_func.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":"69e888532c040d61"}},{"code_sha256_prefix":"807f2835b6163e5d","entry":"load_triplets_dict","repo":"sycny/rae","repo_kind":"official","path":"preprocess/edit_KG.py","file_url":"https://github.com/sycny/rae/blob/HEAD/preprocess/edit_KG.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":"807f2835b6163e5d"}},{"code_sha256_prefix":"9d6ff11a81f28788","entry":"match_func","repo":"sycny/rae","repo_kind":"official","path":"utils_func.py","file_url":"https://github.com/sycny/rae/blob/HEAD/utils_func.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":"9d6ff11a81f28788"}},{"code_sha256_prefix":"e0139a00f5a1bfc9","entry":"getp","repo":"sycny/rae","repo_kind":"official","path":"wiki_api/wikidata.py","file_url":"https://github.com/sycny/rae/blob/HEAD/wiki_api/wikidata.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":"e0139a00f5a1bfc9"}},{"code_sha256_prefix":"8adf2433e4058945","entry":"id2entity","repo":"sycny/rae","repo_kind":"official","path":"wiki_api/wikidata.py","file_url":"https://github.com/sycny/rae/blob/HEAD/wiki_api/wikidata.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":"8adf2433e4058945"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}