C2T-ID: Converting Semantic Codebooks to Textual Document Identifiers for Generative Search
Yingchen Zhang, Ruqing Zhang, Jiafeng Guo, Wenjun Peng, Sen Li, Fuyu Lv, Xueqi Cheng
TL;DR
The work addresses the challenge of designing semantically rich yet search-space–constrained document identifiers for generative retrieval. It introduces C2T-ID, a method that converts semantic codebooks into textual docids by building a hierarchical clustering tree, extracting per-node keywords, and replacing numeric labels with top-$K$ keywords, with an optional semantic smoothing step for fluency. This approach preserves hierarchical decoding constraints while providing richer semantic priors to large language models, enabling more effective document retrieval. Experiments on Natural Questions and Taobao product search show that C2T-ID outperforms atomic, semantic codebook, and pure-text docids, with particularly strong gains on large-scale, complex tasks and robust zero-shot performance.
Abstract
Designing document identifiers (docids) that carry rich semantic information while maintaining tractable search spaces is a important challenge in generative retrieval (GR). Popular codebook methods address this by building a hierarchical semantic tree and constraining generation to its child nodes, yet their numeric identifiers cannot leverage the large language model's pretrained natural language understanding. Conversely, using text as docid provides more semantic expressivity but inflates the decoding space, making the system brittle to early-step errors. To resolve this trade-off, we propose C2T-ID: (i) first construct semantic numerical docid via hierarchical clustering; (ii) then extract high-frequency metadata keywords and iteratively replace each numeric label with its cluster's top-K keywords; and (iii) an optional two-level semantic smoothing step further enhances the fluency of C2T-ID. Experiments on Natural Questions and Taobao's product search demonstrate that C2T-ID significantly outperforms atomic, semantic codebook, and pure-text docid baselines, demonstrating its effectiveness in balancing semantic expressiveness with search space constraints.
