Modern language models (LMs) are increasingly deployed with access to search tools at inference. Yet pretraining remains predominantly focused on predicting static text, with search capabilities typically introduced during post-training. We propose Search-Native Pretraining as a practical route to teach search capability during pretraining from ordinary text corpora. Specifically, we augment pretraining corpus at scale with web-search queries and retrieve web response using a local index. Training on this augmented corpus teaches models to generate search calls and incorporate retrieved evidence during language modeling. Across Wikipedia and DCLM-Edu corpora and 360M to 3.3B parameter scales, search-pretrained models ("QueryLM") show improved performance on knowledge-intensive tasks and higher steerability toward the retrieved evidence. Crucially, their advantage persists after supervised fine-tuning of both search-pretrained and conventionally pretrained models, indicating that the tested post-training procedures do not fully recover the capabilities developed during pretraining. Throughout our experiments, we find that a 1.4B QueryLM consistently beats or matches the performance of a FLOP-matched 3.3B baseline model across all knowledge intensive tasks. These results establish search-pretraining as a practical way to develop foundational search capabilities during pretraining. We release the training artifacts, including model checkpoints and data.
Figures & tables
Figure 2: Search-Native Pretraining pipeline overview. (1) We augment training documents with inline search queries and corresponding search results, intended to contain useful knowledge for predicting original document continuation. (2) We train on (1) , computing loss only on original document tokens and search queries (green), while search results are masked (gray). (3) During inference, QueryLM generates search queries to retrieve relevant information from an external knowledge base.
Figure 3: Document annotation example with inline search queries and retrieved documents.
Figure 4: Base model performance on knowledge-intensive QA (avg. over eight tasks). 360M and 400M (overtrained) base QueryLM with LMLM and Co-LMLM.
Figure 5: Base and SFT model performance on knowledge-intensive QA (avg. over eight tasks) across scale and training corpus. Left: base models. Middle: after Search SFT. Right: after standard SFT (Dolci mixture). Per-task scores in Appendix Table 9 , Table 10 .
Figure 6: DCLM-Edu-trained SFT QueryLM ’s fact preference under no evidence, supporting evidence, and counterfactual evidence settings. No evidence : higher y-axis value indicates preference for original ground-truth facts. Original evidence and Counterfactual evidence : higher y-axis value indicates preference for facts supported by the evidence.
Figure 7: Effect of query strength on SFT models QA performance (avg. LLM-judged acc. (%)).
Figure 8: Effect of retrieval source on base model QA performance (avg. answer-contained score).
Table 1: Effect of the pretraining context (Wikipedia, 360M; same documents and queries, only the response text differs). † baseline evaluated closed book.
Table 2: Effect of context length and query frequency (Wikipedia, 360M). Blocks/doc: inserted query–response blocks per held-out document. Compute: pretraining FLOPs relative to the compute-matched baseline. Other columns as in Table 1 . † baseline evaluated closed-book.
Appendix figures & tables15 assets
Supplementary material from the paper’s appendix.
Appendix
Corpus
Wikipedia
DCLM-Edu
Model size
360M
400M
1.4B
3.3B
Layers
32
14
24
32
Hidden width
960
1,280
2,048
2,816
Feed-forward width
2,560
5,120
8,192
11,264
Query / key-value heads
15 / 5
10 / 10
16 / 16
22 / 22
Head dimension
64
128
128
128
Appendix
Table 3: Pretraining model architectures , shared by QueryLM and Standard within each comparison.
Setting
Wikipedia
DCLM-Edu
Optimizer
AdamW
Muon + AdamW
Tokens per update
1,048,576
1,048,320
Peak learning rate
5×10−4
0.02828 (Muon); AdamW rates in text
Warmup
2% of steps
40 steps, first segment only
Learning-rate decay
Cosine to zero
Linear to 5% of peak
AdamW ϵ
10−8
10−10
Appendix
Table 4: Pretraining optimization settings . DCLM decay durations vary by run as specified in the text; all rates apply to pretraining, before supervised fine-tuning.
Table 5: Pretraining budgets before supervised fine-tuning.
Setting
Wikipedia
DCLM-Edu
Initialization
Pretrained weights
Pretrained weights and optimizer state
Optimizer
AdamW
Muon + AdamW
Training length
1 epoch, 134 updates
1 epoch, 33 updates
Sequences per update
64
256
Tokens per update
262,144
1,048,320
Peak learning rate
2×10−5
0.8× pretraining peaks (Muon 0.0226)
Appendix
Table 6: Search fine-tuning settings. Within each corpus, QueryLM and Standard use identical data and settings. Settings not listed follow Table 4 .
Figure 9: Prompt formats for base and SFT models.
Table 7: Multi-hop QA for four-shot base and zero-shot SFT models using BM25 retrieval over Sphere. Values are answer-containment accuracy (%), averaged over Multi-hop QAs.
Table 8: Knowledge-intensive QA performance and approx. pretraining compute of open-weight base models . (four-shot prompts, answer-contained accuracy (%)).
Table 9: Base model knowledge-intensive QA evaluation (four-shot, answer-contained scores (%)). Deltas are average gains over the FLOP-matched baseline.
Table 10: SFT models knowledge-intensive QA evaluation (zero-shot, LLM-judged accuracy). Multi-hop QA allows up to two searches. Unless marked as standard SFT, models are trained with Search SFT. \text{QueryLM\kern 0.59998pt\raisebox{2.79857pt}{\includegraphics[height=4.30554pt]{figures/icons/search.pdf}}}{}_{\text{Top-2}} : compute-matched 3.3B QueryLM , pretrained with only the two highest-overlap search insertions per document ( Section 6.4 ); Deltas are average gains over the FLOP-matched baseline.
Table 11: Controlled context probe on 1000 held-out DCLM-Edu facts.
Table 12: SFT model evaluation on FreshQA by fact type and premise (LLM-judged accuracy, %; 21 April 2026 snapshot, 500 test questions; zero-shot). Avg.: accuracy across all 500 questions. No search: both models without search.
Figure 10: HaluEval QA and RAGTruth evaluation after Search SFT, prefer-right %. a) and b) visualize the values in (c).
Table 13: General capabilities without search, DCLM-Edu (accuracy, %), for base models, after Search SFT, and after standard SFT (Dolci mixture). \text{QueryLM\kern 0.59998pt\raisebox{2.79857pt}{\includegraphics[height=4.30554pt]{figures/icons/search.pdf}}}{}_{\text{Top-2}} : compute-matched 3.3B QueryLM pretrained with the Top-2 augmentation ( Section 6.4 ). Bold marks the better of QueryLM and Standard.
Figure 11: Effect of retrieval source on QA performance , Averaged answer-contained accuracy (%) across all eight QA tasks.
Table 14: Cost of standard pretraining and Search-Native Pretraining across data preparation, training and evaluation, in tokens processed and retrieval calls. D : original training corpus tokens; A : number of search queries; ℓ : tokens added per search (search query, response, delimiters); ℓa : annotator tokens computed per generated query; T : inference tokens; k : searches made at inference.
Teaching language models to use search tools is not only a question of whether they search, but also of whether they issue good queries. This is especially important in open-domain question answering, where broad or copied queries often waste retrieval budget and derail later reasoning. We propose \Ours, a framework that makes query planning explicit through reusable search skills. At each step, the model first selects a skill, then generates a search or answer action conditioned on the selected skill card. The skill inventory itself is not fixed: SearchSkill maintains an evolving SkillBank, expands or refines it from recurrent failure patterns, and reconstructs affected trajectories before supervised training. The resulting two-stage SFT recipe aligns training with the inference-time protocol of skill selection followed by skill-grounded execution. Across open-source and closed-source models, SearchSkill improves exact match on knowledge-intensive QA benchmarks and yields better retrieval behavior, including fewer copied first queries, more atomic hop-focused queries, and more correct answers within a small search budget. These results suggest that explicit skill-conditioned query planning is a lightweight alternative to treating search as an undifferentiated action.
Jinchao Hu, Meizhi Zhong, Kehai Chen +1
School of Computer Science and Technology, Harbin Institute of Technology, Shenzhen · Independent Researcher Shenzhen / Beijing, China
Search-augmented language models can use external evidence to compensate for limitations in parametric knowledge, but search is not uniformly beneficial: models may call search for questions they can already answer, or rely on noisy evidence when correction, clarification, or abstention would be more appropriate. We formulate this as an instance-level search-routing problem: deciding whether search is needed to improve task success relative to a no-search execution. To derive supervision, we compare no-search and forced-search outcomes for the same question and construct an oracle over NO SEARCH, SEARCH, and UNSOLVED based on task-specific success. Using this oracle as both an evaluation criterion and a learning signal, we train search-routing policies with supervised fine-tuning and preference optimization, improving routing macro-F1 on oracle-eligible examples from 0.7082 to 0.8235 for Gemma E2B and from 0.7053 to 0.8365 for Qwen3.5-4B. Further analysis shows that the learned policies reduce model-specific routing failures: Gemma primarily learns no-search restraint, while Qwen further reduces missed search; residual UNSOLVED cases reveal heterogeneous bottlenecks involving model capacity, retrieval budget, evidence use, and policy behavior.
Search-augmented language models increasingly serve as long-horizon research agents, yet most open training methods assume a fixed user goal throughout search. We study mid-response steering, where users redirect a model during ongoing reasoning or retrieval. We identify answer-target anchoring, a failure mode in which fixed-query search agents retrieve evidence for the updated request but still answer an earlier question. We introduce SteerSearch, an RL framework that trains on interactive search trajectories with injected interventions to enable context-preserving target reassignment, and SteerSearch-Bench, a benchmark adapted from multi-hop QA datasets. We also investigate Contrastive Context Reward (CCR), an auxiliary signal for aligning post-intervention reasoning with the updated goal. Without CCR, SteerSearch improves average steering accuracy over Search-R1 from 11.1% to 31.3% on Qwen2.5-3B and from 36.6% to 44.6% on Qwen3-4B, while preserving standard single-query performance. Gains also extend to larger Qwen2.5 models and natural multi-turn conversations.
Udit Thakur, Baohao Liao, Matteo Nulli +4
Language Technology Lab, University of Amsterdam · eBay