For decades, information retrieval (IR) followed a "search and rank" paradigm: documents were indexed as sparse keyword vectors or dense embeddings, and a query would trigger a mathematical comparison to find the closest matches. Recently, a new approach called Generative Retrieval (GR) has emerged. Instead of searching an external index, a generative model—typically a Transformer—is trained to "write" the identifier of the relevant document directly in response to a query.
While the concept is elegant, its success hinges on a single, difficult question: What should a document's name be?
The Representation Gap
In early generative retrieval systems, documents were often assigned arbitrary numeric strings or random integers as identifiers (docids). However, as Ruiyang Ren and colleagues point out in their work on TOME, these abstract IDs create a fundamental "alignment" problem.
Large Language Models (LLMs) are pre-trained on vast amounts of natural language. When we force them to map a semantic query (e.g., "How do I bake a cake?") to a non-semantic ID (e.g., [DocID: 8291]), we are asking the model to abandon its linguistic reasoning and rely purely on rote memorization. Kidist Amde Mekonnen and Maarten de Rijke argue that this lack of semantic grounding prevents the model from generalizing to new documents or complex queries, as the ID itself carries no "essence" of the text it represents.
Making Identifiers Speak
To bridge this gap, researchers are moving toward Semantic Identifiers—docids that leverage the model's existing knowledge. The intuition is simple: if a document's name is related to its content, the model can use its internal understanding of language to "guess" the right ID even if it hasn't seen that exact query-document pair many times.
Several strategies have emerged to create these meaningful names:
- Lexical Identifiers: Sunkyung Lee and the creators of GLEN propose using dynamic keywords as identifiers. By using words that already exist in the model's vocabulary, the retrieval task becomes a natural language generation task.
- Hierarchical Semantic IDs: Bowen Jin and Hansi Zeng introduced LMINDEXER, which learns discrete, hierarchical codes. These IDs act like a Dewey Decimal System for the model, where the first few tokens of the ID represent broad categories and subsequent tokens narrow down to specific documents.
- Domain-Specific Structures: In specialized fields like law, identifiers can mirror the inherent structure of the knowledge. Weicong Qin and Jun Xu developed GEAR, which uses "Chapter-Section-Article" hierarchies as IDs, allowing the model to perform "retrieval-as-traversal" through a legal framework.
The Descriptive vs. Discriminative Trade-off
A perfect identifier must satisfy two conflicting goals: it must be descriptive enough for the model to associate it with a query, but discriminative enough to distinguish the document from millions of others.
Jiehan Cheng and Zhicheng Dou highlight that while a document title is highly descriptive, it may not be unique across a massive corpus. Conversely, a unique hash is discriminative but impossible to "reason" about. Modern frameworks like ZeroGR, proposed by Weiwei Sun and colleagues, attempt to balance these by generating IDs that capture the "semantic essence" of a document while maintaining a structure that ensures uniqueness.
Internalizing the Corpus
The ultimate evolution of this idea is Self-Retrieval, where the distinction between the identifier and the document begins to blur. Jiawei Chen and Qiaoyu Tang describe a system where a single LLM internalizes an entire corpus into its parameters.
In this setup, the model doesn't just generate a short ID; it uses constrained decoding to generate actual passages or highly structured natural language identifiers (SIDs). As seen in SemCORE by Haoxuan Li, this approach even extends to cross-modal tasks, where an LLM can "write" the identity of an image by generating a structured text description that serves as its unique address in the model's memory.
Why It Works
Semantic identifiers work because they transform retrieval from a mapping problem (Query A $\rightarrow$ Random ID B) into a translation problem (Query A $\rightarrow$ Semantic Concept A'). By aligning the target of the retrieval with the natural language patterns the model learned during pre-training, researchers are turning LLMs into "differentiable search indices" that can reason their way to the right document rather than just memorizing a lookup table.