Get the latest tech news

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


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 during inference to use search engines is not optimal, since the LLM does not learn how to optimally interact with the search engine. This paper introduces Search-R1, an extension of the DeepSeek-R1 model where the LLM learns -- solely through reinforcement learning (RL) -- to autonomously generate (multiple) search queries during step-by-step reasoning with real-time retrieval. Search-R1 optimizes LLM rollouts 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 26% (Qwen2.5-7B), 21% (Qwen2.5-3B), and 10% (LLaMA3.2-3B) over strong baselines. 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.

View a PDF of the paper titled Search-R1: Training LLMs to Reason and Leverage Search Engines with Reinforcement Learning, by Bowen Jin and 5 other authors View PDFHTML (experimental) Abstract:Efficiently acquiring external knowledge and up-to-date information is essential for effective reasoning and text generation in large language models (LLMs). Search-R1 optimizes LLM rollouts with multi-turn search interactions, leveraging retrieved token masking for stable RL training and a simple outcome-based reward function.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of LLMs

LLMs

Photo of reason

reason

Related news:

News photo

There's one reason why I'm not writing off the Pixel 10 Pro Fold... yet

News photo

I'm not exactly sold on the Abxylute One Pro for one reason

News photo

Automating Interactive Fiction Logic Generation with LLMs in Emacs