From questions to insights: how domain-specific semantics boost LLM access to touristic real-time occupancy data
摘要
Timely access to occupancy data, combining real‑time measurements and short‑term predictions, is critical for tourism destinations to enhance visitor experiences and manage overcrowding. While this data is increasingly collected, it remains stored in complex databases that are challenging to access flexibly, particularly for large language models (LLMs), which cannot query structured sources directly. LLMs are increasingly valuable in smart tourism, offering conversational access to digital services that support both guests and staff. This paper evaluates the potential of semantic approaches to improve LLM-based access to complex occupancy databases, proposing a zero-shot prompt approach and a semantic agent that iteratively corrects queries until they execute successfully. Both rely on a multi-level tourism occupancy ontology, driving a knowledge graph that captures multiple perspectives on occupancy data, both measured and predicted, and enriched with metadata such as provenance. Evaluated on 19 realistic tourism questions, the agent achieves 42% accuracy and the simpler pipeline 37%, outperforming the evaluated leading text-to-SQL systems while reducing database load and cost. Our findings indicate that semantic guidance improves accuracy and stability in LLM-based access to structured tourism data. Theoretically, this clarifies the role of semantic abstraction, natural-language annotations, input sensitivity, and agentic behavior in query generation. Practically, these insights inform ontology engineering, constrained agent design, and efficient system architectures for LLM-driven tourism applications, such as visitor management and occupancy prediction systems.