用自然语言查询交通数据,让普通人也能安全分析路况。
Broadening Access to Transportation Safety Data with Generative AI: A Schema-Grounded Framework for Spatial Natural Language Queries

- 将自然语言转为结构化查询,确保结果可复现
- 验证层修正29%的错误输入,提升准确性
- 适合基层机构、居民等非专业用户使用
交通安全隐患分析需整合事故记录、道路属性和地理空间数据,但不同部门与公众获取数据能力不均。技术门槛使分析工具难以普及。本地机构、学校委员会及居民虽有安全关切,却缺乏数据检索与分析能力。生成式AI可缩小此差距,但其在公共领域应用面临可靠性、可复现性与治理挑战。本文提出基于数据模式的自然语言接口,利用大语言模型理解用户意图,同时在权威数据库上执行确定性操作。用户查询被转化为结构化语义框架,经规则层验证后编译为带类型的有向无环图空间操作序列,并在PostGIS数据库中执行。该设计将语言理解与确定性执行分离,保障结果可复现且符合数据模式,降低使用门槛。在马萨诸塞州全州交通数据库上评估,涵盖事故记录、道路属性及学校、公交站、人行横道、行政区划等地理图层。所有查询成功执行,验证层纠正了29%的错误查询,反映自然语言灵活性与严格数据模式间的差距。结果表明,结合自然语言易用性与确定性执行是扩大交通数据访问的有效路径,对公共规划中可信AI具有启示意义。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。