Abstract
Mapping and navigation services like Google Maps, Apple Maps, OpenStreetMap, are essential for accessing various location-based data, yet they often struggle to handle natural language geospatial queries. Recent advancements in Large Language Models (LLMs) show promise in question answering (QA), but creating reliable geospatial QA datasets from map services remains challenging. We introduce MapQaTor, an extensible open-source framework that streamlines the creation of reproducible, traceable map-based QA datasets. MapQaTor enables seamless integration with any maps API, allowing users to gather and visualize data from diverse sources with minimal setup. By caching API responses, the platform ensures consistent ground truth, enhancing the reliability of the data even as real-world information evolves. MapQaTor centralizes data retrieval, annotation, and visualization within a single platform, offering a unique opportunity to evaluate the current state of LLM-based geospatial reasoning while advancing their capabilities for improved geospatial understanding. Evaluation metrics show that, MapQaTor speeds up the annotation process by at least 30 times compared to manual methods, underscoring its potential for developing geospatial resources, such as complex map reasoning datasets. The website is live at: https://mapqator.github.io/ and a demo video is available at: https://youtu.be/bVv7-NYRsTw.
Introduction
While Large Language Models (LLMs) have made significant strides in general reasoning, they continue to struggle with complex geospatial tasks, such as identifying specific amenities along a navigation route. A primary bottleneck in improving these capabilities is the lack of high-quality, traceable geospatial Question Answering (QA) datasets.
Creating such datasets is currently a labor-intensive process. Manual data collection is slow and prone to errors. Furthermore, because real-world map data (e.g., business hours or road layouts) changes constantly, datasets often lack "traceability"—meaning a question that was correct at the time of annotation might become invalid as live data evolves. MapQaTor addresses these challenges by providing an open-source, extensible framework that centralizes data retrieval, visualization, and annotation.
System Architecture and Workflow
MapQaTor is a web-based platform designed to streamline the entire data pipeline. The framework utilizes a modular adapter architecture to interface with various map service providers (e.g., Google Maps, Apple Maps, Mapbox, TomTom) through a standardized schema. This allows researchers to switch providers with minimal setup.
The workflow consists of several key stages:
- Map Service Selection: Users choose a desired map provider.
- Query Submission: Users interact with specialized tools to fetch geospatial data.
- Adapter & Tracker: An adapter converts queries to the provider's specific format, while a tracker records API calls for future reference.
- Caching for Reproducibility: Every API response is cached in a PostgreSQL database. This ensures that the "ground truth" remains consistent for future evaluations, even if live map data changes.
- Context Design & Annotation: Fetched data is visualized in an embedded map and added to a "Context." Users then design QA pairs, often assisted by AI suggestions from models like Gemini-2.0-Flash.
- Export: The final dataset is exported as a structured JSON file.
Standardized Data Collection Tools
To facilitate diverse geospatial queries, MapQaTor provides five core tools: Text Search, Place Details, Nearby Search, Compute Routes, and Search Along Route. Each tool follows a unified schema for inputs and outputs, ensuring consistency across different map providers.
To improve LLM reasoning and reduce costs, the system includes a "Context Optimization" feature. This converts bloated, structured JSON data into a compact, human-readable "Formatted Context," reducing token usage by approximately 85%.
Evaluation and Results
The effectiveness of MapQaTor was evaluated through the creation of the MapEval benchmark, a subset of 300 multiple-choice questions (MCQs) annotated using the framework.
- Massive Speedup: In controlled experiments, MapQaTor was at least 30 times faster than manual data collection. Tasks that took nearly 8 minutes manually were completed in just 12-15 seconds using the framework.
- The "Visual Gap": A striking finding was that humans, using MapQaTor’s visualization tools, achieved 86.67% accuracy, while the best LLMs (Claude 3.5 Sonnet and Gemini 1.5 Pro) reached only 66.33%. This 20% gap suggests that humans can interpret spatial relationships visually that are difficult to capture fully in text-only prompts.
- LLM Benchmarking: Results showed that current state-of-the-art models still have significant room for improvement in geospatial reasoning, with GPT-4o following the leaders at 63.33% accuracy.
Conclusion and Future Work
MapQaTor provides a robust solution for the challenges of geospatial data annotation. By centralizing retrieval and visualization while ensuring reproducibility through caching, it enables the development of complex reasoning datasets at scale. Future work will focus on integrating non-map sources, such as TripAdvisor or Yelp, to provide even richer metadata for QA pairs and further refining human-in-the-loop AI assistance to enhance dataset quality.
Summary updated