Revisiting General Map Search via Generative Point-of-Interest Retrieval Dong Chen, Shuai Zheng, Haoyang Shao, Hongsheng Wu, Muhao Xu, Yeyu Yan, Ruifang Li, and Zhenfeng Zhu Abstract Point-of-Interest (POI) retrieval aims to identify relevant candidates from massive-scale POI databases, serving as a cornerstone for diverse location-based services. However, in general map search scenarios, conventional POI retrieval methods are increasingly challenged by underspecified user queries due to their excessive reliance on surface-level semantic matching. Meanwhile, such queries are often highly context-dependent and personalized, yet existing retrieval paradigms struggle to effectively synergize heterogeneous contexts for complex search intent inference. To address these limitations, we revisit general map search from a generative perspective and propose GenPOI , an innovative Gen erative POI retrieval framework tailored for general search on maps. It seamlessly unifies heterogeneous search contexts and POIs into structured sequences, leveraging the powerful contextual modeling of Large Language Models (LLMs) for spatial-aware candidate generation. Consequently, this generative paradigm effectively solves more challenging queries through profound context dependency modeling and search intent reasoning. Specifically, accounting for the unique geospatial nature of map scenarios, GenPOI introduces a novel Geo-Semantic POI Tokenization to represent each POI as a compact token sequence encoding both semantic and geographic context, thus grounding the LLM’s spatial understanding. Additionally, a proximity-aware constrained generation strategy is employed to restrict the decoding space of the LLM, ensuring the validity and geospatial relevance of the generated results. Extensive experiments on large-scale industrial datasets from Tencent Map, comprising POIs at the scale of over 10 million , demonstrate the superior performance of GenPOI. I Introduction With the pervasiveness of location-based services (LBS) [ 32 ] , map search has emerged as a critical gateway for people to access spatial information and explore points-of-interest (POIs). As a cornerstone of map search scenarios, POI retrieval aims to identify a set of relevant candidates from large-scale POI databases based on users’ queries, locations, and other search context. Therefore, the quality of retrieval results, which encompasses both semantic and spatial relevance, directly influences users’ decision-making efficiency and satisfaction. Early POI retrieval methods were grounded in basic lexical or prefix matching [ 31 , 30 , 7 ] techniques built on textual POI metadata (e.g., POI names, addresses, and category labels). Driven by the demand for more precise semantic-level retrieval, recent advances have steered the paradigm toward neural embedding models [ 12 , 3 , 13 ] , which learn dense representations for both queries and POIs to quantify their relevance in a shared semantic space. To better adapt to map search scenarios, these models [ 41 , 42 , 2 ] typically incorporate geographical considerations through textual location descriptions, dedicated geo-encoders, or direct multi-stage geographic constraints, thereby integrating spatial signals into the POI retrieval pipeline. Fig. 1: Comparison of different POI retrieval paradigms. Unlike superficial semantic matching, our generative paradigm unifies diverse search contexts and leverages LLMs for sophisticated intent reasoning, thereby effectively handling general search queries. In general map search scenarios, users are increasingly issuing more underspecified and complex queries (e.g., “nearby park for a romantic date”) that are often only confined to category-level semantic constraints. These queries are highly exploratory: the user’s intent is not to locate a specific POI but rather to discover suitable, personalized options that align with their complex search context. However, as shown in Fig. 1 (a), current retrieval frameworks remain anchored to the paradigm of surface-level lexical or semantic matching, making them ill-equipped to handle such challenging general search queries. Furthermore, existing methods struggle to seamlessly integrate heterogeneous contextual signals, such as geographical coordinates, textual queries, and user profiles, resulting in fragmented feature fusion. The absence of a unified representation prevents the model from capturing cross-modal dependencies among these distinct inputs, thereby limiting their ability to perform sophisticated intent reasoning. Driven by the rapid advancements in Large Language Models (LLMs) [ 23 , 21 ] , generative retrieval (GR) [ 15 ] has emerged as a promising paradigm, demonstrating superior performance in tasks demanding high contextual awareness. Unlike traditional discriminative paradigms, these methods encode entities into discrete semantic IDs (SIDs) [ 29 ] , reformulating retrieval as an SID token generation task. These SIDs are compact and structured relative to the original complex attributes, allowing LLMs to more readily learn the relational correlations between entities, queries, and contextual information. Building on this, GR leverages the inherent reasoning capabilities of LLMs to decode complex sequential contexts, thus enabling the retrieval of candidates that align precisely with implicit user intent. Nevertheless, most existing GR methods are primarily designed for recommender systems [ 5 , 40 ] or document retrieval [ 34 , 28 ] , where the objective is to generate target entities conditioned solely on historical behaviors or purely textual inputs. Accordingly, their lack of geospatial awareness limits their adaptability to map search scenarios, where spatial and semantic aspects must be jointly considered. In practice, designing an elegant generative retrieval framework for POIs is non-trivial, as it faces two primary limitations. (1) Geospatial Perception Gap : Unlike other types of entities, POIs are anchored to extrinsic geographic locations. Bridging this gap necessitates a specialized approach that empowers LLMs to effectively perceive spatial relationships between POIs and users within a discretized token space. (2) Hallucination in Vast Generation Spaces : Due to the expansive vocabulary of LLMs and the massive scale of POI data, the LLM is prone to generating hallucinated results. This necessitates explicit generation constraints to ensure both the validity and geospatial reasonableness of the retrieved POIs. Given these limitations, we propose GenPOI , a POI-oriented generative retrieval framework that explicitly incorporates map-specific geospatial characteristics. As illustrated in Fig. 2 (b), by linearizing the textual queries, geographical locations, POIs, and historical user behaviors into a unified context sequence, GenPOI harnesses the powerful contextual modeling capabilities of LLMs to facilitate geographically-aware target POI generation. In detail, GenPOI introduces a novel Geo-Semantic POI Tokenization to harmonize POI entities with the LLM’s discrete linguistic space. It encodes each POI into a compact POI ID (PID), comprising structured discrete tokens that integrate both semantic attributes and geographic locations. By replacing numerical atomic IDs with these interpretable PIDs, the LLM is enabled to readily comprehend a POI by directly perceiving “ what it is ” and “ where it is ” within a unified vocabulary. Considering the expansive generation space of LLMs, proximity-aware constrained generation is introduced to impose spatial and vocabulary constraints during POI generation. This mechanism ensures both the validity and efficiency of PID generation, effectively preventing the hallucination of non-existent and geospatially unreasonable POIs. To evaluate the effectiveness of the proposed model, we conduct extensive experiments on large-scale industrial map search datasets, with the POI scale exceeding 10 million . Our main contributions can be summarized as follows: • We propose GenPOI , a novel generative POI retrieval framework that unifies heterogeneous search contexts and leverages the powerful contextual modeling capabilities of LLMs to significantly enhance retrieval performance in general search scenarios. • To bridge discrete POI entities and the LLM’s linguistic space, a novel Geo-Semantic POI Tokenization module is introduced to enhance the LLM’s semantic and spatial understanding for POIs. • Considering the vast generation space of LLMs, a proximity-aware constrained generation strategy is designed to ensure the validity and spatial plausibility of the generated results. • Extensive experiments on real-world industrial datasets demonstrate that GenPOI significantly outperforms state-of-the-art baselines in general search scenarios. II Related Work II-A POI Retrieval POI retrieval aims to identify a set of relevant candidates from a large database that match a user’s query. Early methods [ 30 , 7 ] relied on exact term matching of textual information, and thus often suffered from the vocabulary mismatch problem, in which semantically similar words are treated as unrelated. With the development of deep learning, mainstream POI retrieval methods have shifted to neural embedding-based semantic matching [ 12 , 24 ] . These approaches leverage Deep Neural Networks (DNNs), particularly Pre-trained Language Models (PLMs) [ 37 , 4 , 22 ] , to map queries and POIs into a shared latent space, quantifying relevance through vector similarity [ 3 , 13 ] . To account for the spatial nature of POIs, recent frameworks often integrate spatial context [ 41 , 2 ] , ranging from textualized address descriptions and dedicated geographic encoders to explicit spatial constraints. Furthermore, state-of-the-art methods [ 11 , 6 , 10 ] incorporate more complex heterogeneous contexts including temporal signals, historical behaviors, and user profiles to enhance retrieval performance. Despite these advancements, conventional approaches often struggle to resolve the inherent ambiguity of queries in general map search scenarios. Furthermore, they face a critical bottleneck in seamlessly unifying heterogeneous search contexts, which hinders their ability to perform sophisticated search intent reasoning. Fig. 2: The overview of GenPOI framework. It consists of two modules: (a) Geo-Semantic POI Tokenization, which discretizes POIs into LLM-friendly token sequences; and (b) Generative POI Retrieval, where the LLM reasons over unified heterogeneous search contexts to generate relevant POIs. II-B Generative Retrieval With the rapid advancement of large language models (LLMs) [ 23 , 21 ] , Generative Retrieval (GR) [ 15 , 25 , 1 ] has emerged as a promising paradigm, achieving notable performance in diverse domains including document retrieval [ 34 , 28 ] and recommender systems [ 38 , 18 , 8 ] . Distinct from traditional discriminative retrieval frameworks, GR reformulates the retrieval pipeline as an end-to-end autoregressive generation task. In the GR paradigm, each candidate entity is mapped to a discretized and semantically informative identifier, termed a semantic ID [ 9 , 27 ] . State-of-the-art semantic ID generation approaches mainly involve hierarchical clustering of latent embeddings [ 19 ] and residual vector quantization [ 14 ] , both designed to preserve the structural correlations among entities in a discrete representation space. By encoding the full corpus into the model’s parameter space, LLMs learn the intrinsic semantic correlations among all SIDs during training. They are then able to autoregressively generate the exact semantic IDs for target entities by leveraging rich contextual information. Although a few recent works [ 36 ] begin to incorporate location into semantic IDs, they target next-POI recommendation rather than query-driven map search, leaving current generative retrieval paradigms still short of jointly grounding the LLM’s vocabulary in geographic space and enforcing proximity-aware decoding for POI retrieval. III Problem Formulation In this work, we focus on the POI retrieval task within general search scenarios. Formally, let \mathcal{P}=\{p_{1},p_{2},\dots,p_{N}\} denote a large-scale repository of N POIs. Each POI p\in\mathcal{P} is represented by its geographic coordinates L_{p}=(lat_{p},lng_{p})\in\mathbb{R}^{2} and a set of textual attributes A_{p} (e.g., title, category, and other relevant descriptive metadata). Given a user request, the available context is defined by the user’s current location L_{u}=(lat_{u},lng_{u}) , a textual search query Q_{u} , and a historical interaction sequence H_{u}=\{(Q_{u,t},L_{u,t},p_{u,t})\}_{t=1}^{T} , where T denotes the sequence length. Here, Q_{u,t} and L_{u,t} represent the t -th query and the associated location, respectively, and p_{u,t}\in\mathcal{P} denotes the specific POI clicked by the user. The objective of POI retrieval is to learn a ranking function f:(Q_{u},L_{u},H_{u},\mathcal{P})\rightarrow\mathcal{P}^{K} that maps the input context to a ranked list of K relevant POIs: P_{u}=f(Q_{u},L_{u},H_{u},\mathcal{P})=\{p_{u}^{1},p_{u}^{2},\dots,p_{u}^{K}\}\subseteq\mathcal{P} (1) where p_{u}^{i} denotes the i -th ranked POI in the result list. The core challenge of this task lies in effectively synergizing query semantics, spatial constraints, and historical behaviors to retrieve accurate and personalized POIs from an expansive search space. IV Methodology IV-A Overview In this section, we introduce the proposed generative POI retrieval framework, GenPOI . Departing from conventional discriminative paradigms, GenPOI harmonizes the modeling of heterogeneous search contexts and reformulates the retrieval task as a sequence-to-sequence generation process. This framework effectively bridges the gap between existing generative retrieval paradigms and their real-world application in map search. As illustrated in Fig. 2 , GenPOI comprises two core components: • Geo-Semantic POI Tokenization: This stage transforms heterogeneous POI attributes into discrete POI IDs (PIDs). Specifically, it integrates POI semantics with spatial features via a novel GeoPE module within the latent embedding space. These enriched embeddings are subsequently quantized into Semantic IDs (SIDs) and concatenated with explicit geohash-based Geographic IDs (GIDs) to yield the final PIDs, enabling LLMs to perceive discrete POIs within a unified geo-semantic vocabulary. • Generative POI Retrieval: This stage leverages the powerful contextual modeling capabilities of LLMs to directly generate target PIDs conditioned on the sequential search context. To ensure both the validity and spatial plausibility of the results, we introduce proximity-aware constrained generation via a PID Token Trie, which is further adaptively pruned based on the user’s location. This mechanism effectively narrows the generation space to efficiently produce high-quality retrieved POIs. IV-B Geo-Semantic POI Tokenization To distinguish the geographical nuances of POIs within a massive database, prevailing generative retrieval methods that rely solely on semantic IDs are insufficient, as they result in spatially agnostic learning by LLMs. To address this, we introduce Geo-Semantic POI Tokenization, which seamlessly integrates geographic context into the POI identifiers (PIDs) to facilitate LLM’s spatial-aware POI perception. Explicit Geographic Identifiers. For the unified location identifiers of POIs and users, we first incorporate explicit geographic identifiers (GIDs) using Geohash encoding [ 17 ] . This encoding mechanism bridges the gap between continuous numerical coordinates and the discrete vocabulary of LLMs. In detail, we leverage Geohash to discretize geographic coordinates into hierarchical spatial grids, mapping the continuous location of a POI p into a discrete sequence of tokens. Formally, the GID is defined as: \mathcal{T}_{\mathcal{G}}(L_{p})=\text{Geohash}(\text{lat}_{p},\text{lon}_{p})=\{\mathcal{G}_{1},\mathcal{G}_{2},\dots,\mathcal{G}_{\ell_{g}}\} (2) where \ell_{g} denotes the precision level of the Geohash, and each \mathcal{G}_{i} represents a specific token within the geographic vocabulary. A key advantage of this encoding scheme is its prefix-sharing property: POIs in close spatial proximity naturally share longer common prefixes in their GID sequences. Crucially, by applying this unified representation to both POI and user locations, we project them into a shared discrete space. This alignment enables the LLM to directly reason about the spatial interactions between users and POIs, effectively transforming geographical proximity into a recognizable token pattern during the generative process. Geographic Position Embedding. To complement the explicit GIDs with continuous spatial variance, we further propose a novel Geographic Position Embedding (GeoPE) that injects geographical semantics directly into the POI’s representation. Initially, the textual attributes A_{p} of a POI p (i.e., its name and category) are concatenated into a structured template and fed into a pre-trained text encoder to obtain the base POI embedding x_{p}\in\mathbb{R}^{D} . To capture spatial dependencies, GeoPE implicitly encodes coordinates by rotating embeddings [ 33 ] according to their relative orientations with respect to a set of reference points. Specifically, we establish a spatial coordinate system by identifying \Omega reference points \mathcal{R}=\{R_{1},R_{2},\dots,R_{\Omega}\} , where each R_{\omega}=(\text{lon}_{\omega}^{ref},\text{lat}_{\omega}^{ref}) is obtained via K-Means clustering on the POI distribution. These points serve as spatial anchors that represent regional density centers. For each POI p and reference point \omega , we compute the bearing angle \theta_{p,\omega} to characterize their directional relationship: \theta_{p,\omega}=\text{atan2}(\Delta\text{lat}_{p,\omega},\Delta\text{lon}_{p,\omega}\cdot\cos(\text{lat}_{\omega}^{ref})) (3) where \Delta\text{lon}_{p,\omega}=\text{lon}_{p}-\text{lon}_{\omega}^{ref} and \Delta\text{lat}_{p,\omega}=\text{lat}_{p}-\text{lat}_{\omega}^{ref} . The angle \theta_{p,\omega}\in[0,2\pi) indicates the azimuth from anchor \omega to POI p . Notably, the ensemble of \Omega bearing angles uniquely determines the POI’s 2D position through triangulation, providing comprehensive spatial specification. To implement this, we partition the embedding x_{p} into \Omega equal segments: x_{p}=[x_{p}^{(1)},x_{p}^{(2)},\dots,x_{p}^{(\Omega)}] , where each segment x_{p}^{(\omega)}\in\mathbb{R}^{D/\Omega} corresponds to a specific reference point \omega . For each segment, we apply 2D rotation to consecutive dimension pairs governed by the bearing angle \theta_{p,\omega} : \begin{bmatrix}x_{p,2j}^{(\omega)^{\prime}}\\ x_{p,2j+1}^{(\omega)^{\prime}}\end{bmatrix}=\begin{bmatrix}\cos\theta_{p,\omega}&-\sin\theta_{p,\omega}\\ \sin\theta_{p,\omega}&\cos\theta_{p,\omega}\end{bmatrix}\begin{bmatrix}x_{p,2j}^{(\omega)}\\ x_{p,2j+1}^{(\omega)}\end{bmatrix} (4) for j=0,1,\dots,D/(2\Omega)-1 . This transformation encodes the spatial relationship relative to reference point \omega into the corresponding embedding subspace. The rotated segments are then concatenated to form the final rotated embedding: x_{p}^{\prime}=[x_{p}^{(1)^{\prime}},x_{p}^{(2)^{\prime}},\dots,x_{p}^{(\Omega)^{\prime}}]\in\mathbb{R}^{D}. (5) Through GeoPE, POIs at different locations receive distinct rotational transformations, ensuring that spatial context is implicitly preserved and distinguishable within the latent embedding space. Geo-Semantic PID Construction. Following the GeoPE transformation, the geography-enriched POI embeddings are fed into a Residual Quantized Variational Autoencoder (RQ-VAE) [ 14 , 35 ] to derive semantic identifiers (SIDs). This architecture consists of an encoder network \mathbf{E}_{\phi} , a residual quantizer \mathbf{Q} , and a decoder network \mathbf{D}_{\psi} . Specifically, the encoder transforms the embedding x_{p}^{\prime}\in\mathbb{R}^{D} into a latent representation \mathbf{h}_{p}=\mathbf{E}_{\phi}(x_{p}^{\prime})\in\mathbb{R}^{d} , where d denotes the latent dimension. The residual quantizer discretizes \mathbf{h}_{p} through a multi-stage process utilizing \ell_{s} hierarchical codebooks \{\mathcal{C}_{1},\mathcal{C}_{2},\dots,\mathcal{C}_{\ell_{s}}\} , with each codebook \mathcal{C}_{\ell} containing M learnable code vectors. At each quantization stage \ell\in\{1,\dots,\ell_{s}\} , we identify the nearest code vector in \mathcal{C}_{\ell} to quantize the residual from the preceding stage: \mathbf{z}_{p,\ell}=\arg\min_{\mathbf{c}\in\mathcal{C}_{\ell}}\|\mathbf{r}_{p,\ell-1}-\mathbf{c}\|_{2}^{2} (6) where \mathbf{r}_{p,0}=\mathbf{h}_{p} and the residual for the subsequent stage is \mathbf{r}_{p,\ell}=\mathbf{r}_{p,\ell-1}-\mathbf{z}_{p,\ell} . The latent representation is reconstructed as \hat{\mathbf{h}}_{p}=\sum_{\ell=1}^{\ell_{s}}\mathbf{z}_{p,\ell} , allowing the decoder to recover the original embedding \hat{x}_{p}^{\prime}=D_{\psi}(\hat{\mathbf{h}}_{p}) . The RQ-VAE is optimized by minimizing a joint reconstruction and commitment loss: \mathcal{L}_{RQ}=\|x_{p}^{\prime}-\hat{x}_{p}^{\prime}\|_{2}^{2}+\beta\sum_{\ell=1}^{\ell_{s}}\|\text{sg}[\mathbf{r}_{p,\ell-1}]-\mathbf{z}_{p,\ell}\|_{2}^{2} (7) where \text{sg}[\cdot] denotes the stop-gradient operation and \beta is a balancing hyperparameter. Since each quantized vector \mathbf{z}_{p,\ell} corresponds to a discrete index i_{p,\ell}\in\{0,1,\dots,M-1\} , these indices collectively form the semantic token sequence \mathcal{T}_{\mathcal{S}}(p)=\{\mathcal{S}_{1},\mathcal{S}_{2},\dots,\mathcal{S}_{\ell_{s}}\} for each POI. Given that the input embeddings are spatially enriched via GeoPE, the resulting SIDs implicitly encapsulate both semantic and spatial nuances. Analogous to the prefix-sharing property of GIDs, the hierarchical nature of RQ-VAE ensures that POIs with high geo-semantic similarity tend to share common prefix tokens. Finally, we concatenate the explicit geographic tokens with these semantic tokens to constitute the complete PID: \mathcal{T}(p)=\mathcal{T}_{\mathcal{G}}(L_{p})\parallel\mathcal{T}_{\mathcal{S}}(p) . To resolve potential identifier collisions where multiple POIs map to the same PID, we append a deduplication code to ensure unique identification. In practice, such collisions are rare as GIDs already provide high spatial discriminability. IV-C Generative POI Retrieval With geo-semantic PIDs constructed, we formulate POI retrieval as a generative sequence-to-sequence task. Given a user’s search context, which comprises historical records H_{u} and the current query Q_{u} and location L_{u} , our objective is to leverage LLMs to autoregressively generate the target PID token sequence \mathcal{T}(p^{*}) . To maintain geospatial consistency across the context sequence, all request locations are encoded using the same Geohash scheme as the POI tokenization, yielding a series of geographic tokens \{\mathcal{T}_{\mathcal{G}}(L_{u,1}),\dots,\mathcal{T}_{\mathcal{G}}(L_{u,T}),\mathcal{T}_{\mathcal{G}}(L_{u})\} . The complete input sequence is constructed as follows: \displaystyle\mathcal{S}_{input}=[\mathcal{T}_{\mathcal{G}}(L_{u,1})\parallel\mathcal{T}_{text}(Q_{u,1})\parallel\mathcal{T}(p_{u,1})\cdots (8) \displaystyle\mathcal{T}_{\mathcal{G}}(L_{u,T})\parallel\mathcal{T}_{text}(Q_{u,T})\parallel\mathcal{T}(p_{u,T})\parallel\mathcal{T}_{\mathcal{G}}(L_{u})\parallel\mathcal{T}_{text}(Q_{u})], where \mathcal{T}_{\text{text}}(\cdot) denotes the tokenized query text and \mathcal{T}(p_{u,t})=\mathcal{T}_{\mathcal{G}}(p_{u,t})\parallel\mathcal{T}_{\mathcal{S}}(p_{u,t}) represents the PID of the historical interacted POI at time step t . The LLM is trained to predict the PID for target POIs by maximizing the autoregressive likelihood over the PID token space, formalized as follows: P(\mathcal{T}(p^{*})\mid\mathcal{S}_{input})=\prod_{i=1}^{|\mathcal{T}(p^{*})|}P(v_{i}^{*}\mid v_{