Imagine you’re studying for a massive exam. You have two choices: spend months memorizing every single book in the library, or spend a few weeks learning the core concepts while mastering how to use the library’s search system to find specific facts on the fly.
Most Large Language Models (LLMs) today are trained like the first student. They try to cram the entire internet into their "parametric memory" (their internal weights) during pretraining. Only much later, during "post-training," do we teach them how to use tools like Google Search.
This paper asks: What if we taught models to search from day one?
TL;DR
The authors introduce Search-Native Pretraining, a method where models learn to generate search queries and integrate retrieved evidence as part of their initial training. The resulting "QueryLMs" punch significantly above their weight class: a 1.4B parameter model trained this way can match or beat a standard 3.3B parameter model on knowledge-heavy tasks, often using orders of magnitude less compute.
What Problem Does This Paper Address?
LLMs have a "knowledge bottleneck." They are great at patterns but struggle with specific, evolving facts (like "Who is the current Prime Minister of Thailand?"). While we often use RAG (Retrieval-Augmented Generation) to fix this at inference time, standard models aren't built for it. They are pretrained to predict the next word in a static vacuum.
Bolting search onto a model after it's already "grown up" is inefficient. The authors argue that by ignoring search during pretraining, we miss out on developing the fundamental "muscle memory" required to effectively weigh external evidence against internal knowledge.
Methods
The researchers transformed ordinary text into a "search-augmented" curriculum.
- Document Annotation: They used a "teacher" model to identify spots in a document where a search would be helpful and generated a query for that spot.
- Retrieval: They used those queries to pull real-world snippets from a massive web index (134M documents).
- Search-Native Training: They inserted these "Search Blocks" (Query + Result) directly into the pretraining text.
- Loss Masking: This is the "secret sauce." During training, the model is penalized if it writes a bad query or a bad final sentence, but the loss is masked on the retrieved search result itself. The model isn't forced to memorize the search result; it's just taught how to use it to predict what comes next.
Datasets
- Pretraining: They used Wikipedia (for a controlled, knowledge-dense environment) and DCLM-Edu (a massive, high-quality web crawl).
- Evaluation: A battery of "Knowledge-Intensive" tasks, including:
- Factual QA: TriviaQA, Natural Questions (NQ), PopQA.
- Multi-hop QA: HotpotQA, MuSiQue (tasks requiring connecting multiple pieces of evidence).
- Grounding: FreshQA (for time-sensitive facts) and RAGTruth (for measuring hallucinations).
Key Insights and Ideas
- The "Compute Cheat Code": Search-native models are incredibly efficient. As seen in Figure 1, a 400M QueryLM outperformed the much larger SmolLM3-3B on QA tasks, despite the latter having roughly 6,700x more pretraining compute.
- Better "Steerability": Standard models are often stubborn; even if you show them a search result that contradicts what they "know," they might ignore it. QueryLMs are much more sensitive to provided evidence. They are better at following counterfactuals—if the search result says the sky is green, they are more likely to adapt their answer accordingly.
- Post-training isn't enough: You might think, "Can't I just fine-tune a normal model to search?" The authors found that while fine-tuning helps, it doesn't fully recover the performance of a model that was "born" searching. The advantage of search-native pretraining persists even after Supervised Fine-Tuning (SFT).
Key Results
- Efficiency: A 1.4B QueryLM consistently matched or outperformed a 3.3B baseline across all knowledge-intensive tasks.
- Accuracy Gains: On DCLM-Edu, the 1.4B QueryLM achieved a QA accuracy of 30.3%, compared to just 15.2% for the compute-matched baseline.
- Evidence Following: In "counterfactual" settings (where evidence contradicts established facts), QueryLM followed the evidence 64.3% of the time, compared to 55.1% for the baseline.
Limitations and Future Work
- The "Closed-Book" Tax: There is no free lunch. When you take away the search tool, QueryLMs perform slightly worse than standard models on general reasoning. They've learned to rely on the "crutch" of search.
- Data Preparation Cost: Augmenting billions of tokens with search results is computationally expensive and requires a high-quality retrieval index.
- Retrieval Quality: The current work relies on BM25 (a keyword-based search). The authors suggest that using more advanced "neural" retrievers during pretraining could unlock even more power.
In short: if you want a model that actually knows how to use the internet, don't wait until it's finished school to give it a browser. Teach it to search from the very first page.
Summary updated