{"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/compact-compressing-retrieved-documents","title":"CompAct: Compressing Retrieved Documents Actively for Question Answering","arxiv_id":"2407.09014","date":"2024-07-12","proceeding":null,"authors":["Chanwoong Yoon","Taewhoo Lee","Hyeon Hwang","Minbyul Jeong","Jaewoo Kang"],"abstract":"Retrieval-augmented generation supports language models to strengthen their factual groundings by providing external contexts. However, language models often face challenges when given extensive information, diminishing their effectiveness in solving questions. Context compression tackles this issue by filtering out irrelevant information, but current methods still struggle in realistic scenarios where crucial information cannot be captured with a single-step approach. To overcome this limitation, we introduce CompAct, a novel framework that employs an active strategy to condense extensive documents without losing key information. Our experiments demonstrate that CompAct brings significant improvements in both performance and compression rate on multi-hop question-answering benchmarks. CompAct flexibly operates as a cost-efficient plug-in module with various off-the-shelf retrievers or readers, achieving exceptionally high compression rates (47x).","url_abs":"https://arxiv.org/abs/2407.09014v3","url_pdf":"https://arxiv.org/pdf/2407.09014v3.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":"compact-compressing-retrieved-documents","repo_url":"https://github.com/dmis-lab/compact","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"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":"retrieval-augmented-generation","task_name":"Retrieval-augmented Generation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2407.09014","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2407.09014"}},"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/dmis-lab/compact","reach":{"status":"ok"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/dmis-lab/CompAct","reach":{"status":"ok"}}],"summary":{"ran":6,"ran_violates":1,"unverified":3},"by_repo_kind":{"official":{"samples":10,"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":10,"samples":[{"code_sha256_prefix":"9be97bcdb51fd634","entry":"apply_chat_template","repo":"dmis-lab/CompAct","repo_kind":"official","path":"alignment-handbook/src/alignment/data.py","file_url":"https://github.com/dmis-lab/CompAct/blob/HEAD/alignment-handbook/src/alignment/data.py","link_basis":"harvester_set","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":"9be97bcdb51fd634"}},{"code_sha256_prefix":"de1f2a7546b67b6a","entry":"create_prompt","repo":"dmis-lab/CompAct","repo_kind":"official","path":"utils.py","file_url":"https://github.com/dmis-lab/CompAct/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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"de1f2a7546b67b6a"}},{"code_sha256_prefix":"0edeacd7a9034f53","entry":"extract_docstring","repo":"dmis-lab/CompAct","repo_kind":"official","path":"alignment-handbook/src/alignment/decontaminate.py","file_url":"https://github.com/dmis-lab/CompAct/blob/HEAD/alignment-handbook/src/alignment/decontaminate.py","link_basis":"harvester_set","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":"0edeacd7a9034f53"}},{"code_sha256_prefix":"09b933c4a5249e81","entry":"get_dataset","repo":"dmis-lab/CompAct","repo_kind":"official","path":"utils.py","file_url":"https://github.com/dmis-lab/CompAct/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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"09b933c4a5249e81"}},{"code_sha256_prefix":"4253aac010c4504f","entry":"is_openai_format","repo":"dmis-lab/CompAct","repo_kind":"official","path":"alignment-handbook/src/alignment/data.py","file_url":"https://github.com/dmis-lab/CompAct/blob/HEAD/alignment-handbook/src/alignment/data.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4253aac010c4504f"}},{"code_sha256_prefix":"a3791c5c2185e013","entry":"load_dataset_column","repo":"dmis-lab/CompAct","repo_kind":"official","path":"alignment-handbook/src/alignment/decontaminate.py","file_url":"https://github.com/dmis-lab/CompAct/blob/HEAD/alignment-handbook/src/alignment/decontaminate.py","link_basis":"harvester_set","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":"a3791c5c2185e013"}},{"code_sha256_prefix":"f43e59d239019e86","entry":"normalize_whitespace","repo":"dmis-lab/CompAct","repo_kind":"official","path":"alignment-handbook/src/alignment/decontaminate.py","file_url":"https://github.com/dmis-lab/CompAct/blob/HEAD/alignment-handbook/src/alignment/decontaminate.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f43e59d239019e86"}},{"code_sha256_prefix":"7a4988952dd3a127","entry":"calculate_matches","repo":"dmis-lab/CompAct","repo_kind":"official","path":"evaluate.py","file_url":"https://github.com/dmis-lab/CompAct/blob/HEAD/evaluate.py","link_basis":"harvester_set","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":"7a4988952dd3a127"}},{"code_sha256_prefix":"637b51b8df78832a","entry":"check_answer","repo":"dmis-lab/CompAct","repo_kind":"official","path":"evaluate.py","file_url":"https://github.com/dmis-lab/CompAct/blob/HEAD/evaluate.py","link_basis":"harvester_set","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":"637b51b8df78832a"}},{"code_sha256_prefix":"fa4ecbff4b9a354b","entry":"has_answer","repo":"dmis-lab/CompAct","repo_kind":"official","path":"evaluate.py","file_url":"https://github.com/dmis-lab/CompAct/blob/HEAD/evaluate.py","link_basis":"harvester_set","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":"fa4ecbff4b9a354b"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}