TOTemitayo Ogunsusi
← Back to research

M.S. thesis · 2025–2026

Geospatial Text-to-SQL

A benchmark and evaluation pipeline for translating natural-language geospatial questions into executable PostGIS queries.

Focus

Text-to-SQL · PostGIS · GPT-4 · Llama 3 · Evaluation

Status

M.S. thesis

Year

2025–2026

Language meets location

Ask a question. Find its place.

↳ EXAMPLE QUESTION“Which places are nearby?”
SCHEMA + LLM → SPATIAL SQL↗
SELECT name FROM places
WHERE ST_DWithin(…)
◎
PostGIS → matching locationsEvaluate accuracy & query efficiency
Explore the process
  1. Pair a natural-language spatial question with database schema context.
  2. Generate SQL using a language model and schema-aware prompting.
  3. Execute the spatial query against PostGIS to retrieve matching records.
  4. Evaluate execution accuracy and query efficiency against the benchmark.

01 / Research question

Can general-purpose LLMs reliably generate spatial SQL involving distance, geometry predicates, and spatial joins?

02 / Method

  1. 01

    Construct a PostGIS benchmark pairing natural-language questions with executable spatial queries.

  2. 02

    Evaluate state-of-the-art models with schema-aware prompting and augmented question–query pairs.

  3. 03

    Measure behavior with Execution Accuracy and Valid Efficiency Score, then classify failure modes.

03 / Outcome

The resulting system demonstrates competitive executable retrieval while establishing a reproducible basis for studying LLM behavior on spatial databases.

Continue exploring

From experiments to systems.

View selected work