{"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/arxiv-2511-07328","title":"Q-RAG: Long Context Multi-step Retrieval via Value-based Embedder Training","arxiv_id":"2511.07328","date":"2025-11-10","proceeding":"ICLR","authors":["Artyom Sorokin","Nazar Buzun","Alexander Anokhin","Oleg Inozemcev","Egor Vedernikov","Petr Anokhin","Mikhail Burtsev","Trushkov Alexey","Yin Wenshuai","Evgeny Burnaev"],"abstract":"Retrieval-Augmented Generation (RAG) methods enhance LLM performance by efficiently filtering relevant context for LLMs, reducing hallucinations and inference cost. However, most existing RAG methods focus on single-step retrieval, which is often insufficient for answering complex questions that require multi-step search. Recently, multi-step retrieval approaches have emerged, typically involving the fine-tuning of small LLMs to perform multi-step retrieval. This type of fine-tuning is highly resource-intensive and does not enable the use of larger LLMs. In this work, we propose Q-RAG, a novel approach that fine-tunes the Embedder model for multi-step retrieval using reinforcement learning (RL). Q-RAG offers a competitive, resource-efficient alternative to existing multi-step retrieval methods for open-domain question answering and achieves state-of-the-art results on the popular long-context benchmarks BabiLong and RULER for contexts up to 10M tokens. Code is available at https://github.com/griver/Q-RAG","url_abs":"https://arxiv.org/abs/2511.07328","url_pdf":"https://arxiv.org/pdf/2511.07328","source":{"archive":null,"snapshot":"2025-07-28","note":"not in the Papers with Code archive (frozen at the snapshot)","row_kind":"graph","title_abstract_authors_date":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)"},"code_links":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2511.07328","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2511.07328"}},"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":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/griver/Q-RAG","reach":null}],"summary":{"ran_draft_wrong":3,"ran_honours":2,"unverified":2},"by_repo_kind":{"found_in_text":{"samples":7,"ran":5,"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":7,"samples":[{"code_sha256_prefix":"5f4450da7942b5c4","entry":"calc_fact_f1_em","repo":"griver/Q-RAG","repo_kind":"found_in_text","path":"eval_retriever.py","file_url":"https://github.com/griver/Q-RAG/blob/HEAD/eval_retriever.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5f4450da7942b5c4"}},{"code_sha256_prefix":"e01d0df446b366b7","entry":"compute_exact_match","repo":"griver/Q-RAG","repo_kind":"found_in_text","path":"eval_llm_openqa.py","file_url":"https://github.com/griver/Q-RAG/blob/HEAD/eval_llm_openqa.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e01d0df446b366b7"}},{"code_sha256_prefix":"b51d54e1d87d8bd9","entry":"normalize_answer","repo":"griver/Q-RAG","repo_kind":"found_in_text","path":"eval_llm_openqa.py","file_url":"https://github.com/griver/Q-RAG/blob/HEAD/eval_llm_openqa.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b51d54e1d87d8bd9"}},{"code_sha256_prefix":"c40871c34e9da06d","entry":"prepare_config","repo":"griver/Q-RAG","repo_kind":"found_in_text","path":"train_q_rag.py","file_url":"https://github.com/griver/Q-RAG/blob/HEAD/train_q_rag.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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c40871c34e9da06d"}},{"code_sha256_prefix":"61e13a17611a99fc","entry":"recall","repo":"griver/Q-RAG","repo_kind":"found_in_text","path":"eval_llm_openqa.py","file_url":"https://github.com/griver/Q-RAG/blob/HEAD/eval_llm_openqa.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"61e13a17611a99fc"}},{"code_sha256_prefix":"c8e1121b50f445ae","entry":"load_config","repo":"griver/Q-RAG","repo_kind":"found_in_text","path":"train_q_rag.py","file_url":"https://github.com/griver/Q-RAG/blob/HEAD/train_q_rag.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":"c8e1121b50f445ae"}},{"code_sha256_prefix":"eb72bec3b81e3ed0","entry":"load_eval_config","repo":"griver/Q-RAG","repo_kind":"found_in_text","path":"eval_retriever.py","file_url":"https://github.com/griver/Q-RAG/blob/HEAD/eval_retriever.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":"eb72bec3b81e3ed0"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.LG","source":"arxiv_api"},"syntology_extracted_results":null}