Deep Search Architecture: Engineering Global-Scale Indexing and Retrieval
\n
\n## 1. What “Deep Search” Actually Means\n\nDeep search is not about making keyword matching more sophisticated. It is about chaining three steps—understanding intent, retrieving evidence, and organizing an answer—into a pipeline that is measurable and traceable. Traditional search returns a list of links, leaving users to read, compare, and summarize on their own. Deep search returns a conclusion backed by evidence, shifting the user’s cost from “finding pages” to “verifying the conclusion.”\n\nThe timeline in the source material maps to three capability stages. The first introduced large language models into search, giving query understanding and result reranking semantic capabilities. The second added deep retrieval over a corpus of tens of billions of items, with an emphasis on grounding every claim. The third expanded indexing to hundreds of billions of items worldwide, turning search from a single-language entry point into a global information entry point. The rest of this article breaks down the shared architecture behind these three stages from an engineering perspective.\n\n## 2. The Layered Architecture of Deep Search\n\nA deployable deep search system is usually split into five layers, decoupled by explicit data contracts so each can scale and be rolled out independently.\n\n1. Ingestion and understanding layer: query rewriting, intent detection, language normalization, and extraction of recency and regional constraints.\n2. Retrieval layer: inverted-index recall, vector recall, multi-channel fusion, and deduplication. This layer determines coverage.\n3. Evidence governance layer: chunking, scoring, reranking, conflict resolution, and credibility labeling. This layer sets the ceiling on answer quality.\n4. Generation layer: produces conclusions from a controlled context, requires inline citation of evidence IDs, and supports streaming output.\n5. Evaluation and feedback layer: offline evaluation sets, online metrics, human spot checks, and badcase feedback form a closed loop.\n\nThe bottleneck in deep search is usually not the generation layer but the evidence governance layer. A generation model can polish wording, but it cannot invent facts that retrieval failed to surface.\n\n## 3. Key Engineering Steps in Retrieval-Augmented Generation\n\n### 3.1 Query Understanding and Rewriting\n\nUser input often contains omissions, references, and implicit constraints. The common engineering approach is to keep the original query and generate several rewritten variants to widen recall:\n\npython\ndef build_queries(raw: str) -> list[dict]:\n return [\n {"q": raw, "type": "original", "weight": 1.0},\n {"q": rewrite_semantic(raw), "type": "semantic", "weight": 0.8},\n {"q": extract_entities(raw), "type": "entity", "weight": 0.6},\n {"q": apply_time_filter(raw), "type": "temporal", "weight": 0.5},\n ]\n\n\nThe critical constraint on rewriting is that it must not introduce facts absent from the original input; otherwise the error is amplified into a wrong conclusion downstream.\n\n### 3.2 Multi-Channel Recall and Fusion\n\nAny single recall channel has blind spots: inverted indexes excel at exact terms and long-tail entities, while vector recall excels at synonyms and cross-language matching. The usual pattern is to run channels in parallel, fuse them on normalized scores, then apply same-document deduplication and site-level diversity constraints so a few sources cannot dominate the answer.\n\n### 3.3 Reranking and Evidence Scoring\n\nThe relevance score from a reranker is only one dimension. A mature scoring function also includes recency decay, source credibility, content completeness, and fact density:\n\ntext\nscore = w1 * relevance\n + w2 * freshness\n + w3 * authority\n + w4 * completeness\n - w5 * duplication_penalty\n\n\nWeights must be calibrated per scenario: raise the recency weight for news, and raise the authority and completeness weights for technical documentation.\n\n### 3.4 Controlled Generation and Citation Constraints\n\nAt generation time, the context should be split into numbered evidence blocks, and the prompt should constrain the model to use only the provided evidence and cite each claim. A validation pass runs after output: every citation ID must exist, and every number in the conclusion must be findable in the evidence. If validation fails, the system triggers supplementary retrieval instead of emitting the answer.\n\n## 4. Indexing and Updating a Corpus of Tens of Billions of Items\n\nAt scale, the real challenge is aligning freshness with cost. A workable tiering strategy:\n\n- Hot tier: high-value content tied to frequent queries, fully vectorized, served from memory, updated in seconds.\n- Warm tier: moderately popular content, rebuilt in scheduled batches, updated in minutes to hours.\n- Cold tier: long-tail content, keeping only the inverted index and summary vectors, loaded on demand.\n\nFor the write path, use a pattern of change capture, incremental parsing, versioned writes, and alias switching so retrieval stays available during index rebuilds. Multilingual and cross-region content also needs different chunking: agglutinative languages and short text suit smaller chunks with overlap windows, while long documents suit hierarchical chunking (chapter, paragraph, sentence) to support evidence localization.\n\n## 5. New Problems Introduced by a Global Index\n\nOnce indexing expands from one language to global content, the nature of the problems changes:\n\n1. Cross-language alignment: a unified semantic space is needed while original-language evidence is preserved, avoiding factual drift caused by translation loss.\n2. Time zones and recency: the same event is reported at different times in different regions, so ranking should use event time rather than crawl time.\n3. Compliance and regional policy: content visibility rules differ by region, so the retrieval layer needs policy-based filtering rather than hard-coded logic.\n4. Service reachability: fetching global news and local services requires unified access orchestration that places content retrieval and service invocation in the same session context.\n\n## 6. Quality Evaluation and Cost Governance\n\nEvaluation must be layered: the recall layer is measured by coverage and miss rate, the reranking layer by relevance ordering metrics, the generation layer by factual consistency and citation accuracy, and the end-to-end flow by task completion rate and user retry rate. Maintain an evaluation set with reference answers and run a regression on every index or model change.\n\nCost governance has three levers: tiered indexing to reduce full vectorization; caching of query rewrites and high-frequency evidence sets; and a retrieval budget that stops multi-round retrieval early once evidence sufficiency crosses a threshold. Sketch of the logic:\n\npython\ndef should_stop(evidence, threshold=0.75, max_rounds=3, rnd=1):\n return evidence.sufficiency >= threshold or rnd >= max_rounds\n\n\n## 7. Conclusion\n\nThe essence of deep search is treating verifiable facts as a first-class concern in system design: retrieval sets the floor, evidence governance sets the ceiling, and the evaluation loop determines iteration speed. As the index grows from tens of billions to hundreds of billions of items and from a single language to a global scope, the four foundational capabilities worth preparing early are tiered storage, versioned writes, cross-language semantic alignment, and policy-based filtering.
