FOSS4G NA 2024

Applying Large Language Models (LLMs) to Geospatial Search and Analysis
09-10, 13:30–14:00 (America/Chicago), Grand G

Discover real-world lessons using LLMs for Geocoding, STAC Search, and Geospatial analysis. Learn tips for prompt optimization, converting natural language to data structures, and transforming natural language into SQL queries using Open Source libraries and tools.


Every geospatial project begins with a quest for answers. Large Language Models (LLMs) are revolutionizing how we can directly understand user needs through techniques like natural language to data structure conversion. Over the past year, I have been developing innovative approaches such as Natural Language Geocoding and Natural Language STAC search, which have proven to be game-changers in the field of geospatial analysis.

In this talk, I will share insights and practical experiences from my work at Element 84, where we've been pushing the boundaries of what's possible with LLMs in geospatial applications. We'll explore how open vision models can be combined with these techniques to enable searching for natural features in specific areas, providing a powerful tool for environmental monitoring, urban planning, and more.

We'll also delve into systems we've built to answer scientific questions from documents and databases using advanced techniques like Retrieval Augmented Generation, LLM Agents, and Natural Language to SQL conversion. These systems showcase the potential of LLMs to transform unstructured natural language inputs into structured, actionable data.

This talk is designed for the geospatial community, united by a passion for solving problems with open technologies, tools, and approaches. At Element 84, we believe in the power of open source and are eager to share the techniques and lessons we've learned to help others benefit from our experience.

Key topics covered in the talk will include:

  • Converting Natural Language Queries into Data Structures: Learn how to use LLMs and libraries like Pydantic to transform user queries into structured data formats.
  • Open Source vs. Closed Source LLMs: A comparison of the benefits and trade-offs between using open-source and closed-source language models.
  • Writing Effective Prompts for LLMs: Tips and best practices for crafting prompts that yield accurate and relevant results from language models.
  • Natural Language Geocoding: An exploration of how we use the Nominatim (OpenStreetMap) API to convert natural language descriptions into precise geospatial coordinates.
  • Natural Language to SQL: Techniques for converting natural language queries into SQL statements to interact with databases seamlessly.
  • Handling Ambiguity: Strategies for managing and resolving ambiguous user inputs to ensure accurate and meaningful outcomes.
  • Supporting Conversations: How to use LLMs to facilitate interactive and context-aware conversations with users.
  • Choosing and Using Language Model Libraries: Insights on selecting and effectively utilizing libraries like LangChain and LlamaIndex for various geospatial applications.

By the end of this session, attendees will have a comprehensive understanding of how to leverage LLMs to enhance geospatial search and analysis. You'll gain practical tips and insights that you can apply to your own projects, helping to advance the field of geospatial technology through innovative use of LLMs.

Join us to discover how these powerful models can transform the way we approach geospatial problems, making data more accessible, analysis more intuitive, and solutions more effective. Let's push the boundaries of what's possible together, using the power of LLMs and open source technology.