AI Search in Practice: Combining Deep Reasoning with Live Web Retrieval

    This article examines how AI search combines deep reasoning models with live web retrieval, using Baidu AI Search's integration of DeepSeek-R1 as a reference point. It breaks a deployable architecture into four layers, walks through the core pipeline from query rewriting and iterative retrieval to content extraction and citation alignment, and covers engineering concerns such as freshness tiering, caching, observability, and security. It also outlines a three-tier evaluation approach for proving answer quality. The intended takeaway is that reliability comes from orchestration, evidence governance, and evaluation loops rather than from model choice alone.

    1. From Keyword Matching to Intent Understanding

    On February 20, 2025, Baidu AI Search integrated the full version of DeepSeek-R1 together with Baidu’s live web search. This marked a shift in the search interaction paradigm: users no longer need to assemble precise keyword combinations, but can describe a complete intent in natural language. In return, the system no longer returns ten blue links, but an organized answer with sources that can be followed up on.

    For developers, the technical meaning of this shift matters more than the date. A traditional retrieval pipeline centers on “query - recall - ranking,” and its optimization goal is to put relevant documents at the top. The optimization goal of AI search becomes “make the final answer correct, verifiable, and open to further questioning.” This introduces three structural changes:

    1. On the query side, a string becomes a structured intent that needs to be decomposed, rewritten, and expanded.
    2. On the recall side, single-pass retrieval becomes iterative multi-round retrieval, with the number of retrievals determined dynamically by the reasoning process.
    3. On the output side, a list becomes generated text, which forces the system to address hallucination, freshness, and citation provenance.

    2. Reference Architecture: A Four-Layer Breakdown

    A deployable AI search system can usually be split into four layers, decoupled through explicit contracts so each can evolve and be load-tested independently.

    • Interaction layer: multi-turn session management, clarifying follow-up questions, streaming output, and citation display.
    • Orchestration layer: task planning, tool selection, loop control, and budget constraints (rounds, latency, cost).
    • Capability layer: the deep reasoning model, live web retrieval, web page content extraction, vectorization, and unstructured data storage.
    • Governance layer: permissions, auditing, content safety, caching, and observability.

    The orchestration layer is the most commonly underestimated part. In practice, most quality problems come not from insufficient model capability but from crude orchestration: answering after a single retrieval, no retry on failure, and no termination condition, which leads to looping calls.

    3. Core Pipeline: Coupling Retrieval-Augmented Generation with Multi-Step Reasoning

    3.1 Query Understanding and Rewriting

    User input often contains references, omissions, and implicit constraints. It needs to be completed into a retrievable expression, and multiple complementary sub-queries should be generated to cover different phrasings and different time ranges. Illustrative code:

    1. def build_queries(session, user_input):
    2. context = session.recent_turns(limit=3)
    3. plan = planner.plan(user_input, context) # outputs intent, constraints, time range
    4. queries = []
    5. for sub in plan.sub_questions:
    6. queries.append(rewrite(sub, context)) # fills in omitted parts and references
    7. queries.append(expand_time(sub, plan.time_range))
    8. return dedup(queries), plan

    The key point is that rewriting must preserve the original constraints (such as time, region, and version); otherwise recall will shift systematically.

    3.2 Multi-Round Retrieval and Evidence Collection

    The value of a deep reasoning model shows up in “knowing what it is missing.” When it judges the evidence insufficient, it actively issues new retrievals, forming a “reason - retrieve - reason again” loop. Engineering practice must impose hard constraints on this loop:

    • Maximum number of iterations and maximum number of retrieved items;
    • Per-request latency budget and timeout fallback strategy;
    • Duplicate query detection to avoid spinning in place;
    • Evidence deduplication and conflict marking; when the same fact yields contradictory conclusions, keep both sources.

    3.3 Content Extraction and Chunking

    Returned pages usually contain a large amount of navigation, ads, and recommended content. The extraction stage needs to strip the noise, then split content along semantic boundaries while preserving heading hierarchy and context windows, avoiding isolating a sentence from its paragraph. This is the basis for accurate citation localization downstream.

    3.4 Generation and Citation Alignment

    The generation stage requires that “every conclusion be traceable.” A common approach is to force the model to use numbered evidence in the prompt, then run a validation pass after output: extract each claim in the answer, check whether the cited evidence fragment actually supports it, and trigger a rewrite or lower the confidence if it does not.

    1. Constraint example:
    2. - Answer only from evidence marked [E1..En];
    3. - When evidence is insufficient, state the gap explicitly; do not speculate;
    4. - Conclusions involving freshness must include the source and date.

    4. Engineering Implementation

    4.1 Freshness Tiering

    Not every query needs to go online. Queries can be tiered by freshness: stable knowledge (the model can answer directly), slowly changing information (served from cache or updated periodically offline), and highly time-sensitive information (must be retrieved live). Tiering significantly reduces latency and call cost, and avoids introducing unnecessary noise into stable questions.

    4.2 Caching and Cost Control

    The cache key should include dimensions such as the normalized query, time window, and region; semantically similar queries can be reused through vectorization. Accumulating high-frequency questions and answers into structured knowledge entries, together with object storage for extracted content snapshots, reduces repeated crawling while keeping answers traceable.

    4.3 Observability and Quality Regression

    The metrics to monitor are not only latency and error rate, but also retrieval hit rate, evidence coverage, citation accuracy, no-answer rate, and the distribution of follow-up rounds. Build a fixed evaluation set and run a regression every time you adjust a prompt or orchestration strategy, to avoid “fixing one case and breaking a whole batch.”

    4.4 Security and Compliance

    Content safety should be applied at both the retrieval and generation ends: input risk identification at the entry, output review and sensitive information filtering at the exit. External web content must be treated as untrusted input to guard against instruction injection embedded in it. Keep audit logs across the full pipeline, making the data source and generation process explicit for incident review.

    5. Measuring Results: How to Prove “Better”

    A three-tier evaluation system is recommended:

    1. Automated metrics: evidence coverage, citation accuracy, answer consistency;
    2. Human evaluation: graded scoring of correctness, completeness, traceability, and clarity of expression;
    3. Online metrics: follow-up rate, no-result rate, task completion rate, and user feedback.

    It is worth stressing that the failure modes of AI search differ from those of traditional search: it may produce a fluent but wrong answer, which is more harmful than “not found.” Evaluation must therefore treat “confident errors” as a key observation item; it is better to express uncertainty explicitly than to fabricate.

    6. Conclusion

    Combining deep reasoning with live web retrieval essentially upgrades search from “information location” to “conclusion delivery.” Baidu’s product exploration in this direction offers the industry a reference paradigm. For development teams, the real barrier is not calling a particular model, but orchestration strategy, evidence governance, and the evaluation loop; these three determine whether a system is trustworthy, controllable, and able to evolve sustainably in production.