cho.sh

Kepu Zhang∗, Yuzhe Cai∗, Yue Shu∗†, Dawei Chen, Jinhai Zhu, Yuan Xu, Zehua Dai, Tongke Ni, Ziyao Chen, Chen Fu, Jie Shao, Chao Wang, Xiangmin Wang, Ruifeng Zhao, Rongchun Yao, Jie Yin, Weixin Qiu, Nan Song, Junyang Li, Fan Li, Quanchao Hui, Yulong Ou, Qiang Chen, Hao Cao, Sen Yang, Tencent Inc.

Figure 1
Figure 1

Comparison between the existing retrieval system and the proposed retrieval system. (a) The existing system combines multiple lexical and dense retrieval sources. (b) The proposed system uses model-centric retrieval as the primary semantic retrieval path and retains one syntax tree as a complementary lexical retrieval source.

1 Introduction

Large-scale content search must retrieve relevant documents from collections containing hundreds of millions or even billions of items, while meeting strict requirements on latency, resource consumption, and freshness. Modern industrial search systems, such as WeChat Search, typically combine inverted-index retrieval with dense vector retrieval . Inverted retrieval is efficient and interpretable, but its coverage is constrained by lexical matching, query rewriting, and intersection strategies. Dense retrieval provides stronger semantic matching, yet its candidates may still be removed by downstream filtering, quota limits, or ranking stages. Maintaining multiple retrieval paths can improve coverage, but may also introduce duplicated computation, communication overhead, and fragmented optimization objectives.

Generative retrieval has emerged as an alternative paradigm for information retrieval, motivated in part by advances in large language models (LLMs) . Existing approaches generally either treat each document as an independent output symbol , resulting in a large output space, or assign documents fixed hierarchical Semantic IDs and decode them level by level . Although hierarchical Semantic IDs reduce the output space, they assume that each document can be represented by a single coherent semantic path. This assumption can be problematic for content-oriented collections, where articles and graphic-text posts may span multiple entities, topics, and user intents. Moreover, an error at an early decoding level can exclude the target document from subsequent retrieval stages.

We present WeSearch, a model-centric, cluster-constrained retrieval framework for large-scale and continuously evolving content search. WeSearch uses clusters to reduce the query-specific candidate space, rather than as fixed hierarchical identifiers for documents. Given a query, it retrieves relevant clusters through vector similarity search, gathers their associated documents, and then performs fine-grained matching and ranking over the resulting atomic-document candidates. Unlike prior generative retrieval methods that bind each document to a single hierarchical semantic ID and decode it token by token—where an error at an early prefix permanently prunes all good documents under the correct branch—WeSearch retrieves a set of relevant clusters and takes the union of their member documents as candidates, keeping the candidate pool as large and inclusive as possible. This design combines the efficiency of cluster-based candidate reduction with document-level relevance modeling, without requiring each document to follow a single fixed semantic path.

To support retrieval at industrial scale, WeSearch combines multi-source relevance supervision and hard-negative mining with OPQ-based document representations , asymmetric distance computation, and distributed scoring optimizations. A rolling-mounting mechanism allows fresh documents to be added to the existing cluster space without rebuilding the entire index, while periodic rolling training helps the model adapt to evolving query–document relevance. In the previous production pipeline, the retrieval embedding model was typically updated monthly, limiting how quickly the retrieval space could adapt to new content, emerging topics, and changes in user behavior. WeSearch supports coordinated model refreshes on a weekly cadence, with updates as frequent as daily when needed, enabling the system to incorporate model improvements and evolving relevance patterns more promptly.

We also redesign the online retrieval architecture around WeSearch. As shown in Figure , WeSearch serves as the primary semantic retrieval path, complemented by a single syntax tree for lexical matching. Candidates from the two paths are merged and deduplicated before being passed to downstream ranking. This design consolidates semantic retrieval into a unified model-based path while retaining a lightweight lexical source for exact matching.

We evaluate WeSearch in the WeChat Search system across three corpus configurations: a Base corpus containing hundreds of millions of documents, an Expanded corpus containing billions of documents, and the Expanded corpus augmented with a Fresh corpus of tens of millions of newly arriving documents. Controlled offline experiments on the Base corpus examine cluster granularity, hierarchical Semantic-ID-based retrieval, and document quantization, and show that hierarchical Semantic-ID-based retrieval is less suitable for heterogeneous content documents, while OPQ-based representations consistently outperform compact low-dimensional dense representations. We further validate training-data mining, structured document features, and teacher-assessed result quality at large scale.

Online, one-week A/B tests across all three corpus configurations yield statistically significant improvements over the corresponding production baselines. On the Expanded corpus with Fresh corpus configuration, a subsequent one-month full-traffic A/B test shows stable gains of +0.68%+0.68\% in CTR and +0.71%+0.71\% in average dwell time on the search result page, together with a +2.27%+2.27\% increase in per-user article clicks. In the same deployment, WeSearch reduces overall retrieval resource cost by 41%41\% and graphic-text retrieval latency by 1919 ms. Based on this combined evidence of quality improvement and efficiency gains, WeSearch has been fully deployed in WeChat Search and currently serves 100%100\% of production traffic.

Our main contributions are as follows:

We propose WeSearch, which uses clusters solely to reduce the query-specific candidate space and performs fine-grained relevance modeling directly over atomic documents, avoiding the single-path assumption imposed by fixed hierarchical Semantic IDs and thus better accommodating multi-topic documents.

WeSearch demonstrates the practical deployment of a model-centric retrieval framework as the primary retrieval path for content-oriented search at billion-document scale. Its system design combines rolling training, OPQ-based document representations with ADC-accelerated scoring, and incremental document mounting to support regular model and index updates.

We conduct controlled offline experiments, one-week online A/B tests across three corpus configurations ranging from hundreds of millions to billions of documents, a one-month full-traffic online A/B test, and pairwise human evaluation. The results consistently demonstrate retrieval-quality improvements, positive online gains, and reduced retrieval resource cost and latency, and WeSearch has been fully deployed in production WeChat Search.

2 Related Work

2.1 Sparse and Dense Retrieval for Large-Scale Search

Large-scale industrial search systems typically combine sparse retrieval based on inverted indexes with dense retrieval based on vector similarity. Sparse retrieval provides efficient lexical matching, whereas dense retrieval improves semantic coverage by representing queries and documents in a continuous embedding space.

Inverted-index-based sparse retrieval, exemplified by BM25 , has long served as the backbone of text search, grounded in statistical frameworks such as inverse document frequency and efficient term-to-document mappings . Modern extensions further improve term weighting and query expansion to mitigate vocabulary mismatch . Despite their efficiency, sparse methods struggle with semantic matching and cannot robustly handle paraphrased expressions or conceptual relevance when surface vocabulary differs.

Dense retrieval encodes queries and documents into continuous vectors and retrieves candidates by semantic similarity . It is less sensitive to exact lexical overlap and better handles paraphrases and semantically related expressions, making it a core component in modern industrial search stacks. For billion-scale corpora under strict latency constraints, dense retrieval typically relies on approximate nearest neighbor (ANN) indexes . Graph-structured indexes such as NSW , HNSW , NSG , and DiskANN achieve high recall by greedily navigating proximity graphs. However, building and updating such indexes over dynamically evolving corpora is expensive, and query-time filtering or attribute constraints substantially degrade traversal efficiency .

At the representation level, a single embedding vector collapses heterogeneous document semantics into a fixed-dimensional space, which often fails to capture fine-grained query–document relations for multi-topic, multi-entity, or multimodal content . A natural response is to model relevance at a finer granularity, but applying such models directly over a billion-scale corpus is computationally prohibitive. These limitations motivate two-stage designs that decouple candidate reduction from fine-grained relevance scoring, where clustering offers a natural way to perform lightweight, query-dependent pre-filtering before detailed scoring is applied over individual documents.

2.2 Generative Retrieval

Generative retrieval formulates information retrieval as a conditional generation problem: instead of retrieving documents via an explicit index, a generative model directly predicts document identifiers conditioned on the input query. This unifies query understanding and candidate generation within a single model and allows retrieval to benefit directly from advances in sequence modeling.

DSI first proposes training transformer-based models to map queries to document identifiers, enabling retrieval through direct generation. Subsequent work has explored various aspects of this paradigm. TIGER uses residual quantized autoencoders to generate Semantic IDs and trains encoder-decoder models for sequential recommendation. DSI++ and IncDSI address the challenge of adapting generative retrievers to dynamic corpora. More recently, industrial-scale systems including OneRec , OneSearch , and MTGR have demonstrated the practical viability of generative retrieval, optimizing its efficiency and scalability for real-world deployment.

Despite this progress, GR with hierarchical Semantic IDs rests on a strong structural assumption: documents sharing an early identifier prefix should form a coherent semantic group, and each document should be well represented by a single hierarchical path. This holds reasonably well for structured domains such as products, but is problematic for content-oriented documents : articles and graphic-text posts frequently span multiple entities, topics, and user intents, so documents assigned to the same identifier node may have substantially different relevance to a given query. A second, closely related issue is early-stage error propagation : when identifiers are decoded step by step, an incorrect decision at an early step permanently prunes all good documents under the correct branch. The top-level decision must therefore simultaneously provide a compact semantic representation and preserve query-specific recall—two requirements that often conflict in heterogeneous content spaces.

WeSearch is motivated by these two limitations. Rather than committing each document to a single hierarchical path, WeSearch uses clusters only to reduce the query-specific candidate space, and performs fine-grained relevance scoring directly over atomic documents within the retrieved clusters. This removes the single-path assumption and avoids unrecoverable early-prefix errors, while retaining the efficiency benefit of cluster-level pruning.

3 WeSearch: Two-Stage Model-Centric Retrieval

3.1 Overview

WeSearch is designed for content-oriented search over a large and continuously evolving document collection D={d1,…,dN}\mathcal{D}=\{d_{1},\ldots,d_{N}\}. Given a user query qq, the system returns a ranked list of the top-KK documents:

D@K≺=M(q),\mathcal{D}_{@K}^{\prec}=\mathcal{M}(q),

where M\mathcal{M} denotes the WeSearch model. As illustrated in Figure , M\mathcal{M} decomposes retrieval into two sequential stages: (i) cluster-level candidate-space reduction, which uses clusters to narrow the full corpus down to a query-specific candidate set, and (ii) document-level ranking, which performs fine-grained relevance scoring directly over atomic documents in that candidate set.

Unlike Semantic-ID-based retrieval , which assigns each document a complete hierarchical identifier and must decode it correctly end-to-end, WeSearch treats clusters purely as a candidate-space reducer: a cluster does not need to be a stable semantic label for all its member documents; it only needs to help form a query-specific candidate subspace with high recall. All fine-grained query–document discrimination is deferred to the document-level stage, where it operates directly on atomic documents.

Figure 2
Figure 2

Overview of WeSearch. Clusters first define a query-specific candidate document space, over which fine-grained document-level ranking produces the final results.

Formally, let C={c1,…,cM}\mathcal{C}=\{c_{1},\ldots,c_{M}\} denote the cluster collection, with each cluster cc associated with a document subset Dc⊆D\mathcal{D}_{c}\subseteq\mathcal{D}. In the cluster stage, WeSearch selects a query-dependent cluster set

Cq=TopN⁡c∈Csc(q,c),\mathcal{C}_{q}=\operatorname{TopN}_{c\in\mathcal{C}}s_{c}(q,c),

where sc(q,c)s_{c}(q,c) is the cluster relevance score, and takes the union of their member documents as the candidate set:

Dq=⋃c∈CqDc.\mathcal{D}_{q}=\bigcup_{c\in\mathcal{C}_{q}}\mathcal{D}_{c}.

In the document stage, WeSearch ranks Dq\mathcal{D}_{q} to produce the final top-KK list. For efficiency, this stage is organized as a lightweight-to-heavy pipeline: a coarse scorer first shortlists Dq\mathcal{D}_{q} to the top-PP candidates DqP\mathcal{D}_{q}^{P} using compact semantic representations, and a fine-grained scorer then re-ranks DqP\mathcal{D}_{q}^{P} with richer document-side features ef\mathbf{e}_{f}:

D@K≺=TopK⁡d∈DqPsd(q,d,ef).\mathcal{D}_{@K}^{\prec}=\operatorname{TopK}_{d\in\mathcal{D}_{q}^{P}}s_{d}(q,d,\mathbf{e}_{f}).

The cluster stage is recall-oriented, aiming to retain as many relevant documents as possible within Dq\mathcal{D}_{q}, while the document stage is precision-oriented, performing fine-grained relevance discrimination over the retained candidates. The complete online inference procedure is summarized in Algorithm .

3.2 Offline Index Construction

Figure 3
Figure 3

The offline index construction procedure.

As shown in Figure , offline index construction consists of two steps—document clustering and document-representation compression—and produces four artifacts that are directly loaded by the online retrieval service: (i) a cluster embedding matrix EC\mathbf{E}_{\mathcal{C}}, (ii) per-document cluster assignments {cd}\{c_{d}\} defining the inverted mapping {Dc}\{\mathcal{D}_{c}\}, (iii) an OPQ rotation matrix R\mathbf{R} together with sub-space codebooks {Bj}j=1m\{\mathcal{B}_{j}\}_{j=1}^{m}, and (iv) per-document quantization codes {zd}\{\mathbf{z}_{d}\}. The first two support the cluster-level candidate-space reduction stage, while the latter two support the document-level ranking stage.

3.2.1 Document Clustering

Document clustering is the backbone of the cluster-level candidate-space reduction stage. Its purpose is not to recover a complete semantic taxonomy of the corpus, but to partition D\mathcal{D} into a tractable number of candidate pools {Dc}\{\mathcal{D}_{c}\} that can be efficiently retrieved and unioned at query time. This objective substantially relaxes the demand for clustering precision: a cluster is useful as long as it concentrates query-relevant documents, even if its member documents are not semantically homogeneous.

We adopt RQ-KMeans , a two-level residual-quantization-based clustering method, over all document embeddings. Compared with vanilla k-means, residual quantization recursively clusters the residuals from previous levels, which yields a finer partition at comparable training cost—an important property for a billion-scale corpus.

Formally, given the dense representation hd\mathbf{h}_{d} of each document d∈Dd\in\mathcal{D} and its two-level cluster assignment cd=(l1,l2)c_{d}=(l_{1},l_{2}), the document subset associated with cluster cc is

Dc={d∈D∣cd=c},\mathcal{D}_{c}=\left\{d\in\mathcal{D}\mid c_{d}=c\right\},

and the embedding of cluster cc is the sum of its two-level codewords,

ec=bl1(1)+bl2(2).\mathbf{e}_{c}=\mathbf{b}^{(1)}_{l_{1}}+\mathbf{b}^{(2)}_{l_{2}}.

All cluster embeddings are aggregated into the cluster matrix EC∈RM×D\mathbf{E}_{\mathcal{C}}\in\mathbb{R}^{M\times D}, which is loaded as a model parameter and used for cluster-level retrieval online.

3.2.2 Document Representation Compression

Serving a billion-scale corpus requires that document representations fit entirely in memory while remaining accurate enough for fine-grained ranking. WeSearch adopts Optimized Product Quantization (OPQ) to compress each document embedding into a compact code. Crucially, both the OPQ rotation matrix R\mathbf{R} and the sub-space codebooks {Bj}\{\mathcal{B}_{j}\} are instantiated as model parameters, so that the quantization distortion is directly optimized against the downstream retrieval objective rather than being a post-hoc, retrieval-agnostic compression step.

Formally, we first apply the rotation

h~d=R hd,\widetilde{\mathbf{h}}_{d}=\mathbf{R}\,\mathbf{h}_{d},

and partition h~d\widetilde{\mathbf{h}}_{d} into mm sub-vectors h~d=[h~d(1); h~d(2); ⋯ ; h~d(m)]\widetilde{\mathbf{h}}_{d}=\big[\widetilde{\mathbf{h}}^{(1)}_{d};\,\widetilde{\mathbf{h}}^{(2)}_{d};\,\cdots;\,\widetilde{\mathbf{h}}^{(m)}_{d}\big]. For the jj-th sub-space, a codebook

Bj={bj,1,bj,2,…,bj,K}\mathcal{B}_{j}=\left\{\mathbf{b}_{j,1},\mathbf{b}_{j,2},\ldots,\mathbf{b}_{j,K}\right\}

is maintained, and the quantization code of dd in sub-space jj is obtained by selecting the nearest codebook vector,

zd(j)=arg⁡min⁡k∈{1,…,K}∥h~d(j)−bj,k∥22.z^{(j)}_{d}=\arg\min_{k\in\{1,\ldots,K\}}\big\|\widetilde{\mathbf{h}}^{(j)}_{d}-\mathbf{b}_{j,k}\big\|_{2}^{2}.

The compressed representation of document dd is the concatenation of its sub-space codes,

zd=[zd(1), zd(2), …, zd(m)],\mathbf{z}_{d}=\big[z^{(1)}_{d},\,z^{(2)}_{d},\,\ldots,\,z^{(m)}_{d}\big],

and the compressed representation reconstructed in the rotated space is

h^d=[b1,zd(1); b2,zd(2); ⋯ ; bm,zd(m)].\widehat{\mathbf{h}}_{d}=\big[\mathbf{b}_{1,z^{(1)}_{d}};\,\mathbf{b}_{2,z^{(2)}_{d}};\,\cdots;\,\mathbf{b}_{m,z^{(m)}_{d}}\big].

Together, the clustering artifacts {EC,{cd}}\{\mathbf{E}_{\mathcal{C}},\{c_{d}\}\} and the compression artifacts {R,{Bj},{zd}}\{\mathbf{R},\{\mathcal{B}_{j}\},\{\mathbf{z}_{d}\}\} are packaged into the model checkpoint and shipped to the online service.

3.3 Two-Stage Architecture

The parameters of WeSearch consist of three parts: (i) a transformer-based query encoder fθf_{\theta}; (ii) offline-constructed index artifacts, including the cluster embedding matrix EC\mathbf{E}_{\mathcal{C}}, the OPQ rotation matrix R\mathbf{R}, and the sub-space codebooks {Bj}\{\mathcal{B}_{j}\}; and (iii) a lightweight feature-aware FFN ranker together with the embedding lookup tables for bucketed document-side features. The query encoder is initialized from a pretrained dual-tower retrieval model to provide a stable initial semantic geometry; the index artifacts are then constructed from the document representations produced by this initialized encoder (Sec. ) and stored as model parameters alongside the per-document OPQ codes {zd}\{\mathbf{z}_{d}\}; the ranker parameters are randomly initialized.

3.3.1 Stage I: Candidate-Space Reduction

The first stage aims to rapidly filter the full corpus into a small, high-recall candidate subset at negligible online cost. Given a query qq, the encoder produces a dense semantic embedding

hq=fθ(q),\mathbf{h}_{q}=f_{\theta}(q),

which is scored against all cluster centroids using negative L2 distance:

sc(q,c)=−∥hq−ec∥2.s_{c}(q,c)=-\left\|\mathbf{h}_{q}-\mathbf{e}_{c}\right\|_{2}.

The top-NN clusters form the query-related cluster set Cq\mathcal{C}_{q}, and their member documents are aggregated into the candidate document set Dq=⋃c∈CqDc\mathcal{D}_{q}=\bigcup_{c\in\mathcal{C}_{q}}\mathcal{D}_{c}. This stage tolerates coarse semantic grouping and prioritizes recall over fine-grained precision. Since it operates purely on precomputed cluster centroids and requires no document-level computation, cluster selection compresses the search space from the billion-scale corpus to a tractable candidate pool.

3.3.2 Stage II: Fine-Grained Document Matching

The second stage performs fine-grained relevance discrimination over Dq\mathcal{D}_{q}. Pure embedding distance is insufficient at this granularity: it does not reflect document quality, user behavioral signals, or temporal relevance, all of which are critical for distinguishing semantically similar documents. Running a feature-enhanced nonlinear ranker over the entire Dq\mathcal{D}_{q}, however, is too expensive to meet online latency requirements. WeSearch therefore adopts a lightweight-to-heavy pipeline: (i) an ADC-accelerated L2 coarse ranker shortlists Dq\mathcal{D}_{q} to a top-PP subset DqP\mathcal{D}_{q}^{P}, and (ii) a feature-aware FFN ranker produces the final top-KK list over DqP\mathcal{D}_{q}^{P}.

Coarse Ranking.

To score every candidate in Dq\mathcal{D}_{q} efficiently, we project the query embedding into the OPQ-rotated space,

h~q=R hq,\widetilde{\mathbf{h}}_{q}=\mathbf{R}\,\mathbf{h}_{q},

and compute negative L2 distance to each document using its OPQ codes zd\mathbf{z}_{d} via asymmetric distance computation (ADC, Sec. ):

scoarse(q,d)=−∥h~q−h^d∥2,s_{\text{coarse}}(q,d)=-\left\|\widetilde{\mathbf{h}}_{q}-\widehat{\mathbf{h}}_{d}\right\|_{2},

where h^d\widehat{\mathbf{h}}_{d} is the rotated-space embedding reconstructed from zd\mathbf{z}_{d} (Eq. ). The top-PP candidates are retained for fine-grained ranking:

DqP=TopP⁡d∈Dq scoarse(q,d).\mathcal{D}_{q}^{P}=\operatorname{TopP}_{d\in\mathcal{D}_{q}}\,s_{\text{coarse}}(q,d).
Feature-Aware Fine-Grained Ranking.

To complement the semantic signal, WeSearch incorporates multi-dimensional document-side features—including inherent document quality, user click and behavioral statistics, and temporal attributes—that capture practical ranking clues beyond embedding distance. Each raw feature is bucketed into discrete levels and projected into a dense embedding through dedicated lookup tables that are stored as model parameters; their concatenation forms the feature embedding ef\mathbf{e}_{f} of a document. Since only the OPQ codes {zd}\{\mathbf{z}_{d}\} are stored in memory for the billion-scale corpus, the document side is represented by its rotated-space reconstruction h^d\widehat{\mathbf{h}}_{d} (Eq. ) rather than the original embedding hd\mathbf{h}_{d}. A lightweight FFN then models nonlinear interactions among the query embedding, the reconstructed document embedding, and the feature embedding:

sd(q,d,ef)=FFN ⁣([ h~q;  h^d;  ef ]).s_{d}(q,d,\mathbf{e}_{f})=\mathrm{FFN}\!\left(\big[\,\widetilde{\mathbf{h}}_{q};\;\widehat{\mathbf{h}}_{d};\;\mathbf{e}_{f}\,\big]\right).

The retained candidates are reordered by this score to produce the final retrieval result:

D@K≺=TopK⁡d∈DqP sd(q,d,ef).\mathcal{D}_{@K}^{\prec}=\operatorname{TopK}_{d\in\mathcal{D}_{q}^{P}}\,s_{d}(q,d,\mathbf{e}_{f}).

4 Training WeSearch

WeSearch jointly learns two related but distinct retrieval capabilities. The first is cluster coverage: given a query, the model should select clusters that contain relevant documents. The second is document discrimination: given the documents collected from the selected clusters, the model should distinguish highly relevant documents from documents with lower relevance.

4.1 Training Objective

For a training query qq, let Pq\mathcal{P}_{q} denote its set of positive documents and let Nq\mathcal{N}_{q} denote a set of negative documents. Each positive document d+∈Pqd^{+}\in\mathcal{P}_{q} is associated with one cluster that contains it. We denote one target cluster by c∗c^{*} and one target document by d∗d^{*}.

Cluster-level loss. The cluster-level objective encourages the query embedding to be geometrically close to the centroid of the cluster containing the relevant document: It is defined as a softmax cross-entropy loss over all cluster centroids:

Lcluster=−log⁡exp⁡(−∥hq−ec∗∥2)∑c∈Cexp⁡(−∥hq−ec∥2),\mathcal{L}_{\mathrm{cluster}}=-\log\frac{\exp\bigl(-\|\mathbf{h}_{q}-\mathbf{e}_{c^{*}}\|_{2}\bigr)}{\sum_{c\in\mathcal{C}}\exp\bigl(-\|\mathbf{h}_{q}-\mathbf{e}_{c}\|_{2}\bigr)},

where ec∗\mathbf{e}_{c^{*}} is the centroid of the target cluster and the denominator sums over all clusters in C\mathcal{C}.

Document-level ranking loss. After constructing the query-specific candidate set DqP\mathcal{D}_{q}^{P} via ADC-accelerated coarse ranking, the document-level objective is a listwise cross-entropy loss that treats document ranking as a single-label classification problem over the top-PP candidates:

Lrank=−log⁡exp⁡(sd(q,d∗,ef))∑d∈DqPexp⁡(sd(q,d,ef)),\mathcal{L}_{\mathrm{rank}}=-\log\frac{\exp\bigl(s_{d}(q,d^{*},\mathbf{e}_{f})\bigr)}{\sum_{d\in\mathcal{D}_{q}^{P}}\exp\bigl(s_{d}(q,d,\mathbf{e}_{f})\bigr)},

where sd(q,d,ef)s_{d}(q,d,\mathbf{e}_{f}) is the FFN-predicted relevance score and d∗∈DqPd^{*}\in\mathcal{D}_{q}^{P} is the target document. During training, the target document is guaranteed to appear in DqP\mathcal{D}_{q}^{P} via teacher forcing.

Pairwise ranking loss. To additionally supervise relative ordering between different relevance levels—e.g., a strongly relevant document should outrank a weakly relevant one—we add a pairwise margin loss over all positive–negative pairs:

Lpair=∑d+∈Pq∑d−∈Nqmax⁡ ⁣(0,  γ−sd(q,d+,ef)+sd(q,d−,ef)),\mathcal{L}_{\mathrm{pair}}=\sum_{d^{+}\in\mathcal{P}_{q}}\sum_{d^{-}\in\mathcal{N}_{q}}\max\!\left(0,\;\gamma-s_{d}(q,d^{+},\mathbf{e}_{f})+s_{d}(q,d^{-},\mathbf{e}_{f})\right),

where γ\gamma is the ranking margin.

Joint objective. The complete training objective combines all three losses:

L=λcLcluster+λrLrank+λpLpair,\mathcal{L}=\lambda_{c}\mathcal{L}_{\mathrm{cluster}}+\lambda_{r}\mathcal{L}_{\mathrm{rank}}+\lambda_{p}\mathcal{L}_{\mathrm{pair}},

where λc\lambda_{c}, λr\lambda_{r}, and λp\lambda_{p} balance the contributions of cluster-level coverage, document identification, and pairwise document ordering, respectively.

4.2 Positive and Hard-Negative Mining

4.2.1 Positive Sample Sources

We construct positive samples from multiple supervision sources in order to capture different aspects of query–document relevance. The main sources include:

Relevance supervision: documents receiving high relevance grades from human annotators or teacher models, providing direct evidence of whether a document satisfies the information need;

Satisfaction supervision: documents associated with high user satisfaction signals in actual search sessions;

Behavioral supervision: documents associated with strong user consumption signals, such as long dwell time, effective clicks, or deep reading behavior.

Combining these sources reduces dependence on any single annotation or behavioral signal and improves coverage across different query types. For a query qq, the resulting positive set is

Pq=Pqrel∪Pqsat∪Pqbeh.\mathcal{P}_{q}=\mathcal{P}^{\mathrm{rel}}_{q}\cup\mathcal{P}^{\mathrm{sat}}_{q}\cup\mathcal{P}^{\mathrm{beh}}_{q}.

When the same document appears in multiple sources, it is deduplicated and its supervision signals are combined according to the corresponding labeling policy.

4.2.2 Negative Sample Sources

We construct negative samples primarily from documents associated with the same query but having lower relevance labels or weaker user feedback. These samples are more informative than randomly selected documents because they are often topically related to the query while failing to satisfy its specific information need.

The main negative sources include:

Cross-grade relevance samples: documents associated with the same query but assigned lower relevance grades than the positive documents, providing explicit supervision about relative document quality;

Click-based samples: documents exposed for the query but receiving weak or no effective click signals, particularly when other documents for the same query receive stronger positive feedback. Click signals are interpreted together with exposure, position, and other contextual information, rather than treating every non-clicked document as definitively irrelevant;

Retrieval hard negatives: documents retrieved with high scores by a retrieval system but judged by human annotators or teacher models to be irrelevant or insufficiently relevant.

The negative set is written as

Nq=Nqrel∪Nqclick∪Nqretrieval,\mathcal{N}_{q}=\mathcal{N}^{\mathrm{rel}}_{q}\cup\mathcal{N}^{\mathrm{click}}_{q}\cup\mathcal{N}^{\mathrm{retrieval}}_{q},

where Nqrel\mathcal{N}^{\mathrm{rel}}_{q} contains lower-relevance documents, Nqclick\mathcal{N}^{\mathrm{click}}_{q} contains documents with weak click-based evidence, and Nqretrieval\mathcal{N}^{\mathrm{retrieval}}_{q} contains retrieved but insufficiently relevant documents.

These hard negatives are mixed into the candidate set DqP\mathcal{D}_{q}^{P} during training, encouraging the model to learn fine-grained distinctions between documents that share similar topics but differ in their ability to satisfy the query intent.

4.3 Rolling Training

The query–document relevance distribution evolves continuously, driven by newly published documents, emerging topics, and shifting user behavior. A model trained on a fixed snapshot therefore degrades over time. We address this with a rolling training strategy.

At each training round, newly collected queries, documents, relevance labels, and user-feedback signals are merged with a curated pool of historical high-quality samples, and used to continue training from the previous checkpoint. The recent samples let the model adapt to new intents, new content, and new behavioral patterns, while the historical samples preserve long-tail relevance knowledge and mitigate catastrophic forgetting. This design pairs explicit relevance supervision with implicit behavioral evidence in every round, keeping the model both accurate and timely.

5 System Design

Deploying WeSearch as the primary retrieval path of a billion-scale production search system requires more than a working model. In this section, we describe five system components that together make the model usable in production: (i) an online retrieval architecture that places WeSearch alongside a single lexical path (Sec. ); (ii) a rolling mounting mechanism that makes freshly published documents searchable within minutes (Sec. ); (iii) a periodic refresh procedure that upgrades the model and the full index as a single atomic unit (Sec. ); (iv) an ADC-based scoring kernel that drives the document-level stage at low cost (Sec. ); and (v) system-level training and inference acceleration (Sec. ).

5.1 Online Retrieval Architecture

Figure compares the existing retrieval system with the proposed architecture. The existing system combines multiple lexical and dense retrieval sources in parallel, whose candidates are merged and passed to the downstream ranking module.

In the proposed architecture, WeSearch serves as the primary semantic retrieval path: given a query, it directly produces document candidates by first selecting relevant clusters and then ranking atomic documents within the resulting candidate space, consolidating multiple parallel dense and lexical retrieval paths into a single end-to-end model. We retain one syntax tree as a complementary lexical path for exact matching that semantic retrieval cannot cover. The two paths run in parallel, and their candidates are merged and deduplicated before being passed to the downstream ranker that produces the final results.

5.2 Rolling Mounting of New Documents

Figure 4
Figure 4

Rolling mounting of fresh documents. New documents are assigned to the existing cluster space, quantized with fixed codebooks, and made visible through an atomic index update.

Content-oriented search systems continuously receive newly published documents. Rebuilding the entire index for every new document is computationally expensive and introduces unnecessary delays before fresh content becomes searchable.

WeSearch supports incremental ingestion because clusters serve as candidate-space constraints rather than complete hierarchical document identifiers. A newly arriving document can therefore be assigned to the existing cluster space without modifying any model parameters. As shown in Figure , the rolling-mounting operation involves three steps: (1) computing the document representation and assigning it to the nearest cluster, (2) quantizing the representation with the fixed OPQ codebooks, and (3) appending the document and its code to the cluster-to-document mapping.

Formally, for a new document dnewd_{\mathrm{new}}, its encoder representation hnew=fθ(dnew)\mathbf{h}_{\mathrm{new}}=f_{\theta}(d_{\mathrm{new}}) is computed and assigned to the nearest cluster:

cnew=arg⁡min⁡c∈C∥hnew−ec∥2.c_{\mathrm{new}}=\arg\min_{c\in\mathcal{C}}\left\|\mathbf{h}_{\mathrm{new}}-\mathbf{e}_{c}\right\|_{2}.

The document is then quantized using the existing codebooks to obtain its compact code znew=Q(R hnew)\mathbf{z}_{\mathrm{new}}=Q(\mathbf{R}\,\mathbf{h}_{\mathrm{new}}), and the cluster-to-document mapping is updated as Dcnew←Dcnew∪{dnew}\mathcal{D}_{c_{\mathrm{new}}}\leftarrow\mathcal{D}_{c_{\mathrm{new}}}\cup\{d_{\mathrm{new}}\}.

Because the cluster centroids and codebooks remain fixed during mounting, the operation is lightweight and can be performed continuously in the background, making fresh documents searchable with minimal latency.

5.3 Periodic Model and Index Refresh

We do not rebuild the cluster–document mapping after every training update. Instead, model training and index refresh are managed as separate processes. When a new retrieval-model version is selected for deployment, we refresh the associated index artifacts as needed: document-to-cluster assignments are recomputed using the document representations and cluster embeddings of that version, and document codes are generated using its matching OPQ parameters. The model and corresponding cluster embeddings, OPQ parameters, document codes, and cluster–document mapping are validated and released as a consistent version. Between such refreshes, newly arriving documents are mounted into the active index using the current version’s fixed cluster space and OPQ parameters.

5.4 ADC Optimization for Online Document Scoring

During online serving, the candidate set Dq\mathcal{D}_{q} can be very large. Explicitly reconstructing a full document vector for every candidate and computing full-dimensional distances would incur substantial computation and memory-access cost.

We instead use Asymmetric Distance Computation (ADC) to score compressed document representations directly. Before scoring any candidate, the rotated query h~q=Rhq\widetilde{\mathbf{h}}_{q}=\mathbf{R}\mathbf{h}_{q} is partitioned into mm sub-vectors {h~q(j)}j=1m\{\widetilde{\mathbf{h}}^{(j)}_{q}\}_{j=1}^{m}, and a query-dependent lookup table is constructed for each sub-space:

LUT⁡j[k]=∥h~q(j)−bj,k∥22,k=1,…,K.\operatorname{LUT}_{j}[k]=\left\|\widetilde{\mathbf{h}}^{(j)}_{q}-\mathbf{b}_{j,k}\right\|_{2}^{2},\qquad k=1,\ldots,K.

The approximate squared L2 distance between the query and a document with code zd=[zd(1),…,zd(m)]\mathbf{z}_{d}=[z^{(1)}_{d},\ldots,z^{(m)}_{d}] is then obtained by table lookups and additions:

δ^(q,d)=∑j=1mLUT⁡j ⁣[zd(j)].\widehat{\delta}(q,d)=\sum_{j=1}^{m}\operatorname{LUT}_{j}\!\left[z^{(j)}_{d}\right].

Ranking by −δ^(q,d)-\widehat{\delta}(q,d) is order-equivalent to ranking by scoarse(q,d)s_{\text{coarse}}(q,d) in Sec. , so ADC provides a drop-in acceleration of the coarse-ranking stage. Each lookup table is built once per query and reused across all candidates and across distributed partitions; document-side computation reduces to lookups and additions rather than full-dimensional multiplications, substantially cutting compute and memory traffic while retaining an accurate approximation of the semantic distance.

5.5 System-Level Acceleration

We introduce several system-level optimizations to improve the efficiency of WeSearch training and online inference, targeting distributed document-code access, tensor-parallel execution , communication overhead, and kernel performance.

5.5.1 Training Acceleration

Document codes are partitioned across devices by cluster membership in a load-balanced fashion, keeping each partition local to its assigned device. This enables tensor-parallel computation at the document level without hosting the full document-code vocabulary on a single device. To reduce cross-device communication, only query representations and query-associated states are exchanged between devices; document codes remain resident locally. Each device independently accesses its local partition while required query embeddings are broadcast among tensor-parallel workers, greatly reducing communication volume during document-space construction and score computation.

Tensor-parallel communication is overlapped with local computation: while transmitting query representations or intermediate states, each device processes document codes already available locally, lowering synchronization cost and improving hardware utilization. At the kernel level, we optimize distributed cross-entropy computation to reduce the cost of global normalization and logit synchronization across devices.

5.5.2 Inference Acceleration

For online serving, WeSearch is integrated with the vLLM inference engine to accelerate query encoding, delivering optimized scheduling, batching, and execution under live traffic.

We further reduce serialization and inter-process communication overhead within the serving pipeline. Intermediate results are transferred using compact representations, and unnecessary serialization, deserialization, and memory-copy operations are eliminated. Candidate identifiers, scores, quantized codes, and document-side features are transmitted only when required by downstream stages, reducing communication latency and improving throughput for candidate merging, deduplication, and final result generation.

6 Experiments

We evaluate WeSearch in three stages. First, we conduct controlled experiments on the Base corpus to examine fundamental design choices, including cluster granularity, hierarchical Semantic-ID-based retrieval, and document representation. Second, we evaluate the effect of structured document features and training-data mining on the Expanded corpus. Third, we assess the complete retrieval architecture through online testing, including deployment with fresh-document ingestion.

The experiments are designed to answer the following questions:

Retrieval design: How do cluster granularity, hierarchical Semantic IDs, and document representation affect retrieval quality?

Training signals: Do structured document features and multi-source training-data mining improve retrieval quality across different query subsets?

Production utility: Does the complete WeSearch architecture, combined with a complementary lexical syntax tree, improve result quality and online search performance?

6.1 Experimental Setup

6.1.1 Search Corpus

We evaluate WeSearch in the WeChat Search scenario. The corpus contains multimodal image-text documents—including articles and graphic-text posts—together with document metadata and user interaction signals. We consider three corpus configurations:

Base corpus: hundreds of millions of documents, used for controlled feasibility studies and ablation experiments;

Expanded corpus: billions of documents, obtained by extending the Base corpus with additional relatively stable document collections;

Expanded corpus with Fresh corpus: the Expanded corpus augmented with a newly arriving corpus of tens of millions of documents.

6.1.2 Evaluation Data

We use two types of offline evaluation data: (1) randomly sampled queries with human relevance annotations, and (2) queries grouped by user-consumption signals, including long dwell time and effective clicks. For teacher-based evaluation, we retrieve the top-100100 documents per query and assign quality labels using a satisfaction teacher and a relevance teacher. A document is considered high-quality if it receives a high-quality grade from the corresponding teacher.

6.1.3 Metrics

For a query qq, let Gq\mathcal{G}_{q} be the set of ground-truth documents and Rq@k\mathcal{R}^{@k}_{q} the top-kk retrieved documents. Recall at kk is defined as

Recall⁡@k=∣Rq@k∩Gq∣∣Gq∣.\operatorname{Recall}@k=\frac{\left|\mathcal{R}^{@k}_{q}\cap\mathcal{G}_{q}\right|}{\left|\mathcal{G}_{q}\right|}.

For teacher-based evaluation, let Ihq(q,d)\mathbb{I}_{\mathrm{hq}}(q,d) indicate whether document dd receives a high-quality label. The high-quality result density is defined as

Density⁡hq=1∣Q∣∑q∈Q∑d∈Rq@KIhq(q,d)K.\operatorname{Density}_{\mathrm{hq}}=\frac{1}{|\mathcal{Q}|}\sum_{q\in\mathcal{Q}}\frac{\sum_{d\in\mathcal{R}^{@K}_{q}}\mathbb{I}_{\mathrm{hq}}(q,d)}{K}.

We report satisfaction density and relevance density according to the corresponding teacher models.

6.2 Compared Methods

We compare the following retrieval methods:

Online baseline: the previous production configuration, combining inverted-index retrieval with dense vector retrieval.

Semantic-ID generation: a hierarchical generative retriever that represents each document with a fixed Semantic ID and decodes it level by level;

WeSearch: the proposed two-stage model-centric retriever, which first selects clusters and then ranks atomic documents within the query-specific candidate space;

WeSearch + one syntax tree: the complete retrieval architecture, combining WeSearch with one lexical syntax tree.

Semantic-ID-based retrieval is used only in the controlled Base-corpus experiments. The online baseline, WeSearch, and WeSearch with one syntax tree are evaluated in the large-scale and online experiments.

6.3 Base-Corpus Feasibility Study

Figure 5

Experimental results on the Base corpus.

We conduct controlled experiments on the Base corpus using an in-distribution test set. The study examines three design questions: the number of clusters retrieved per query, the suitability of hierarchical Semantic-ID-based retrieval for graphic-text documents, and the impact of document representation and quantization configuration.

6.3.1 Effect of the Number of Retrieved Clusters Per Query

We vary the number of clusters retrieved per query, denoted by NN. As shown in Figure (a), increasing NN initially improves candidate coverage, but gains become marginal once NN reaches approximately 10,000, while inference cost continues to increase. We therefore set N=10,000N=10{,}000 in subsequent experiments.

6.3.2 Comparison with Semantic-ID-Based Retrieval

Figure (b) compares WeSearch with the hierarchical Semantic-ID-based generative retriever and the online baseline. The Semantic-ID-based method underperforms both the online baseline and WeSearch at all recall cutoffs, while WeSearch consistently outperforms the online baseline. These results indicate that Semantic-ID-based retrieval is not well suited to content-oriented search over graphic-text documents, where cluster-based candidate reduction followed by atomic document ranking is more effective.

6.3.3 Document Representation and Quantization

Table 1

Ablation on clustering structure and document memory. a×ba\times b denotes two-level RQ-KMeans with aa coarse clusters, each split into bb sub-clusters. OPQ(m,K)\text{OPQ}(m,K) denotes mm sub-spaces with codebook size KK (Sec. ); Dense(3232) stores a 3232-dim embedding without quantization. Cluster Recall@10k10k is stable across all rows and is therefore omitted.

ClusteringDoc MemoryRecall@300
2k×1k2k\times 1kOPQ(32,256)(32,256)46.66%
2k×1k2k\times 1kOPQ(32,512)(32,512)47.10%
2k×1k2k\times 1kOPQ(64,256)(64,256)51.54%
10k×20010k\times 200OPQ(64,256)(64,256)51.34%
2k×1k2k\times 1kDense(3232)33.07%

Table reports the effect of document representation and quantization under a fixed cluster setting. Increasing the codebook size from 256256 to 512512 improves document-level recall, and increasing the number of OPQ subvectors from 3232 to 6464 provides a further gain, indicating that both codebook capacity and representation partitioning affect document discrimination. Varying the cluster-count split between the two RQ-KMeans layers has only a limited effect, suggesting that retrieval quality is less sensitive to this particular clustering configuration than to the capacity of the document representation. Finally, OPQ(64,256)(64,256) substantially outperforms the 3232-dimensional dense representation, confirming that directly reducing the embedding to a low-dimensional vector discards discriminative information, whereas OPQ preserves it by partitioning the representation into multiple subspaces.

6.4 Large-Scale Validation

We evaluate WeSearch on the Expanded corpus, focusing on the contribution of structured document features and training-data mining.

6.4.1 Document Features and Training-Data Mining

Table 2

Ablation of structured document features and training-data mining in WeSearch, measured by Recall@100. “w/o features & mining” uses only semantic embeddings and the basic relevance supervision; “w/o mining” adds structured document features; the full model further incorporates multi-source positive/negative mining.

MethodRelevance–1Relevance–2Long DwellEffective Click
Online0.36210.30870.44070.4604
WeSearch w/o features & mining0.40720.32770.43230.4379
WeSearch w/o mining0.42710.38650.49610.4973
WeSearch (full)0.43440.37940.55050.5481

We ablate the two training-signal interventions in WeSearch by progressively removing multi-source training-data mining and structured document features from the full model, and compare each variant with the online baseline on four query subsets: two relevance-oriented sets (Relevance–1, Relevance–2) and two behavior-oriented sets (Long Dwell, Effective Click). Recall@100 is reported in Table .

Even without features and mining, WeSearch already surpasses the online baseline on both relevance-oriented subsets, confirming that the two-stage cluster–then-document design itself is a strong semantic retriever. Adding structured document features yields consistent gains across all four subsets, including a substantial lift on the two behavior-oriented subsets, confirming that document-side quality, user-behavior, and temporal attributes provide signals complementary to pure content embeddings. Further adding multi-source positive/negative mining achieves the best overall results on Relevance–1, Long Dwell, and Effective Click, with the largest gains concentrated on the behavior-oriented subsets—matching the design intent of combining relevance, satisfaction, and behavioral supervision to discriminate documents that are topically relevant but differ in their ability to satisfy user intent.

6.4.2 Teacher-Assessed Result Quality

Table 3

Teacher-assessed high-quality result density.

MethodSatisfaction densityRelevance density
Online0.17320.4575
WeSearch0.18710.4662
WeSearch + one syntax tree0.20880.4854

Table reports satisfaction density and relevance density for the production baseline, WeSearch, and WeSearch with one syntax tree. WeSearch improves both metrics over the production baseline. Adding one syntax tree provides further gains, indicating that the syntax tree contributes lexical coverage complementary to WeSearch’s semantic retrieval. These results support the design in which WeSearch serves as the primary semantic retrieval path while the syntax tree is retained as a complementary lexical source.

6.5 Online Evaluation

We deploy WeSearch as the primary retrieval path in the WeChat Search pipeline, retaining a single syntax-tree branch as a complementary lexical source. Candidates from both branches are merged and deduplicated before entering the downstream ranking module. The deployed system is assessed along four complementary dimensions: a one-week online A/B test, a one-month online A/B test, pairwise human evaluation, and measurements of serving cost and latency.

6.5.1 One-Week Online A/B Test

We first conduct a one-week online A/B test against the corresponding production baseline under each of the three corpus configurations. Table reports the relative changes in CTR, together with the results on long-query traffic.

Table 4

Relative changes in CTR in the one-week online A/B test, compared with the corresponding production baselines. The first three rows report full-traffic results under each corpus configuration. †Long-query traffic is evaluated on the Expanded corpus with Fresh corpus configuration. Bold values indicate statistically significant gains (p<0.05p<0.05).

Evaluation groupCTR
Base corpus+0.27%
Expanded corpus+0.61%
Expanded corpus with Fresh corpus+0.53%
Long-query traffic†+1.10%

WeSearch yields consistent CTR improvements across all three corpus configurations, with gains ranging from +0.27%+0.27\% to +0.61%+0.61\%. The improvement extends to the long-query segment, where CTR increases by +1.10%+1.10\%, suggesting that WeSearch benefits not only aggregate traffic but also the more challenging long-tail queries where semantic understanding is critical.

6.5.2 One-Month Online A/B Test

To verify that these gains persist over a longer horizon, we conduct a one-month full-traffic A/B test on the Expanded corpus with Fresh corpus, comparing WeSearch with the corresponding production baseline. Table reports the relative changes in search metrics as well as per-user article-engagement metrics. All reported improvements are statistically significant (p<0.05p<0.05).

Table 5

Relative changes in the one-month online A/B test on the Expanded corpus with Fresh corpus under full traffic, compared with the corresponding production baseline. †Average per-user dwell time on the search results page. ‡Per-user clicks on WeChat Official Account articles from search results. Bold values indicate statistically significant gains (p<0.05p<0.05).

MetricRelative change
CTR+0.68%
Dwell time†+0.71%
Article clicks‡+2.27%

Over the one-month evaluation, CTR improves by +0.68%+0.68\% and the average dwell time on the search results page increases by +0.71%+0.71\%, confirming that the one-week gains are stable rather than transient and that users spend more time engaging with the returned results. More notably, per-user article clicks increase by +2.27%+2.27\%, substantially exceeding the aggregate CTR gain. This indicates that WeSearch not only improves per-impression click quality but also drives considerably higher user-level engagement with WeChat Official Account articles, which is a key business objective of the search platform.

6.5.3 Pairwise Human Evaluation

To complement the behavioral metrics, we conduct blind pairwise human evaluations under all three corpus configurations, in which annotators compare the result lists of WeSearch and the previous production system side by side. WeSearch achieves positive Better rates of 2%2\%, 3%3\%, and 3%3\% on the Base corpus, Expanded corpus, and Expanded corpus with Fresh corpus, respectively. The uniformly positive Better rates provide direct human-perceived evidence of result-quality improvement that is consistent with the gains observed in the online A/B tests.

6.5.4 Latency and Resource Cost

Finally, we measure the system-level serving cost and latency against the previous production configuration. The proposed architecture reduces overall retrieval resource cost by 41%41\% and lowers graphic-text retrieval latency by 19 ms19\,\mathrm{ms}. Together with the quality gains reported above, these results demonstrate that WeSearch delivers improvements in online search metrics while simultaneously reducing retrieval-stage resource consumption and latency, which is critical for large-scale production deployment.

7 Conclusion

We presented WeSearch, a model-centric retrieval framework for large-scale, continuously evolving content-oriented search. WeSearch uses clusters to reduce the query-specific candidate space and performs fine-grained matching and ranking over atomic documents, without assigning documents fixed hierarchical Semantic IDs. Its production architecture combines OPQ-based document compression, ADC-accelerated candidate scoring, and rolling mounting for fresh-document ingestion. In WeChat Search, WeSearch serves as the primary semantic retrieval path, complemented by a lexical syntax tree for exact term and phrase matching.

We evaluated WeSearch across corpus configurations ranging from hundreds of millions to billions of documents. One-week online A/B tests show consistent CTR improvements across all three configurations, with gains further confirmed by a one-month full-traffic A/B test and blind pairwise human evaluation. On the largest configuration, WeSearch improves CTR by 0.68%0.68\%, per-user article clicks by 2.27%2.27\%, and average dwell time on the search result page by 0.71%0.71\%, while reducing overall retrieval resource cost by 41%41\% and graphic-text retrieval latency by 1919 ms. WeSearch has been fully deployed in WeChat Search, serving 100%100\% of production traffic, demonstrating the effectiveness and production scalability of cluster-constrained retrieval for large-scale content search.

Several directions remain for future work. First, incorporating user profiles, session context, and real-time behavioral signals could enable personalized cluster selection and document ranking while controlling serving cost. Second, tighter integration of candidate retrieval and downstream reranking, for example through shared representations and coordinated training objectives, may improve consistency between candidate generation and final ranking.

References

    • [1] Ben Chen, Xian Guo, Siyuan Wang, Zihan Liang, Yue Lv, Yufei Ma, Xinlong Xiao, Bowen Xue, Xuxin Zhang, Ying Yang, et al. Onesearch: A preliminary exploration of the unified end-to-end generative framework for e-commerce search. arXiv preprint arXiv:2509.03236, 2025.
    • [2] Jiaxin Deng, Shiyao Wang, Kuo Cai, Lejian Ren, Qigen Hu, Weifeng Ding, Qiang Luo, and Guorui Zhou. Onerec: Unifying retrieve and rank with generative recommender and iterative preference alignment. arXiv preprint arXiv:2502.18965, 2025.
    • [3] Laxman Dhulipala, Majid Hadian, Rajesh Jayaram, Jason Lee, and Vahab Mirrokni. Muvera: multi-vector retrieval via fixed dimensional encodings. In Proceedings of the 38th International Conference on Neural Information Processing Systems, NIPS ’24, Red Hook, NY, USA, 2024. Curran Associates Inc. ISBN 9798331314385.
    • [4] Thibault Formal, Carlos Lassance, Benjamin Piwowarski, and Stéphane Clinchant. Splade v2: Sparse lexical and expansion model for information retrieval. arXiv preprint arXiv:2109.10086, 2021.
    • [5] Cong Fu, Chao Xiang, Changxu Wang, and Deng Cai. Fast approximate nearest neighbor search with the navigating spreading-out graph, 2025. URL .
    • [6] Tiezheng Ge, Kaiming He, Qifa Ke, and Jian Sun. Optimized product quantization for approximate nearest neighbor search. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2946–2953, 2013.
    • [7] Ruidong Han, Bin Yin, Shangyu Chen, He Jiang, Fei Jiang, Xiang Li, Chi Ma, Mincong Huang, Xiaoguang Li, Chunzhen Jing, et al. Mtgr: Industrial-scale generative recommendation framework in meituan. In Proceedings of the 34th ACM International Conference on Information and Knowledge Management, pages 5731–5738, 2025.
    • [8] Piotr Indyk and Rajeev Motwani. Approximate nearest neighbors: towards removing the curse of dimensionality. In Proceedings of the Thirtieth Annual ACM Symposium on Theory of Computing, STOC ’98, page 604–613, New York, NY, USA, 1998. Association for Computing Machinery. ISBN 0897919629. . URL .
    • [11] Yicheng Jin, Yongji Wu, Wenjun Hu, Bruce Maggs, Jun Yang, Xiao Zhang, and Danyang Zhuo. Curator: Efficient vector search with low-selectivity filters. Proc. ACM Manag. Data, 4(1), April 2026. . URL .
    • [12] Vladimir Karpukhin, Barlas Oguz, Sewon Min, Patrick Lewis, Ledell Wu, Sergey Edunov, Danqi Chen, and Wen-tau Yih. Dense passage retrieval for open-domain question answering. In Bonnie Webber, Trevor Cohn, Yulan He, and Yang Liu, editors, Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 6769–6781, Online, November 2020. Association for Computational Linguistics. . URL .
    • [13] Omar Khattab and Matei Zaharia. Colbert: Efficient and effective passage search via contextualized late interaction over bert. In Proceedings of the 43rd International ACM SIGIR Conference on Research and Development in Information Retrieval, SIGIR ’20, page 39–48, New York, NY, USA, 2020. Association for Computing Machinery. ISBN 9781450380164. . URL .
    • [14] Varsha Kishore, Chao Wan, Justin Lovelace, Yoav Artzi, and Kilian Q Weinberger. Incdsi: Incrementally updatable document retrieval. In International conference on machine learning, pages 17122–17134. PMLR, 2023.
    • [15] Woosuk Kwon, Zhuohan Li, Siyuan Zhuang, Ying Sheng, Lianmin Zheng, Cody Hao Yu, Joseph E. Gonzalez, Hao Zhang, and Ion Stoica. Efficient memory management for large language model serving with pagedattention. In Proceedings of the ACM SIGOPS 29th Symposium on Operating Systems Principles, 2023.
    • [16] Sangam Lee, Ryang Heo, SeongKu Kang, Susik Yoon, Jinyoung Yeo, and Dongha Lee. Why these documents? explainable generative retrieval with hierarchical category paths. In Maria Liakata, Viviane P. Moreira, Jiajun Zhang, and David Jurgens, editors, Findings of the Association for Computational Linguistics: ACL 2026, pages 21807–21824, San Diego, California, United States, July 2026. Association for Computational Linguistics. ISBN 979-8-89176-395-1. . URL .
    • [17] Xiaoxi Li, Jiajie Jin, Yujia Zhou, Yuyao Zhang, Peitian Zhang, Yutao Zhu, and Zhicheng Dou. From matching to generation: A survey on generative information retrieval. ACM Transactions on Information Systems, 43(3):1–62, 2025.
    • [18] Xinchen Luo, Jiangxia Cao, Tianyu Sun, Jinkai Yu, Rui Huang, Wei Yuan, Hezheng Lin, Yichen Zheng, Shiyao Wang, Qigen Hu, Changqing Qiu, Jiaqi Zhang, Xu Zhang, Zhiheng Yan, Jingming Zhang, Simin Zhang, Mingxing Wen, Zhaojie Liu, Kun Gai, and Guorui Zhou. Qarm: Quantitative alignment multi-modal recommendation at kuaishou, 2024. URL .
    • [21] Sanket Vaibhav Mehta, Jai Gupta, Yi Tay, Mostafa Dehghani, Vinh Q Tran, Jinfeng Rao, Marc Najork, Emma Strubell, and Donald Metzler. Dsi++: Updating transformer memory with new documents. In Proceedings of the 2023 conference on empirical methods in natural language processing, pages 8198–8213, 2023.
    • [23] Shashank Rajput, Nikhil Mehta, Anima Singh, Raghunandan Hulikal Keshavan, Trung Vu, Lukasz Heldt, Lichan Hong, Yi Tay, Vinh Tran, Jonah Samost, et al. Recommender systems with generative retrieval. Advances in Neural Information Processing Systems, 36:10299–10315, 2023.
    • [25] Stephen Robertson, Steve Walker, Susan Jones, Micheline Hancock-Beaulieu, and Mike Gatford. Okapi at trec-3. pages 0–, 01 1994.
    • [26] Stephen Robertson, Steve Walker, and Micheline Hancock-Beaulieu. Okapi at trec-7: Automatic ad hoc, filtering, vlc and interactive. pages 199–210, 01 1998.
    • [27] Hinrich Schütze, Christopher D Manning, and Prabhakar Raghavan. Introduction to information retrieval, volume 39. Cambridge University Press Cambridge, 2008.
    • [28] Mohammad Shoeybi, Mostofa Patwary, Raul Puri, Patrick LeGresley, Jared Casper, and Bryan Catanzaro. Megatron-lm: Training multi-billion parameter language models using model parallelism, 2020. URL .
    • [29] Karen Sparck Jones. A statistical interpretation of term specificity and its application in retrieval, page 132–142. Taylor Graham Publishing, GBR, 1988. ISBN 0947568212.
    • [31] Orion Weller, Michael Boratko, Iftekhar Naim, and Jinhyuk Lee. On the theoretical limitations of embedding-based retrieval, 2026. URL .
    • [32] Leah Woldemariam, Sudhanshu Garg, Taha Belkhouja, Charles Kim-Yip, and Ali Sahami. Exploring bottom-up clustering for creating semantic ids, 2026. URL .
    • [33] Lee Xiong, Chenyan Xiong, Ye Li, Kwok-Fung Tang, Jialin Liu, Paul N. Bennett, Junaid Ahmed, and Arnold Overwijk. Approximate nearest neighbor negative contrastive learning for dense text retrieval. In International Conference on Learning Representations, 2021. URL .
    • [34] Yutao Zhu, Huaying Yuan, Shuting Wang, Jiongnan Liu, Wenhan Liu, Chenlong Deng, Haonan Chen, Zheng Liu, Zhicheng Dou, and Ji-Rong Wen. Large language models for information retrieval: A survey. ACM Transactions on Information Systems, 44(1):1–54, 2025.
    • [35] Justin Zobel and Alistair Moffat. Inverted files for text search engines. ACM computing surveys (CSUR), 38(2):6–es, 2006.