Abstract
Retrieval augmented generation has emerged as an effective method to enhance large language model performance. This approach typically relies on an internal retrieval module that uses various indexing mechanisms to manage a static pre-processed corpus. However, such a paradigm often falls short when it is necessary to integrate the most up-to-date information that has not been updated into the corpus during generative inference time. In this paper, we explore an alternative approach that leverages standard search engine APIs to dynamically integrate the latest online information (without maintaining any index for any fixed corpus), thereby improving the quality of generated content. We design a collaborative LLM-based paradigm, where we include: (i) a parser-LLM that determines if the Internet augmented generation is demanded and extracts the search keywords if so with a single inference; (ii) a mixed ranking strategy that re-ranks the retrieved HTML files to eliminate bias introduced from the search engine API; and (iii) an extractor-LLM that can accurately and efficiently extract relevant information from the fresh content in each HTML file. We conduct extensive empirical studies to evaluate the performance of this Internet search augmented generation paradigm. The experimental results demonstrate that our method generates content with significantly improved quality. Our system has been successfully deployed in a production environment to serve 01.AI's generative inference requests.
Introduction
Standard Retrieval-Augmented Generation (RAG) systems typically rely on a static, pre-processed corpus stored in a vector database. While effective for stable knowledge domains, this approach fails when users ask about "fresh" information—such as today’s stock prices, recent news, or emerging scientific discoveries—that has not yet been indexed.
Simply plugging a search engine API (like Google or Bing) into an LLM is not a perfect solution. Raw search results are often noisy, redundant, and biased toward human engagement metrics (like click-through rates) rather than factual relevance for an LLM. Furthermore, feeding entire raw HTML files into a generative model is computationally expensive and often leads to "lost in the middle" performance degradation. This paper proposes a "zero-indexing" paradigm that treats the entire Internet as a live, dynamic database, bypassing the maintenance tax of local vector stores.
The Collaborative SAG Paradigm
The proposed system, termed Internet Search Augmented Generation (SAG), replaces the traditional static retrieval loop with a collaborative pipeline consisting of three core stages:
- PARSER-LLM: A multi-functional model (based on Yi-6B) that performs two tasks in a single inference pass: it decides if a search is necessary and, if so, generates optimized search keywords. It is specifically trained to handle time-sensitivity and multi-lingual queries.
- Mixed Ranking Strategy: To eliminate search engine bias, the system uses the BGE-M3 model to re-rank results. It considers both the search snippet and the full HTML content, doubling the candidate pool to ensure the most contextually relevant pages are prioritized.
- EXTRACTOR-LLM: This component serves as the system's "efficiency engine," extracting only the necessary information from the re-ranked web pages before passing it to the final generator.
Efficient Content Extraction via Tagging
A key innovation of this system is the "Tag-Only" efficiency hack. Instead of passing massive blocks of raw text, a Finite State Machine (FSM) segments HTML content into tagged chunks (e.g., <TAG-1>, <TAG-2>). The EXTRACTOR-LLM (a 9B model) then identifies which tags are relevant to the user's request.
Instead of re-typing the content, the extractor simply outputs the relevant tag IDs. This drastically reduces the number of output tokens, speeding up the pipeline and lowering costs. This model was trained using Supervised Fine-Tuning (SFT) and Direct Preference Optimization (DPO) to ensure it can robustly reject irrelevant content by outputting "None" when information is missing, a critical defense against hallucinations.
Key Results and Performance
The "Internet-SAG-Ext" system was evaluated against standard VectorDB-RAG and naive search approaches using both internal production data and public benchmarks. Key findings include:
- Superior Quality: In head-to-head evaluations judged by GPT-4o, the system consistently outperformed baselines across various generative models, including Yi-Large and Qwen2-72B.
- Cost Efficiency: The system reduced the total input token cost for the final generative LLM by 21% compared to VectorDB-RAG and 47% compared to the Naive search approach.
- High Precision: The 9B EXTRACTOR-LLM achieved an F1 score of 0.7698 on real-world benchmarks, outperforming GPT-4o in its ability to precisely identify relevant content and reject noise.
Conclusion and Future Work
While the system is successfully deployed at 01.AI, challenges remain regarding the sequential latency of multiple LLM calls and the dependency on third-party search APIs. Future work will focus on tighter integration between the extraction and generation phases to further streamline the real-time pipeline. By moving away from local vector stores, the zero-indexing philosophy allows LLMs to stay synchronized with an ever-changing world without the overhead of constant re-indexing.
Summary updated