{"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-2604-22661","title":"Can QPP Choose the Right Query Variant? Evaluating Query Variant Selection for RAG Pipelines","arxiv_id":"2604.22661","date":"2026-04-24","proceeding":null,"authors":["Negar Arabzadeh","Andrew Drozdov","Michael Bendersky","Matei Zaharia"],"abstract":"Large Language Models (LLMs) have made query reformulation ubiquitous in modern retrieval and Retrieval-Augmented Generation (RAG) pipelines, enabling the generation of multiple semantically equivalent query variants. However, executing the full pipeline for every reformulation is computationally expensive, motivating selective execution: can we identify the best query variant before incurring downstream retrieval and generation costs? We investigate Query Performance Prediction (QPP) as a mechanism for variant selection across ad-hoc retrieval and end-to-end RAG. Unlike traditional QPP, which estimates query difficulty across topics, we study intra-topic discrimination - selecting the optimal reformulation among competing variants of the same information need. Through large-scale experiments on TREC-RAG using both sparse and dense retrievers, we evaluate pre- and post-retrieval predictors under correlation- and decision-based metrics. Our results reveal a systematic divergence between retrieval and generation objectives: variants that maximize ranking metrics such as nDCG often fail to produce the best generated answers, exposing a \"utility gap\" between retrieval relevance and generation fidelity. Nevertheless, QPP can reliably identify variants that improve end-to-end quality over the original query. Notably, lightweight pre-retrieval predictors frequently match or outperform more expensive post-retrieval methods, offering a latency-efficient approach to robust RAG.","url_abs":"https://arxiv.org/abs/2604.22661","url_pdf":"https://arxiv.org/pdf/2604.22661","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":null,"mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2604.22661"}},"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/Narabzad/QPP-4-RAG","reach":null}],"summary":{"ran":11,"unverified":8},"by_repo_kind":{"found_in_text":{"samples":19,"ran":11,"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":"65c2bbc2b1ae6508","entry":"RM1_from_text","repo":"Narabzad/QPP-4-RAG","repo_kind":"found_in_text","path":"querygym/qpp/run_clarity_from_text.py","file_url":"https://github.com/Narabzad/QPP-4-RAG/blob/HEAD/querygym/qpp/run_clarity_from_text.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":"65c2bbc2b1ae6508"}},{"code_sha256_prefix":"da1bdb0fd0fac0ac","entry":"extract_data_for_correlation","repo":"Narabzad/QPP-4-RAG","repo_kind":"found_in_text","path":"querygym/analyze_nugget_qpp_correlations.py","file_url":"https://github.com/Narabzad/QPP-4-RAG/blob/HEAD/querygym/analyze_nugget_qpp_correlations.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":"da1bdb0fd0fac0ac"}},{"code_sha256_prefix":"9020a6c44731fef1","entry":"extract_top_qpp_reformulations","repo":"Narabzad/QPP-4-RAG","repo_kind":"found_in_text","path":"querygym/get_top_qpp_reformulations.py","file_url":"https://github.com/Narabzad/QPP-4-RAG/blob/HEAD/querygym/get_top_qpp_reformulations.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":"9020a6c44731fef1"}},{"code_sha256_prefix":"b014346a20727cb7","entry":"get_all_qpp_methods","repo":"Narabzad/QPP-4-RAG","repo_kind":"found_in_text","path":"querygym/get_top_qpp_reformulations.py","file_url":"https://github.com/Narabzad/QPP-4-RAG/blob/HEAD/querygym/get_top_qpp_reformulations.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":"b014346a20727cb7"}},{"code_sha256_prefix":"713b9b714a8f6bcc","entry":"get_all_qpp_metrics","repo":"Narabzad/QPP-4-RAG","repo_kind":"found_in_text","path":"querygym/analyze_qpp_oracle_performance.py","file_url":"https://github.com/Narabzad/QPP-4-RAG/blob/HEAD/querygym/analyze_qpp_oracle_performance.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":"713b9b714a8f6bcc"}},{"code_sha256_prefix":"fa3ad2aea7a350a9","entry":"get_cross_encoder_model","repo":"Narabzad/QPP-4-RAG","repo_kind":"found_in_text","path":"querygym/run_bert_qpp.py","file_url":"https://github.com/Narabzad/QPP-4-RAG/blob/HEAD/querygym/run_bert_qpp.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":"fa3ad2aea7a350a9"}},{"code_sha256_prefix":"03c65479d21484de","entry":"get_doc_term_freqs","repo":"Narabzad/QPP-4-RAG","repo_kind":"found_in_text","path":"querygym/qpp/run_clarity_from_text.py","file_url":"https://github.com/Narabzad/QPP-4-RAG/blob/HEAD/querygym/qpp/run_clarity_from_text.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":"03c65479d21484de"}},{"code_sha256_prefix":"02e3825c62997adf","entry":"load_queries","repo":"Narabzad/QPP-4-RAG","repo_kind":"found_in_text","path":"querygym/run_bert_qpp.py","file_url":"https://github.com/Narabzad/QPP-4-RAG/blob/HEAD/querygym/run_bert_qpp.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":"02e3825c62997adf"}},{"code_sha256_prefix":"1144f1e29cc4fa45","entry":"load_retrieval_run_file","repo":"Narabzad/QPP-4-RAG","repo_kind":"found_in_text","path":"querygym/run_bert_qpp.py","file_url":"https://github.com/Narabzad/QPP-4-RAG/blob/HEAD/querygym/run_bert_qpp.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":"1144f1e29cc4fa45"}},{"code_sha256_prefix":"befdda679e933e1e","entry":"run_scoring","repo":"Narabzad/QPP-4-RAG","repo_kind":"found_in_text","path":"querygym/run_rag_nuggetizer.py","file_url":"https://github.com/Narabzad/QPP-4-RAG/blob/HEAD/querygym/run_rag_nuggetizer.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":"befdda679e933e1e"}},{"code_sha256_prefix":"88d82053714e947e","entry":"setup_openai_api_key","repo":"Narabzad/QPP-4-RAG","repo_kind":"found_in_text","path":"querygym/run_rag_generation_only.py","file_url":"https://github.com/Narabzad/QPP-4-RAG/blob/HEAD/querygym/run_rag_generation_only.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"88d82053714e947e"}},{"code_sha256_prefix":"fc1d3c8f3c10c928","entry":"CLARITY","repo":"Narabzad/QPP-4-RAG","repo_kind":"found_in_text","path":"querygym/qpp/run_clarity_from_text.py","file_url":"https://github.com/Narabzad/QPP-4-RAG/blob/HEAD/querygym/qpp/run_clarity_from_text.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":"fc1d3c8f3c10c928"}},{"code_sha256_prefix":"d75693278e80c095","entry":"analyze_qpp_oracle_performance","repo":"Narabzad/QPP-4-RAG","repo_kind":"found_in_text","path":"querygym/analyze_qpp_oracle_performance.py","file_url":"https://github.com/Narabzad/QPP-4-RAG/blob/HEAD/querygym/analyze_qpp_oracle_performance.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":"d75693278e80c095"}},{"code_sha256_prefix":"7c838f84a3939965","entry":"calculate_correlations","repo":"Narabzad/QPP-4-RAG","repo_kind":"found_in_text","path":"querygym/analyze_nugget_qpp_correlations.py","file_url":"https://github.com/Narabzad/QPP-4-RAG/blob/HEAD/querygym/analyze_nugget_qpp_correlations.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":"7c838f84a3939965"}},{"code_sha256_prefix":"2eabbea57b3c0bda","entry":"calculate_correlations","repo":"Narabzad/QPP-4-RAG","repo_kind":"found_in_text","path":"querygym/analyze_qpp_correlations.py","file_url":"https://github.com/Narabzad/QPP-4-RAG/blob/HEAD/querygym/analyze_qpp_correlations.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":"2eabbea57b3c0bda"}},{"code_sha256_prefix":"0b535ecda28038b9","entry":"evaluation","repo":"Narabzad/QPP-4-RAG","repo_kind":"found_in_text","path":"QPP4CS/evaluation_QPP.py","file_url":"https://github.com/Narabzad/QPP-4-RAG/blob/HEAD/QPP4CS/evaluation_QPP.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":"0b535ecda28038b9"}},{"code_sha256_prefix":"f203650ab4b737a0","entry":"get_all_qpp_metrics","repo":"Narabzad/QPP-4-RAG","repo_kind":"found_in_text","path":"querygym/analyze_qpp_correlations.py","file_url":"https://github.com/Narabzad/QPP-4-RAG/blob/HEAD/querygym/analyze_qpp_correlations.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":"f203650ab4b737a0"}},{"code_sha256_prefix":"026ed0d5c10b5c62","entry":"get_qpp_score","repo":"Narabzad/QPP-4-RAG","repo_kind":"found_in_text","path":"querygym/get_top_qpp_reformulations.py","file_url":"https://github.com/Narabzad/QPP-4-RAG/blob/HEAD/querygym/get_top_qpp_reformulations.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":"026ed0d5c10b5c62"}},{"code_sha256_prefix":"bc1b076ebd35d7cc","entry":"load_consolidated_data","repo":"Narabzad/QPP-4-RAG","repo_kind":"found_in_text","path":"querygym/analyze_nugget_qpp_correlations.py","file_url":"https://github.com/Narabzad/QPP-4-RAG/blob/HEAD/querygym/analyze_nugget_qpp_correlations.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":"bc1b076ebd35d7cc"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.CL","source":"arxiv_2026.jsonl"},"syntology_extracted_results":{"kind":"leaderboard_placements","source":"Syntology's leaderboard-shaped extractor over the paper's own arXiv-HTML tables: a model pointed at a cell, the number was read from that cell and checked against the board's metric, dataset, split and scale, and an independent check accepted the entry; not reviewed by the paper's authors or the archive's editors","extractor_model":"global.anthropic.claude-sonnet-4-5-20250929-v1:0","verifier_model":null,"prompt_sha":"fa63d4bb9d755694","coverage":{"sentence":"Syntology has checked 6,264 of the 9,581 papers on this site that are newer than the archive; results from the others appear after they are checked.","papers_newer_than_archive":9581,"papers_checked":6264},"entries":[],"not_placed":{"boards":0,"rejected_by_independent_check":0,"refused_by_a_rule":0,"check_did_not_answer":0,"proposed_without_a_cell":0,"declined_by_site":0}}}