ResearchResearch paperLarge Language Models · Retrieval, RAG & Search · Reinforcement Learning1 source · Oct 17, 2026

Learning to Program Retrievals: Composing Search Primitives via Reinforcement Learning

We introduce Retrieval Program Learning (RPL), a programmable search framework that allows a policy to compose search primitives into executable programs with local state and control flow.

Key points

  • Retrieval-augmented language models increasingly use multi-step search to solve knowledge-intensive tasks, yet existing systems typically expose retrieval through fixed pipelines or collections of atomic tools.
  • To address this challenge, we propose program mutation, a grammar-constrained and execution-verified procedure that generates local variants of suboptimal programs sampled during RL, converts them into training trajectories, and distills them back into the policy.
  • We evaluate RPL on open-domain question answering and corpus-level reasoning tasks, comparing it with a range of retrieval and reasoning baselines.
  • Our results show that programmable search expands the retrieval strategies that agents can learn, while program mutation provides an effective mechanism for exploring useful program structures beyond direct on-policy sampling.

Sources (1)

  • [1]Learning to Program Retrievals: Composing Search Primitives via Reinforcement Learning
    arXiv (AI, ML, NLP, CV, robotics, multi-agent) · Oct 17, 08:03 PM
    We introduce Retrieval Program Learning (RPL), a programmable search framework that allows a policy to compose search primitives into executable programs with local state and control flow.
    Retrieval-augmented language models increasingly use multi-step search to solve knowledge-intensive tasks, yet existing systems typically expose retrieval through fixed pipelines or collections of atomic tools.

Extractive summary: sentences quoted from the sources.

Before this

  1. Oct 17, 2026HybridResearcher: Bridging the Structured-Unstructured Boundary for Deep Research Agents
  2. Oct 16, 2026SteerSearch: Interactive Search Reasoning with Mid-Response Steering
  3. Oct 16, 2026axolotl-ai-cloud/axolotl v0.21.0
  4. Oct 15, 2026KnowGPO: Knowledge-Grouped Policy Optimization for Search Agents
  5. Oct 15, 2026TIPS: A Tiny Inference-time Policy for Scaling in Diffusion Language Models
  6. Oct 15, 2026RoleQ: Role-Aligned Scales for Converting Language Models to Ternary

Related