An intelligent Retrieval-Augmented Generation (RAG) chatbot that provides context-aware answers about tourism in Sri Lanka using web-scraped data, semantic search, and transformer-based language models.
This project is an end-to-end AI system that answers user queries about tourist destinations in Sri Lanka. It combines web scraping, natural language processing, and large language models to deliver accurate and meaningful responses.
Unlike traditional chatbots, this system retrieves relevant information from a custom-built knowledge base and generates human-like answers using a transformer model.
https://thehoodguy4587-sri-lanka-tourism-chatbot-app-itzzw3.streamlit.app/
- Web Scraping (Tourism Data Collection)
- Data Cleaning & Preprocessing
- Text Chunking
- Embedding Generation
- Vector Storage (FAISS)
- Retrieval
- Re-ranking (Cross Encoder)
- Answer Generation (LLM)
- Streamlit User Interface
The dataset was collected using web scraping from publicly available tourism-related sources.
- BeautifulSoup / Selenium (depending on your implementation)
- Extract tourism descriptions, locations, and attractions
- Clean and preprocess raw text
- Remove noise and irrelevant symbols
- Prepare structured data for embedding
Adam’s Peak (IAST...) Sinhala text... symbols...
Adam’s Peak is a sacred mountain located in central Sri Lanka.
- Frontend: Streamlit
- LLM: google/flan-t5-base
- Embeddings: sentence-transformers/all-MiniLM-L6-v2
- Vector Database: FAISS
- Re-ranking Model: cross-encoder/ms-marco-MiniLM-L-6-v2
- Frameworks: LangChain, Transformers
- Data Collection: Web Scraping
Sri-Lanka-Tourism-Chatbot/
│
├── app.py
├── requirements.txt
├── README.md
│
└── src/
├── rag_pipeline.py
├── vector_store.py
├── embedding_model.py
├── data_loader.py
└── web_scrapping.py
git clone https://github.com/theHoodguy4587/Sri-Lanka-Tourism-ChatBot
cd sri-lanka-tourism-chatbot
pip install -r requirements.txtstreamlit run app.pyThe user can:
- Enter tourism-related queries
- Receive context-aware answers
- Interact with a simple and clean UI
Tell me about Ella
Ella is a scenic town in Sri Lanka known for its lush greenery, tea plantations, and breathtaking viewpoints such as Ella Gap. It is a popular destination for hiking, with attractions like Little Adam’s Peak and Nine Arches Bridge.
- User enters a query
- FAISS retrieves relevant document chunks
- Cross-encoder re-ranks results
- Top documents are passed to the LLM
- LLM generates a final answer
- Context-aware question answering
- Semantic search using vector embeddings
- Re-ranking for improved accuracy
- Clean and interactive UI
- Real-world data via web scraping
- End-to-end AI pipeline
- Built a full RAG pipeline from scratch
- Collected real-world tourism data using web scraping
- Implemented semantic search with FAISS
- Improved retrieval quality using re-ranking
- Deployed an interactive chatbot using Streamlit
- Chat history (multi-turn conversation)
- More powerful LLM (e.g., Mistral, LLaMA)
- Multilingual support (Sinhala / Tamil)
- Image-based recommendations
- Faster deployment and caching
Senitha Gunathilaka Data Science Enthusiast
- Hugging Face Transformers
- Sentence Transformers
- LangChain
- Streamlit
This project demonstrates practical skills in:
- Data collection
- Data preprocessing
- NLP and embeddings
- Information retrieval
- LLM integration
- Model deployment


