T-Search: how we trained an agent for multi-step search

Anatolii Potapov17 Jul 2026

Problem

Plain RAG assumes one query reaches the right document. Many real questions hinge on an intermediate entity that the question never names and that sits in another source, and plausible wrong documents must be rejected on the way. A long search also fills the context window with tool results, and the noise lowers quality before the tokens run out (context rot). Training such an agent needs tasks with a fixed index, labeled supporting chunks and solution trajectories, and open datasets of that shape almost do not exist.

Example from the article: a question whose final document can only be found after learning an intermediate entity from a different source.

Solution in brief

T-Search is a retriever agent that works in rounds with explicit memory and returns ranked evidence chunks, leaving answer generation to any model. It is trained on synthetic tasks built by a small local model, with a loop of checks rejecting questions that have shortcuts. SFT on round-level samples is followed by RL that rewards recall over reference chunks.

Questions this case answers
  • How to train a retrieval agent whose search needs several dependent steps, when one query cannot reach the final document and labeled training trajectories do not exist
  • How to generate hard multi-hop questions with known supporting documents using a small model and filter out questions that have a shortcut
  • How to train a small open model to run multi-step retrieval and return a ranked list of evidence chunks instead of an answer?
  • How to keep an agent's context clean during a long search without summarizing away key facts?

Tools and methods

  • Round-based ReAct loop — three tools, 32,000 tokens per round, saved chunks as memory.
  • Synthetic task factory — taxonomy cell, document subgraph, paraphrased facts, stepwise composition, five checks.
  • SFT then RL — language branches merged with DARE and SLERP; GSPO with a recall reward.
  • TRuST and SynthComp — fixed-index benchmarks for Russian and English.
  • Qwen, Jina Embeddings — base model, a retriever.
Continue reading — it's free

Google or a one-time email code. No password.