{"paper":{"title":"Retrieval is Cheap, Show Me the Code: Executable Multi-Hop Reasoning for Retrieval-Augmented Generation","license":"http://arxiv.org/licenses/nonexclusive-distrib/1.0/","headline":"PyRAG reformulates multi-hop RAG as synthesis and execution of Python programs over retrieval tools.","cross_cats":[],"primary_cat":"cs.AI","authors_text":"Ge Liu, Jash Rajesh Parekh, Jiajun Fan, Jiashuo Sun, Jiawei Han, Jimeng Shi, Peiran Li, Pengcheng Jiang, Qinglong Zheng, Saizhuo Wang, Shaowen Wang, Yixuan Xie, Zhiyi Shi","submitted_at":"2026-05-13T04:14:13Z","abstract_excerpt":"Retrieval-Augmented Generation (RAG) has become a standard approach for knowledge-intensive question answering, but existing systems remain brittle on multi-hop questions, where solving the task requires chaining multiple retrieval and reasoning steps. Key challenges are that current methods represent reasoning through free-form natural language, where intermediate states are implicit, retrieval queries can drift from intended entities, and errors are detected by the same model that produces them making self-reflection an unreliable, ungrounded signal.\n  We observe that multi-hop question answ"},"claims":{"count":4,"items":[{"kind":"strongest_claim","text":"PyRAG reformulates multi-hop RAG as program synthesis and execution, enabling compiler-grounded self-repair and execution-driven adaptive retrieval without any additional training, and consistently outperforms strong baselines on five QA benchmarks with large gains on compositional multi-hop datasets.","source":"verdict.strongest_claim","status":"machine_extracted","claim_id":"C1","attestation":"unclaimed"},{"kind":"weakest_assumption","text":"That code-specialized language models can reliably synthesize correct executable programs for multi-hop reasoning and that execution feedback alone suffices for self-repair without additional training or human oversight.","source":"verdict.weakest_assumption","status":"machine_extracted","claim_id":"C2","attestation":"unclaimed"},{"kind":"one_line_summary","text":"PyRAG turns multi-hop reasoning into executable Python code over retrieval tools for explicit, verifiable step-by-step RAG.","source":"verdict.one_line_summary","status":"machine_extracted","claim_id":"C3","attestation":"unclaimed"},{"kind":"headline","text":"PyRAG reformulates multi-hop RAG as synthesis and execution of Python programs over retrieval tools.","source":"verdict.pith_extraction.headline","status":"machine_extracted","claim_id":"C4","attestation":"unclaimed"}],"snapshot_sha256":"6b567fa34c9b29c699e967492ebebbdc3b88ea368fcf26988fb8075d3eaf7c6b"},"source":{"id":"2605.12975","kind":"arxiv","version":1},"verdict":{"id":"39d37e6d-7d48-41cb-a11b-8896600d4507","model_set":{"reader":"grok-4.3"},"created_at":"2026-05-14T19:59:18.013477Z","strongest_claim":"PyRAG reformulates multi-hop RAG as program synthesis and execution, enabling compiler-grounded self-repair and execution-driven adaptive retrieval without any additional training, and consistently outperforms strong baselines on five QA benchmarks with large gains on compositional multi-hop datasets.","one_line_summary":"PyRAG turns multi-hop reasoning into executable Python code over retrieval tools for explicit, verifiable step-by-step RAG.","pipeline_version":"pith-pipeline@v0.9.0","weakest_assumption":"That code-specialized language models can reliably synthesize correct executable programs for multi-hop reasoning and that execution feedback alone suffices for self-repair without additional training or human oversight.","pith_extraction_headline":"PyRAG reformulates multi-hop RAG as synthesis and execution of Python programs over retrieval tools."},"references":{"count":51,"sample":[{"doi":"","year":2026,"title":"Pathrag: Pruning graph-based retrieval augmented generation with relational paths","work_id":"cd70c5f3-52f2-4dd8-8e03-f154e0c5499d","ref_index":1,"cited_arxiv_id":"","is_internal_anchor":false},{"doi":"","year":2025,"title":"ReSearch: Learning to Reason with Search for LLMs via Reinforcement Learning","work_id":"cc9775d9-2fbd-4690-a641-2b50ae4a59dc","ref_index":2,"cited_arxiv_id":"2503.19470","is_internal_anchor":true},{"doi":"","year":2022,"title":"Program of Thoughts Prompting: Disentangling Computation from Reasoning for Numerical Reasoning Tasks","work_id":"618aa44c-a6c6-425c-abce-8aa8aa842921","ref_index":3,"cited_arxiv_id":"2211.12588","is_internal_anchor":true},{"doi":"","year":2022,"title":"Binding language models in symbolic languages.arXiv preprint arXiv:2210.02875","work_id":"f8fe6642-904b-44b0-a533-ae63c3a213e1","ref_index":4,"cited_arxiv_id":"","is_internal_anchor":false},{"doi":"","year":2024,"title":"From Local to Global: A Graph RAG Approach to Query-Focused Summarization","work_id":"588618d7-fd41-4053-b34d-a981f8793039","ref_index":5,"cited_arxiv_id":"2404.16130","is_internal_anchor":true}],"resolved_work":51,"snapshot_sha256":"623aa3942647c3c84ce1b82dd39849253305f391dfcfb130f4d96e437d2e6bc8","internal_anchors":13},"formal_canon":{"evidence_count":2,"snapshot_sha256":"db6ce467eafda4bb230b655df36ffccf128fe248380b1cd95565d260e65d3f0c"},"author_claims":{"count":0,"strong_count":0,"snapshot_sha256":"258153158e38e3291e3d48162225fcdb2d5a3ed65a07baac614ab91432fd4f57"},"builder_version":"pith-number-builder-2026-05-17-v1"}