{"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/augmentation-adapted-retriever-improves","title":"Augmentation-Adapted Retriever Improves Generalization of Language Models as Generic Plug-In","arxiv_id":"2305.17331","date":"2023-05-27","proceeding":null,"authors":["Zichun Yu","Chenyan Xiong","Shi Yu","Zhiyuan Liu"],"abstract":"Retrieval augmentation can aid language models (LMs) in knowledge-intensive tasks by supplying them with external information. Prior works on retrieval augmentation usually jointly fine-tune the retriever and the LM, making them closely coupled. In this paper, we explore the scheme of generic retrieval plug-in: the retriever is to assist target LMs that may not be known beforehand or are unable to be fine-tuned together. To retrieve useful documents for unseen target LMs, we propose augmentation-adapted retriever (AAR), which learns LM's preferences obtained from a known source LM. Experiments on the MMLU and PopQA datasets demonstrate that our AAR trained with a small source LM is able to significantly improve the zero-shot generalization of larger target LMs ranging from 250M Flan-T5 to 175B InstructGPT. Further analysis indicates that the preferences of different LMs overlap, enabling AAR trained with a single source LM to serve as a generic plug-in for various target LMs. Our code is open-sourced at https://github.com/OpenMatch/Augmentation-Adapted-Retriever.","url_abs":"https://arxiv.org/abs/2305.17331v1","url_pdf":"https://arxiv.org/pdf/2305.17331v1.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":"augmentation-adapted-retriever-improves","repo_url":"https://github.com/openmatch/augmentation-adapted-retriever","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"augmentation-adapted-retriever-improves","repo_url":"https://github.com/ruc-nlpir/flashrag","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"mmlu","task_name":"MMLU"},{"task_slug":"retrieval","task_name":"Retrieval"},{"task_slug":"zero-shot-generalization","task_name":"Zero-shot Generalization"}],"methods":[{"method_slug":"flan-t5","method_name":"Flan-T5"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2305.17331","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2305.17331"}},"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/openmatch/augmentation-adapted-retriever","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ruc-nlpir/flashrag","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/OpenMatch/Augmentation-Adapted-Retriever","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/openai/chatgpt-retrieval-plugin","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":3,"ran_draft_wrong":1,"ran_violates":1,"unverified":6},"by_repo_kind":{"official":{"samples":7,"ran":3,"repositories":1},"listed":{"samples":2,"ran":2,"repositories":1},"found_in_text":{"samples":2,"ran":0,"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":"a682282c07342f6e","entry":"BaseRetriever","repo":"ruc-nlpir/flashrag","repo_kind":"listed","path":"flashrag/retriever/retriever.py","file_url":"https://github.com/ruc-nlpir/flashrag/blob/HEAD/flashrag/retriever/retriever.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":"a682282c07342f6e"}},{"code_sha256_prefix":"bab8ba3f385d2ae7","entry":"convert_numpy","repo":"ruc-nlpir/flashrag","repo_kind":"listed","path":"flashrag/retriever/retriever.py","file_url":"https://github.com/ruc-nlpir/flashrag/blob/HEAD/flashrag/retriever/retriever.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":"bab8ba3f385d2ae7"}},{"code_sha256_prefix":"b46a95cff9bf41b5","entry":"has_answers","repo":"OpenMatch/Augmentation-Adapted-Retriever","repo_kind":"official","path":"src/Retriever/qa_utils.py","file_url":"https://github.com/OpenMatch/Augmentation-Adapted-Retriever/blob/HEAD/src/Retriever/qa_utils.py","link_basis":"harvester_set","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":"b46a95cff9bf41b5"}},{"code_sha256_prefix":"8d2e5d58238cd53f","entry":"load_from_trec","repo":"OpenMatch/Augmentation-Adapted-Retriever","repo_kind":"official","path":"src/Retriever/utils.py","file_url":"https://github.com/OpenMatch/Augmentation-Adapted-Retriever/blob/HEAD/src/Retriever/utils.py","link_basis":"harvester_set","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":"8d2e5d58238cd53f"}},{"code_sha256_prefix":"93b0eef32604c3f7","entry":"regex_match","repo":"OpenMatch/Augmentation-Adapted-Retriever","repo_kind":"official","path":"src/Retriever/qa_utils.py","file_url":"https://github.com/OpenMatch/Augmentation-Adapted-Retriever/blob/HEAD/src/Retriever/qa_utils.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"93b0eef32604c3f7"}},{"code_sha256_prefix":"d6bb2b70f0c01eb0","entry":"fill_template","repo":"OpenMatch/Augmentation-Adapted-Retriever","repo_kind":"official","path":"src/Retriever/utils.py","file_url":"https://github.com/OpenMatch/Augmentation-Adapted-Retriever/blob/HEAD/src/Retriever/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d6bb2b70f0c01eb0"}},{"code_sha256_prefix":"caca62e96a19b300","entry":"find_all_markers","repo":"OpenMatch/Augmentation-Adapted-Retriever","repo_kind":"official","path":"src/Retriever/utils.py","file_url":"https://github.com/OpenMatch/Augmentation-Adapted-Retriever/blob/HEAD/src/Retriever/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"caca62e96a19b300"}},{"code_sha256_prefix":"1368abdb3d44d09f","entry":"get_chat_completion","repo":"openai/chatgpt-retrieval-plugin","repo_kind":"found_in_text","path":"services/openai.py","file_url":"https://github.com/openai/chatgpt-retrieval-plugin/blob/HEAD/services/openai.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1368abdb3d44d09f"}},{"code_sha256_prefix":"b009eb83df585f1c","entry":"get_embeddings","repo":"openai/chatgpt-retrieval-plugin","repo_kind":"found_in_text","path":"services/openai.py","file_url":"https://github.com/openai/chatgpt-retrieval-plugin/blob/HEAD/services/openai.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b009eb83df585f1c"}},{"code_sha256_prefix":"5648464c24fcb9de","entry":"get_idx","repo":"OpenMatch/Augmentation-Adapted-Retriever","repo_kind":"official","path":"src/Retriever/dataset/inference_dataset.py","file_url":"https://github.com/OpenMatch/Augmentation-Adapted-Retriever/blob/HEAD/src/Retriever/dataset/inference_dataset.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5648464c24fcb9de"}},{"code_sha256_prefix":"3d25cb3600eef8dc","entry":"load_beir_qrels","repo":"OpenMatch/Augmentation-Adapted-Retriever","repo_kind":"official","path":"src/Retriever/dataset/beir_dataset.py","file_url":"https://github.com/OpenMatch/Augmentation-Adapted-Retriever/blob/HEAD/src/Retriever/dataset/beir_dataset.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3d25cb3600eef8dc"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}