
ChatGPT-based Singapore Travel Plan Planner Chatbot - Frontend
Objectives
Implement a chatbot using OpenAI's Chat Completions API
Build a web service using HTML, CSS, JavaScript, and Pyscript
Develop a bundling algorithm to group nearby tourist attractions from a raw dataset
Use user input data and bundled data as input for ChatGPT
Enhance the reliability of ChatGPT's output using prompt engineering techniques (1. Setting rules, guidelines, and examples 2. Using the phrase "Let's think step by step")
Display tourist attractions from the raw dataset as cards on a separate page
Ensure mobile compatibility
Key Features
Tourist Attraction Bundling: Utilized a bundling algorithm to calculate distances and travel times for 107 tourist attractions in the raw dataset, grouping nearby attractions together before sending prompt to ChatGPT. Created 23 bundles, each containing 2 to 5 attractions, with distances between 5km and 10km, and standardized travel time of 60 minutes per attraction.
Index Page: Transition from the first screen to the main page, using sessionStorage to send URLs needed for the chat and attraction pages.
Main Page: Collect travel information from users to provide personalized responses, and pass this information to the chat page.
Chat Page: Use user input and attraction bundles to communicate with ChatGPT API, generating personalized Singapore travel plans.
Attraction Page: Display information for all 107 tourist attractions in the raw dataset as cards.
Sign-up Page: User registration feature.
Login Page: User login feature.
Development Environment
HTML, CSS, JavaScript, Pyscript
Deployment URL
Development Timeline
May 30, 2023 ~ June 15, 2023
Project Structure
Page Implementation
check README.md in my project repository.
Reference
Reference
Data Source: The TOURISM.csv data was sourced from Singapore's public data and converted to CSV format. Singapore Tourism Data
Prompt Engineering: Referenced OpenAI's techniques to improve reliability document. OpenAI Cookbook
0 likes · 7 views · May 6, 2025
Developed a ChatGPT-based Singapore travel plan chatbot using HTML, CSS, and JavaScript.
Timeline
May 30, 2023 - Jun 15, 2023