GLIMPSE: Grounding LLM Agents In Live Map Services through Probing, Sampling, and Execution

Marzieh Mehdizadeh, Nathan Brown, Ricardo Castro GarciaarXiv 2026

TL;DR

If you ask an AI to write a database query using only a summary of the database, it will inevitably hallucinate column names, guess stored category codes, and query dead endpoints. In GLIMPSE, researchers replace single-pass Retrieval-Augmented Generation (RAG) with a "closed-loop" agentic workflow that actively probes live public map services, samples actual stored values, and tests filters before committing to a query plan. On a new 291-query geospatial benchmark, this approach boosts execution accuracy from 11.2%–26.6% (for RAG) to 86.7%–88.8%—and does it cheaper than the original 2025 system when paired with a smaller model.

What Problem Does This Paper Address?

Urban planners, engineers, and GIS analysts routinely ask complex spatial questions over public ArcGIS map services—for example, "Find commercial buildings inside a study area but outside a flood zone." Answering this requires finding the right layers among hundreds of public services, looking up exact field names and coded values, and chaining spatial filters.

In 2025, the authors built a standard RAG proof-of-concept that embedded summaries of 730 ArcGIS layers into a vector store, retrieved the top candidates, and asked an LLM (gpt-4o) to generate a JSON query plan in one shot. It achieved just 11.2% execution accuracy. Revisiting the system, they found three fundamental gaps that single-pass retrieval cannot solve:

  1. Near-duplicates abound: Telling apart two similar-sounding layers (e.g., a county soils layer vs. a national copy) requires inspecting their actual fields and data, not just reading summaries.
  2. Decisive facts aren't in the index: Correct queries depend on exact field names and stored literal codes (like how "commercial" or "vacant" is encoded), which summaries omit.
  3. Catalogs drift: Thirteen months after scraping, 51.8% of the catalog's layer URLs no longer resolved (mostly due to one retired county server, plus 5.3% gradual decay elsewhere). Static vector indexes have no way of knowing an endpoint is dead.

Methods

Instead of guessing in an open loop, GLIMPSE (built on the Microsoft Agent Framework and hosted in Microsoft Foundry) implements closed-loop grounding across a four-node workflow:

Comparison of the 2025 open-loop RAG pipeline and the 2026 GLIMPSE closed-loop agentic workflow
  • Intent Agent (gpt-5.4-mini): Converts the natural-language request into a structured SpatialIntent (target, attribute filters, and spatial constraints) without using tools.
  • Catalog Scout: Navigates the 730-layer catalog using deterministic keyword search (grep_catalog), hierarchy browsing (list_services, list_service_layers), place-to-county lookup (resolve_place), and live service inspection (inspect_layer) to check availability, feature counts, and schemas.
  • Plan Composer: Writes an ID-grounded JSON plan (so URLs cannot be hallucinated). Crucially, it uses distinct_values to sample up to 60 stored values before writing any string literal, and test_where to run a live count query against the service.
  • Deterministic Verifier: Checks plan structure, catalog membership, and executes every WHERE clause live, triggering up to two rounds of revision if a filter fails or returns zero features.

The authors also test an optional web-discovery extension that searches ArcGIS Online and the web to find and register official layers that moved due to catalog drift.

Datasets

The authors introduce GeoPlan-Bench, a 291-request benchmark spanning three U.S. counties and four national layers (census tracts, FEMA flood hazard, USA Structures, and wetlands):

  • Hand-written set (36 requests): 31 answerable queries across three complexity tiers (single-layer attribute filters up to multi-constraint spatial queries) and 5 unanswerable queries (3 due to catalog drift, 2 for missing data).
  • Execution-verified generated set (255 requests): Generated by sampling curated concepts, executing candidate plans, keeping only those that return 1–3,000 features with no redundant steps, enumerating equivalent reference readings, and rewording them with gpt-4.1 under deterministic faithfulness checks. Fifty of these require scoping a national layer to a specific county.

Plans are scored by execution accuracy (EX): the returned feature-ID set must have a Jaccard similarity $\ge 0.9$ against the best-matching reference on the same target layer.

Key Insights and Ideas

  • The loop matters more than the retriever: When the authors swapped GLIMPSE's keyword/browsing tools for the exact same dense vector retriever used in the 2025 RAG pipeline, accuracy jumped from 26.6% to 88.8% (gpt-5.5)—statistically indistinguishable from catalog navigation (86.7%).
  • Feedback without agency doesn't help: Giving the 2025 RAG pipeline the deterministic verifier's error feedback without giving it tools to inspect the layers barely budged accuracy (11.2% to 11.9%) and actually dropped valid plans from 51% to 36%. Without observation, the model just replaces one guess with another.
  • Value sampling is the single most critical step: Removing distinct_values caused the largest performance drop (87.4% to 72.7% on gpt-5.4-mini), because models guess natural-language category names instead of stored codes, causing silent empty results.
  • Small models inside the loop match large ones: gpt-5.4-mini inside GLIMPSE achieved 87.4% accuracy at $0.034/query—statistically tied with gpt-5.5 (86.7% at $0.155/query) and cheaper than the 2025 gpt-4o RAG baseline ($0.045/query).

Key Results

On the 286 answerable queries of GeoPlan-Bench:

  • 2025 RAG (gpt-4o): 11.2% EX (51.0% valid WHERE clauses).
  • RAG (gpt-5.5): 26.6% EX (73.1% valid WHERE clauses; $0.257/query).
  • GLIMPSE (gpt-5.5, navigation scout): 86.7% EX (100% valid, 100% live URLs, 100% abstention on unanswerable queries; $0.155/query).
  • GLIMPSE (gpt-5.5, retrieval scout): 88.8% EX ($0.229/query).
  • GLIMPSE (gpt-5.4-mini): 87.4% EX ($0.034/query).
  • Web Discovery (hand-written set): Reached 93.5% EX and successfully recovered all 3 catalog-drift requests by locating republished official county layers.

Limitations and Future Work

  • Catalog scale and geography: The catalog has 730 layers across 13 servers in three counties; whether lexical or dense search scales to statewide portals or all of ArcGIS Online (1–2 orders of magnitude larger) is untested.
  • Geographic scoping: Place resolution relies on a configured municipality-to-county lookup rather than general-purpose geocoding, and the runtime verifier cannot independently guarantee that a query covers the user's intended geographic extent.
  • Strict scoring metric: Execution accuracy compares feature IDs within the reference's target layer, meaning it cannot credit an equally valid answer from a different layer (e.g., a county building-footprint layer instead of USA Structures).
  • Future directions: The authors suggest scoring equivalent and newly discovered layers, caching discovery results to build a self-healing catalog, extending the plan language beyond three spatial predicates, and testing on larger catalogs.

Summary updated

BibTeX
@misc{mehdizadeh2026glimpse,
  author = {Marzieh Mehdizadeh and Nathan Brown and Ricardo Castro Garcia},
  title = {{GLIMPSE: Grounding LLM Agents In Live Map Services through Probing, Sampling, and Execution}},
  year = {2026},
  eprint = {2612.00323},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2612.00323},
}
Figure