llm generative-ai natural-language-interface transportation-safety spatial-queries rule-based-validation massachusetts-database gis
Abstract
Transportation safety analysis requires integrating crash records, roadway attributes, and geospatial data through GIS-based workflows, but access remains uneven across agencies and community stakeholders. Technical prerequisites create a gap between analytical tools central to safety planning and the practitioners able to use them. Local agencies, school committees, and residents may have safety concerns but limited capacity to retrieve, filter, map, and analyze relevant data. Generative AI offers a way to narrow this divide, but its public-sector use raises questions about reliability, reproducibility, and governance. This paper presents a schema-grounded natural language interface for transportation safety analysis, using a large language model (LLM) to interpret user intent while preserving deterministic, reviewable execution against an authoritative database. User queries are translated into structured semantic frames, validated by a rule-based layer, compiled into a typed directed acyclic graph of spatial operations, and executed against a PostGIS database. This bounded design separates language interpretation from deterministic execution, keeping results reproducible and schema-grounded while removing access barriers. The framework is evaluated using a statewide Massachusetts transportation safety database integrating crash records, roadway attributes, and geospatial layers including schools, bus stops, crosswalks, and municipal boundaries. All queries executed successfully; the validation layer corrects errors in 29% of evaluation queries, reflecting the gap between flexible natural language and strict schema-grounded requirements. The results suggest that combining natural language accessibility with deterministic execution is a practical direction for broadening access to transportation safety data, with implications for trustworthy AI in public-sector planning.
한국어 요약
📋 한 줄 요약
**[교통 안전 / Schema-Grounded NL Interface]** LLM이 의도 해석하고 rule-based validation·typed DAG·PostGIS 결정론적 실행으로 분리한 framework로 매사추세츠 전주 교통안전 DB의 자연어 질의 100% 성공·29% query에서 validation 오류 자동 교정.
🎯 핵심 기여도
- 교통 안전 분석이 crash record·도로 속성·geospatial data를 GIS 워크플로로 통합하지만 기술 진입장벽이 지방 기관·학교위원회·주민의 데이터 접근을 차단한다는 형평성 문제 진단.
- 공공부문 generative AI의 reliability·reproducibility·governance 우려를 schema-grounded NL interface로 해소하는 프레임워크 제시.
- User query → structured semantic frame → rule-based validation → typed DAG of spatial operation → PostGIS 실행의 bounded design — 언어 해석과 결정론적 실행을 분리해 결과 reproducible·schema-grounded 보장.
- 매사추세츠 statewide DB(crash·도로·schools·bus stops·crosswalks·municipal boundary)로 평가, 전 query 실행 성공·validation layer가 29% query에서 오류 교정.
💡 핵심 아이디어
공공부문 generative AI의 신뢰성·접근성 trade-off는 LLM의 유연한 의도 해석을 typed DAG·schema validation의 결정론적 실행과 명시적으로 분리함으로써 동시 달성 가능하며, 이로써 비전문가의 데이터 접근을 reproducible하게 확장할 수 있다.
🔬 기술적 접근법
- **방법론**: Schema-grounded NL interface (LLM 의도 해석 + 결정론적 실행).
- **핵심 기법**: (1) User query를 structured semantic frame으로 번역, (2) Rule-based validation layer가 schema 적합성·정합성 검증, (3) Typed directed acyclic graph(DAG)로 spatial operation 컴파일, (4) PostGIS 데이터베이스에서 결정론적 실행, (5) Massachusetts 통합 안전 DB(crash·roadway·geospatial layer)에서 end-to-end 평가.
📊 주요 결과
- 매사추세츠 전주 교통안전 DB에서 모든 평가 쿼리 실행 성공.
- Validation layer가 평가 쿼리의 29%에서 오류 교정 — 자연어의 유연성과 schema-grounded 엄격성 격차 정량화.
- Schema·운영 layer 통합: schools·bus stops·crosswalks·municipal boundary 모두 처리.
- 공공부문 AI의 reproducibility·trustworthiness 사례 확보.
💭 의의 및 한계
**의의**: 공공부문 generative AI 도입의 trustworthy 설계 청사진, 교통 안전 의사결정의 형평성 확장, NL 접근성과 결정론적 실행의 양립 가능성 입증. **한계**: 단일 주(매사추세츠) DB로 평가하여 다른 주·국가 schema로 일반화 미검증, validation rule 구축의 도메인 전문가 의존, 29% 교정률은 자연어 ambiguity의 잔존 부담을 시사.
🚀 실용적 활용
- 지방 정부·시민의 교통안전 데이터 접근 도구.
- 공공부문 LLM 응용의 reliability·governance 템플릿.
- GIS·PostGIS 기반 결정론적 NL2SQL 일반.