---
title: 'LAMP: City-Specific LLM for POI Retrieval'
url: https://www.emergentmind.com/topics/lamp-framework
type: topic
---

# LAMP: City-Specific LLM for POI Retrieval

LAMP is a city-specific framework for fine-tuning a pretrained large language model so that it can perform conversational point-of-interest retrieval with stronger place specificity and reduced hallucination. Introduced in “LAMP: A Language Model on the Map” [2403.09059], the framework is instantiated on Singapore using Yelp POI data, reverse-geocoded user positions, and synthetic instruction-response supervision. Its central purpose is to enable an LLM to answer fine-grained everyday geographic queries—such as requests for a nearby restaurant, gym, or convenience store—by memorizing which places exist, where they are, and how they relate spatially to a user’s location.

## 1. Problem scope and conceptual definition

LAMP addresses fine-grained, city-level point-of-interest retrieval rather than broad factual geography. The motivating contrast is between generic questions such as identifying a country’s capital and everyday place-centric requests such as “Find me a nearby Starbucks,” “Where can I get Japanese food?,” or “Suggest a gym, then a convenience store, then a bar.” These queries require the model to know which places actually exist, where they are, whether they are near the user, and whether they satisfy the request semantically [2403.09059].

Within this formulation, LAMP is not a prompt-engineering wrapper around an existing model. It is a fine-tuned city-specific assistant designed to memorize the existence of POIs in a given city, their addresses and related attributes, and the spatial proximity relations among streets, districts, and user positions. The paper presents this as a direct response to a limitation of general-purpose LLMs: although such models have broad world knowledge, they do not reliably encode dense local urban geography. In the paper’s examples, untuned models may hallucinate businesses that do not exist, suggest places far away, return generic answers instead of specific POIs, or state that they cannot access location data.

A plausible implication is that LAMP reframes geospatial question answering as localized knowledge injection into a conversational model, with city knowledge treated as a parameterized memory rather than as transient prompt context.

## 2. Spatial knowledge representation and synthetic data construction

The paper instantiates LAMP on Singapore using **18,390 POIs** from the **Yelp Singapore database** [2403.09059]. Each POI includes position and full address, and often includes additional metadata such as opening hours, price range, rating, and services or amenities. The framework’s training data is not manually labeled. Instead, it is generated synthetically through **Retrieval-Augmented Generation (RAG)** and synthetic prompt generation.

For each POI, user positions are sampled within a circle of radius \(r = 150\) meters centered on the POI. The described generation process states \(N_t = 10\) queries per POI or category, and the paper later states that it generated **6 synthetic queries per POI** to form a dataset of about **110,000 queries**. The query classes include name search, category search, type search, and preference/type search. Representative templates include requests for the location of a named POI, requests for a nearby POI category, requests for a highly rated restaurant, and requests for a restaurant offering a specified food type.

A defining design choice is the representation of spatial objects in natural-language address form rather than raw latitude and longitude. The pipeline is: sample a user position near a POI, reverse-geocode the position using **Nominatim / OpenStreetMap reverse geocoding**, provide the resulting address to the model, and train the model to produce the correct POI response. The paper explicitly states that this helps the model grasp proximity among streets and districts. It also states that raw coordinates are avoided because LLMs struggle with long numeric coordinates.

This representation strategy is significant because it shifts spatial supervision from metric coordinates to address-level linguistic grounding. In effect, LAMP learns relations among addresses, districts, and POIs through textual co-occurrence and supervised response generation rather than through explicit geometric operators.

## 3. Model architecture, objective, and hallucination mitigation

The base model used in the paper is **LLaMA-2-7B-Chat**. Fine-tuning is made feasible on a single GPU through **4-bit quantization** and **LoRA (Low-Rank Adaptation)** [2403.09059]. The paper emphasizes that the framework is meant to be general, but the reported implementation uses this model-family and efficiency stack. The training setup uses a train/validation split of **5 queries per POI for training, 1 for validation**, runs for **5 epochs**, and is executed on a **single A100 80GB GPU**. The reported training and validation loss decrease smoothly across the 5 epochs.

The training target is not raw POI metadata. Instead, the framework prompts **LLaMA-2-7B-Chat** with structured information about the target POI or POIs and uses its generated response as the supervision target. At inference time, however, the model receives only the user position converted to an address and the request. The intended learned mapping is

\[
\text{user address + request} \rightarrow \text{POI recommendation response}.
\]

The paper summarizes the supervised objective in standard form as

\[
\theta^* = \arg\min_{\theta} \sum_{i=1}^{N} \mathcal{L}\big(f_{\theta}(x_i), y_i\big),
\]

where \(x_i\) is the user query plus reverse-geocoded user address, \(y_i\) is the synthetic target response generated by LLaMA-2-Chat, and \(\mathcal{L}\) is next-token cross-entropy loss.

A major contribution is the hallucination-reduction strategy. The paper argues that if the training corpus contains only cases where a valid nearby POI always exists, the model may learn a bad prior and invent nearby results when none exists. To counter this, LAMP adds training queries from random positions in the city combined with random place names or categories. This teaches the model that nearby POIs are not always available and that, when none is near, it should return a real but possibly farther POI instead of hallucinating one. The ablated variant without this component is called **LAMP-no-rq**.

This suggests that the framework’s anti-hallucination mechanism is not merely post hoc filtering; it is a prior-shaping intervention at the data-distribution level.

## 4. Evaluation protocol and quantitative behavior

Evaluation is framed as a realistic POI search task in which a user asks for a place or service from a specified position and the model must recommend a nearby relevant POI. The paper reports a human evaluation performed by a team of **GIS-domain experts** on **50 queries** issued from random positions in Singapore [2403.09059]. Responses are scored on three dimensions: **Truthfulness** (whether the suggested POI exists), **Spatial awareness** (whether the suggested POI is actually close or closest), and **Semantic relatedness** (whether the POI is relevant to the request).

The comparison set includes **LLaMA-2-7B**, **LLaMA-2-70B**, **Claude-2**, **ChatGPT-3.5**, **ChatGPT-4 (Browsing)**, **LAMP-no-rq**, and **LAMP**. The reported scores are as follows. LLaMA-2-7B achieves **0.12** truthfulness, **0.20** spatial awareness, and **0.76** semantic relatedness. LLaMA-2-70B reaches **0.30**, **0.36**, and **0.94**. Claude-2 reaches **0.22**, **0.32**, and **0.96**. ChatGPT-3.5 reaches **0.68**, **0.60**, and **0.98**. ChatGPT-4 (Browsing) reaches **0.94**, **0.82**, and **1.00**. LAMP-no-rq reaches **0.76**, **0.84**, and **1.00**. LAMP reaches **0.86**, **0.92**, and **1.00**.

Several implications are explicit in the paper. First, city-specific fine-tuning is decisive for fine-grained POI knowledge: LAMP substantially outperforms untuned LLaMA-2 models, especially in truthfulness and spatial awareness. Second, the random-query strategy improves both hallucination resistance and local ranking behavior: truthfulness rises from **0.76** to **0.86**, and spatial awareness from **0.84** to **0.92**. Third, **ChatGPT-4 (Browsing)** has the strongest truthfulness overall at **0.94**, exceeding LAMP’s **0.86**, but LAMP is stronger in spatial awareness at **0.92** versus **0.82**, while both achieve **1.00** semantic relatedness.

The paper interprets this division directly: ChatGPT-4 with browsing can search the web and therefore has stronger factual recall, whereas LAMP is more tightly specialized to Singapore and better at ranking nearby places. The quantitative profile therefore distinguishes two capabilities that are often conflated in discussion of geographic assistants: factual existence verification and local spatial grounding.

## 5. Qualitative behavior and the day-planning case study

Beyond single-turn retrieval, the paper examines a day-planning scenario in which a user asks, from a starting position in Singapore, for a nearby gym, then a convenience store, then a bar [2403.09059]. LAMP recommends **True Fitness**, **7-Eleven** at Marina Square, and **Bar Square**. The authors manually verify that all recommended POIs exist, that their service descriptions are correct, that they are close to one another, and that the route region is within walking distance of the user’s initial position.

The paper presents this as an emerging capability: LAMP can support multi-step planning rather than only isolated POI lookup. It also reports several qualitative comparisons in which general LLMs hallucinate business names or addresses, or return places that exist but are not near the user, while LAMP produces more local and correct recommendations. A particularly important observation is that ChatGPT-4 may return correct POIs but sometimes not the closest ones, whereas LAMP tends to be more locally optimized.

This suggests that LAMP’s specialization does not merely improve entity recall. It also changes the operational granularity of the model’s responses, shifting behavior from generic recommendation toward route- and neighborhood-sensitive conversational assistance.

## 6. Limitations, likely applications, and research significance

The paper is explicit that hallucinations are reduced rather than eliminated, and that LAMP still sometimes gives incorrect recommendations [2403.09059]. It also states that **ChatGPT-4 with browsing remains stronger on factual correctness**. Additional limitations are structural. A language model is not as efficient as traditional spatial search; the system requires user location during querying, raising privacy concerns; the current instantiation is city-specific and would require new city data for transfer; and the model’s knowledge remains focused on POIs and related attributes rather than broader geospatial reasoning.

The strengths and likely applications follow directly from this profile. The paper identifies strong fine-grained spatial awareness, better local POI retrieval than general LLMs, reduced hallucination relative to untuned models, and the ability to answer conversational multi-step geographic queries. The listed applications include tourist recommendations, restaurant and shopping search, local business discovery, emergency-location assistance, day-planning, route-oriented conversational assistance, urban analysis, and place-aware assistants.

In research terms, LAMP occupies a specific position among LLM adaptation strategies. It does not attempt to solve general geospatial reasoning, and it does not outperform web-enabled systems on truthfulness. Its contribution lies instead in demonstrating that city knowledge can be encoded into a compact conversational model through synthetic supervision over reverse-geocoded addresses and POI metadata. A plausible implication is that future place-aware assistants may combine LAMP-style city memorization with external retrieval, using one component for local spatial ranking and another for dynamic factual verification.

Source: https://www.emergentmind.com/topics/lamp-framework