Papers › DeepRetrieval: Hacking Real Search Engines and Retrievers with Large Language Models...

DeepRetrieval: Hacking Real Search Engines and Retrievers with Large Language Models via Reinforcement Learning

28 Feb 2025arXiv:2503.00223archive 2025-07-28

Pengcheng Jiang, Jiacheng Lin, Lang Cao, Runchu Tian, SeongKu Kang, Zifeng Wang, Jimeng Sun, Jiawei Han

Information retrieval systems are crucial for enabling effective access to large document collections. Recent approaches have leveraged Large Language Models (LLMs) to enhance retrieval performance through query augmentation, but often rely on expensive supervised learning or distillation techniques that require significant computational resources and hand-labeled data. We introduce DeepRetrieval, a reinforcement learning (RL) approach that trains LLMs for query generation through trial and error without supervised data (reference query). Using retrieval metrics as rewards, our system generates queries that maximize retrieval performance. DeepRetrieval outperforms leading methods on literature search with 65.07% (vs. previous SOTA 24.68%) recall for publication search and 63.18% (vs. previous SOTA 32.11%) recall for trial search using real-world search engines. DeepRetrieval also dominates in evidence-seeking retrieval, classic information retrieval and SQL database search. With only 3B parameters, it outperforms industry-leading models like GPT-4o and Claude-3.5-Sonnet on 11/13 datasets. These results demonstrate that our RL approach offers a more efficient and effective paradigm for information retrieval. Our data and code are available at: https://github.com/pat-jj/DeepRetrieval.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2503.00223")

Code

Syntology Ran 1 of 25 code samples harvested from 1 repository linked to this paper; 24 have no recorded run. Of those that ran: 1 ran · our draft was wrong.

By repository: official repository: 25 samples from 1 repository, 1 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

pat-jj/deepretrieval officialmentioned in papermentioned on GitHubpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

25 samples harvested; 1 ran; 0 honoured the contract we drafted; 24 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · our draft was wrong
24unverified

Licence: 0 of the 25 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from pat-jj/deepretrieval. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: 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. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

nice_look_table pat-jj/deepretrieval/code/data_preprocess/bird.py official repository ran · our draft was wrong MIT (permissive) · 08dfd0c28c8d8777 · report
convert_dict_to_str pat-jj/deepretrieval/code/data_preprocess/ctgov.py official repository unverified MIT (permissive) · 6e8ab81618f0098c · report
convert_dict_to_str pat-jj/deepretrieval/code/data_preprocess/ctgov_32.py official repository unverified MIT (permissive) · faed77b9c35affca · report
create_huggingface_repo pat-jj/deepretrieval/code/upload_datasets.py official repository unverified MIT (permissive) · bc5d24e0433026c0 · report
extract_query pat-jj/deepretrieval/query_rewrite.py official repository unverified MIT (permissive) · b2c496f92d26455f · report
extract_query pat-jj/deepretrieval/code/src/query_rewrite.py official repository unverified MIT (permissive) · b83cfc67f1280b1b · report
format_prompt pat-jj/deepretrieval/query_rewrite.py official repository unverified MIT (permissive) · f4549a2164452ce1 · report
format_prompt pat-jj/deepretrieval/code/src/query_rewrite.py official repository unverified MIT (permissive) · dbf81b46206bc092 · report
generate_schema_prompt pat-jj/deepretrieval/code/data_preprocess/bird.py official repository unverified MIT (permissive) · a59933530f0ecb8e · report
get_upload_paths pat-jj/deepretrieval/code/upload_datasets.py official repository unverified MIT (permissive) · c6cc8b394729c034 · report
group_files_by_category pat-jj/deepretrieval/code/download_datasets.py official repository unverified MIT (permissive) · 1f087e4914635b4b · report
group_files_by_dataset pat-jj/deepretrieval/code/download_datasets.py official repository unverified MIT (permissive) · 4db3d8f4262c757d · report
list_available_files pat-jj/deepretrieval/code/download_datasets.py official repository unverified MIT (permissive) · 6f9a9a9fcea51423 · report
load_matching_dataset pat-jj/deepretrieval/code/data_preprocess/msmarco_sub.py official repository unverified MIT (permissive) · 9d324a33882b374b · report
make_prefix pat-jj/deepretrieval/code/data_preprocess/bird.py official repository unverified MIT (permissive) · 49231bf0422fb2d5 · report
make_prefix pat-jj/deepretrieval/code/data_preprocess/ctgov.py official repository unverified MIT (permissive) · bd162b7f6f193c7b · report
make_prefix pat-jj/deepretrieval/code/data_preprocess/fever.py official repository unverified MIT (permissive) · bc592fb448c2d78d · report
make_prefix pat-jj/deepretrieval/code/data_preprocess/fiqa.py official repository unverified MIT (permissive) · 606ffeb10da3d22e · report
make_prefix pat-jj/deepretrieval/code/data_preprocess/hotpotqa.py official repository unverified MIT (permissive) · 545e19c701f43c85 · report
make_prefix pat-jj/deepretrieval/code/data_preprocess/msmarco_beir.py official repository unverified MIT (permissive) · 1c8330e765ddfad8 · report
make_prefix pat-jj/deepretrieval/code/data_preprocess/msmarco_sub.py official repository unverified MIT (permissive) · f87645303568f144 · report
make_prefix_llama_32_3b pat-jj/deepretrieval/code/data_preprocess/ctgov_32.py official repository unverified MIT (permissive) · a949969186799c79 · report
parse_qrel pat-jj/deepretrieval/code/data_preprocess/fever.py official repository unverified MIT (permissive) · ca7c915d51ff8962 · report
rewrite_query pat-jj/deepretrieval/query_rewrite.py official repository unverified MIT (permissive) · 95a95645e65bef95 · report
should_skip_path pat-jj/deepretrieval/code/upload_datasets.py official repository unverified MIT (permissive) · 8579366f86217f73 · report

Tasks

Information RetrievalReinforcement LearningReinforcement Learning (RL)Retrievalreinforcement-learning

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections