Search From the Start: Search-Native Pretraining for Language Models (QueryLM)
Read first: Retrieving from Your Own Mistakes: On-Policy Training of Embedding Models for Multi-Hop Retrieval-Augmented Generation · ReasonIR: Training Retrievers for Reasoning Tasks
TL;DR. Search From the Start (Ponkshe, Je, Taga, Raffel, and Jaggi; arXiv 2611.26809, v1 Nov 19 / v2 Nov 25, 2026) trains QueryLM, a family of 360M–3.3B language models that experience web-search queries and local-index responses directly inside pretraining rather than bolting search on during post-training. Across all evaluated knowledge-intensive tasks, a 1.4B QueryLM consistently beats or matches a FLOP-matched 3.3B standard baseline, and the gap survives after supervised fine-tuning (SFT) of both models. Checkpoints and augmented pretraining data are released.
Why it matters now. Most search-agent work treats search as a post-training skill learned via SFT or RLVR on top of a parametric-only base model. QueryLM challenges that division of labour: if a model spends its entire pretraining budget trying to memorise the web inside its weights, post-training cannot fully undo that allocation. Teaching the model to query an external index from step zero changes the scaling trade-off between parameter count and factual competence.
Key idea
Section titled “Key idea”QueryLM shifts retrieval augmentation from an inference wrapper or post-training stage into the pretraining distribution itself:
What this changes for IR and search agents
Section titled “What this changes for IR and search agents”Standard pretraining optimises next-token prediction without tools, which forces the transformer to store obscure facts in its feed-forward parameters. When search is only introduced later during SFT or RL, the model must unlearn overconfident parametric guessing and learn from scratch when to emit a query and how to integrate noisy passages.
Baking queries and local-index responses into pretraining reframes the language model as a retrieval-native reasoner: parametric capacity is freed for reasoning, query formulation, and evidence synthesis while factual lookup is offloaded to the index.
Caveats and open questions
Section titled “Caveats and open questions”(Note: this summary is grounded strictly in the verified arXiv abstract for 2611.26809 v2; per-benchmark tables and corpus-construction details from the full PDF should be checked before citing exact task deltas.)
- Index transfer. Pretraining relies on a local index; how well QueryLM transfers when the deployment retriever, snippet length, or corpus domain shifts (for example, live web search or enterprise corpora) is an important empirical test.
- Full compute accounting. FLOP-matched comparisons normally measure transformer forward/backward FLOPs; constructing search-augmented pretraining data and serving local-index lookups during data preparation adds offline engineering and compute cost.
- Interaction with agentic RL. The abstract verifies that SFT alone does not close the gap; whether large-scale multi-turn agentic RL (like Search-R1) narrows the gap or amplifies QueryLM’s head start remains an open question.
Connections
Section titled “Connections”- Agentic search loops: compare pretraining-time search integration here with inference-time System-1 search assistance in SOARS and SearchJev.
- Retriever-side adaptation: On-policy chain retrieval adapts the dense retriever to multi-hop trajectories, the mirror image of adapting the LM pretraining distribution to search.
- Reasoning-intensive retrieval: ReasonIR and Promptriever train retrievers to respond to richer reasoning queries; QueryLM trains the LM itself to issue them from pretraining onward.
Questions to think through
These questions have no single right answer. Write or say your answer before you open the hints. Mark a question once you could defend your answer in a reading group.
- Derive / compute
Under the standard Chinchilla approximation C ≈ 6 N D, a 1.4B QueryLM and a 3.3B standard baseline are trained at matched total pretraining FLOPs C. Compute (a) the ratio of pretraining tokens D_1.4B / D_3.3B seen by the smaller model, (b) the serving-time weight-memory ratio and, under an equal-depth full-MHA toy assumption (where N ∝ L · d² so width d ∝ sqrt(N)), the resulting KV-cache ratio at equal context length (noting how GQA or depth changes alter it), and (c) what overhead search calls add at inference.
What a strong answer covers
- (a) At matched C = 6 N D, D_1.4B / D_3.3B = 3.3 / 1.4 ≈ 2.36× more pretraining tokens for the 1.4B model (or fewer tokens if search-response tokens are excluded from the loss or if retrieval index compute is counted inside the budget).
- (b) Weight memory scales linearly with N: 1.4 / 3.3 ≈ 0.42× (2.36× smaller: ~2.8 GB vs 6.6 GB in bf16). Under an equal-depth full-MHA toy assumption where KV cache scales with L · d ∝ sqrt(N), the 1.4B KV cache is sqrt(1.4 / 3.3) ≈ 0.65× that of 3.3B (~1.54× smaller)—though actual KV ratios depend on layer count L and GQA KV-head count.
- (c) That serving speedup is offset by external retrieval latency and extra prefill tokens from returned snippets, so end-to-end wall-clock latency depends on how often the model issues queries and how fast the local index responds.
- A complete compute-matched accounting should verify whether offline corpus-augmentation and index-lookup FLOPs during data construction are included in the matched pretraining budget.
- Mechanism
QueryLM's advantage over standard pretrained models persists even after supervised fine-tuning (SFT) is applied to both models. Explain why post-training a standard model on search trajectories fails to close the gap with a model that saw search queries and local-index responses throughout pretraining.
What a strong answer covers
- Standard pretraining forces the model to pack long-tail factual recall into feed-forward weights to minimise next-token loss, dedicating capacity to memorising facts rather than recognising knowledge gaps.
- Search-native pretraining exposes the model across the entire pretraining distribution (Wikipedia and DCLM-Edu) to the causal pattern: uncertain entity or claim → emit query → condition subsequent text on retrieved snippets.
- SFT acts on a much smaller token budget and mainly adapts formatting and high-level behaviour; it cannot easily reallocate parametric capacity that was spent on memorisation or rewrite deep calibration of when to search.
- The model also learns to absorb noisy or partial local-index returns across diverse domains, rather than overfitting to a narrow set of QA-style post-training trajectories.
- Critique
The headline result is that a 1.4B QueryLM matches or beats a FLOP-matched 3.3B baseline across knowledge-intensive tasks. Identify the main confounds or evaluation gaps in comparing a search-enabled pretrained model against a standard baseline, and specify the controlled comparison needed to separate "has a search tool" from "learned search during pretraining".
What a strong answer covers
- First check whether the 3.3B baseline also has access to the exact same local index at test time (after SFT to use search). Comparing a search-augmented 1.4B model against a closed-book 3.3B model conflates external memory with pretraining recipe.
- Corpus-overlap risk: augmenting Wikipedia and DCLM-Edu with responses from a local index can leak target passages if the evaluation benchmarks draw from the same index or Wikipedia snapshot.
- Budget accounting: generating synthetic search queries and querying a local index over pretraining corpora consumes non-trivial compute and retrieval infrastructure that does not appear in forward/backward LM FLOPs.
- Controlled test: hold the local index, SFT dataset, prompt format, and test-time search call budget identical for both the 1.4B QueryLM and the 3.3B baseline, and test out-of-index or post-cutoff knowledge tasks.
- Connect
Contrast QueryLM's search-native pretraining with RL-trained search agents such as Search-R1 and with on-policy chain retrieval. At which stage of the pipeline does each intervene, what supervision signal drives learning, and how could the two approaches complement rather than replace each other?
What a strong answer covers
- QueryLM intervenes at pretraining using next-token language-modelling loss over corpora augmented with queries and local-index responses; it shapes base representations and native query-generation habits.
- Search-R1 intervenes in post-training with reinforcement learning from verifiable outcome rewards on multi-hop QA; it optimises multi-step search policies but starts from a parametric-only base checkpoint.
- On-policy chain retrieval adapts the retriever itself (via DAgger-style contrastive updates on visited states), leaving the language model fixed or separate.
- Complementarity: a QueryLM base checkpoint provides a stronger, search-calibrated initialisation for subsequent agentic RL, potentially requiring fewer RL rollouts and avoiding the cold-start collapse seen in standard base models.
- Research idea
Suppose you want to test whether QueryLM's gains hold when the search index changes between pretraining and deployment (for example, swapping from a static local Wikipedia/DCLM index to a live web or private enterprise corpus). Formulate the hypothesis, a minimal controlled experiment using the released 360M–3.3B checkpoints, and the result that would falsify search-native generalisation.
What a strong answer covers
- Hypothesis: search-native pretraining teaches domain-general gap detection and query formulation rather than index-specific memorisation, so QueryLM will keep its edge over SFT-matched baselines even under an unseen retriever and corpus.
- Minimal experiment: take matched QueryLM and standard checkpoints (plus both SFT variants), freeze the weights, and evaluate them on a fresh domain corpus (e.g., private documentation or post-cutoff news) with two retrievers (BM25 and a dense encoder) different from the pretraining index.
- Measure both end-task QA accuracy and search diagnostics: query-trigger precision (searching when parametric knowledge is wrong), query recall against the new index, and faithfulness to retrieved passages.
- Falsifier: if QueryLM's advantage disappears or reverses once the local pretraining index is swapped out, the gain came largely from adapting to the pretraining index's formatting and document distribution rather than general search skill.