Search-R1: Training LLMs to Reason and Leverage Search Engines with Reinforcement Learning

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Jin, Bowen, Zeng, Hansi, Yue, Zhenrui, Yoon, Jinsung, Arik, Sercan, Wang, Dong, Zamani, Hamed, Han, Jiawei
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866912521805365248
author Jin, Bowen
Zeng, Hansi
Yue, Zhenrui
Yoon, Jinsung
Arik, Sercan
Wang, Dong
Zamani, Hamed
Han, Jiawei
author_facet Jin, Bowen
Zeng, Hansi
Yue, Zhenrui
Yoon, Jinsung
Arik, Sercan
Wang, Dong
Zamani, Hamed
Han, Jiawei
contents Efficiently acquiring external knowledge and up-to-date information is essential for effective reasoning and text generation in large language models (LLMs). Prompting advanced LLMs with reasoning capabilities to use search engines during inference is often suboptimal, as the LLM might not fully possess the capability on how to interact optimally with the search engine. This paper introduces Search-R1, an extension of reinforcement learning (RL) for reasoning frameworks where the LLM learns to autonomously generate (multiple) search queries during step-by-step reasoning with real-time retrieval. Search-R1 optimizes LLM reasoning trajectories with multi-turn search interactions, leveraging retrieved token masking for stable RL training and a simple outcome-based reward function. Experiments on seven question-answering datasets show that Search-R1 improves performance by 41% (Qwen2.5-7B) and 20% (Qwen2.5-3B) over various RAG baselines under the same setting. This paper further provides empirical insights into RL optimization methods, LLM choices, and response length dynamics in retrieval-augmented reasoning. The code and model checkpoints are available at https://github.com/PeterGriffinJin/Search-R1.
format Preprint
id arxiv_https___arxiv_org_abs_2503_09516
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Search-R1: Training LLMs to Reason and Leverage Search Engines with Reinforcement Learning
Jin, Bowen
Zeng, Hansi
Yue, Zhenrui
Yoon, Jinsung
Arik, Sercan
Wang, Dong
Zamani, Hamed
Han, Jiawei
Computation and Language
Artificial Intelligence
Information Retrieval
Efficiently acquiring external knowledge and up-to-date information is essential for effective reasoning and text generation in large language models (LLMs). Prompting advanced LLMs with reasoning capabilities to use search engines during inference is often suboptimal, as the LLM might not fully possess the capability on how to interact optimally with the search engine. This paper introduces Search-R1, an extension of reinforcement learning (RL) for reasoning frameworks where the LLM learns to autonomously generate (multiple) search queries during step-by-step reasoning with real-time retrieval. Search-R1 optimizes LLM reasoning trajectories with multi-turn search interactions, leveraging retrieved token masking for stable RL training and a simple outcome-based reward function. Experiments on seven question-answering datasets show that Search-R1 improves performance by 41% (Qwen2.5-7B) and 20% (Qwen2.5-3B) over various RAG baselines under the same setting. This paper further provides empirical insights into RL optimization methods, LLM choices, and response length dynamics in retrieval-augmented reasoning. The code and model checkpoints are available at https://github.com/PeterGriffinJin/Search-R1.
title Search-R1: Training LLMs to Reason and Leverage Search Engines with Reinforcement Learning
topic Computation and Language
Artificial Intelligence
Information Retrieval
url https://arxiv.org/abs/2503.09516