← Back to Library

Design and Implementation of a Secure RAG-Enhanced AI Chatbot for Smart Tourism Customer Service: Defending Against Prompt Injection Attacks -- A Case Study of Hsinchu, Taiwan

Authors: Yu-Kai Shih, You-Kai Kang

Published: 2025-09-22

arXiv ID: 2509.21367v1

Added to Library: 2025-12-08 18:04 UTC

Red Teaming

πŸ“„ Abstract

As smart tourism evolves, AI-powered chatbots have become indispensable for delivering personalized, real-time assistance to travelers while promoting sustainability and efficiency. However, these systems are increasingly vulnerable to prompt injection attacks, where adversaries manipulate inputs to elicit unintended behaviors such as leaking sensitive information or generating harmful content. This paper presents a case study on the design and implementation of a secure retrieval-augmented generation (RAG) chatbot for Hsinchu smart tourism services. The system integrates RAG with API function calls, multi-layered linguistic analysis, and guardrails against injections, achieving high contextual awareness and security. Key features include a tiered response strategy, RAG-driven knowledge grounding, and intent decomposition across lexical, semantic, and pragmatic levels. Defense mechanisms include system norms, gatekeepers for intent judgment, and reverse RAG text to prioritize verified data. We also benchmark a GPT-5 variant (released 2025-08-07) to assess inherent robustness. Evaluations with 674 adversarial prompts and 223 benign queries show over 95% accuracy on benign tasks and substantial detection of injection attacks. GPT-5 blocked about 85% of attacks, showing progress yet highlighting the need for layered defenses. Findings emphasize contributions to sustainable tourism, multilingual accessibility, and ethical AI deployment. This work offers a practical framework for deploying secure chatbots in smart tourism and contributes to resilient, trustworthy AI applications.

πŸ” Key Points

  • Development of a secure retrieval-augmented generation (RAG) chatbot specifically designed for smart tourism applications, addressing vulnerabilities from prompt injection attacks.
  • Integration of multi-layered linguistic analysis and tiered response strategies, improving contextual awareness and relevance of provided information.
  • Implementation of iterative defense mechanisms against prompt injections, demonstrating significant improvements in blocking attack vectors, reaching up to 100% block rates in certain conditions.
  • Valuable benchmarking of a GPT-5 variant, revealing strengths and weaknesses in intrinsic security against injections, thus contributing insights for future model enhancements.
  • Case study application in Hsinchu, Taiwan highlights the chatbot's contributions to multilingual accessibility, sustainable tourism, and ethical AI deployment.

πŸ’‘ Why This Paper Matters

This paper provides critical advancements in developing secure AI chatbots for the tourism sector, emphasizing the need for robust defenses against prompt injection attacks. By integrating innovative technologies like RAG and new defense mechanisms, it sets a new standard for trustworthiness and safety in AI applications, which is essential for maintaining user trust and promoting responsible AI use in diverse cultural contexts.

🎯 Why It's Interesting for AI Security Researchers

This paper is particularly relevant to AI security researchers as it addresses a pressing issue in the deployment of large language modelsβ€”the vulnerability to prompt injection attacks. By detailing novel defense mechanisms and evaluating the security performance of leading models like GPT-5, the research contributes to the growing body of literature focused on enhancing AI security and resilience, offering practical frameworks that can be adapted for various applications beyond tourism.

πŸ“š Read the Full Paper