Welcome to the Hotel Receptionist Chatbot project — an AI-powered virtual receptionist designed to handle frequently asked questions (FAQs) from hotel guests. Built with Haystack for natural language processing (NLP) and FastAPI for backend services, this chatbot offers a seamless and interactive experience for users, mimicking a real hotel concierge.
- Project Overview
- Technical Architecture
- Tech Stack
- Features
- Setup and Installation
- Usage
- Contributing
- Acknowledgments
The Hotel Receptionist Chatbot uses Retrieval-Augmented Generation (RAG) to provide accurate, context-aware answers to user queries. It combines retrieval and generation techniques for optimal responses.
- Hugging Face Embeddings Model: Generates embeddings from a predefined dataset (
FAQs.txt
) to retrieve relevant information. - Gemini Model: Refines and generates human-like, contextually accurate responses.
- Pinecone: Pinecone vector database to store and retrieve embeddings.
This chatbot is designed to be both intelligent and visually appealing, reflecting the ambiance of a luxurious hotel environment.
The system is structured as follows:
- Responsive and elegant chat interface using HTML, CSS, and JavaScript.
- Bootstrap for responsive UI components.
- SweetAlert2 for attractive and user-friendly alert messages.
- Built on FastAPI for high-performance API management.
- Handles chat queries, invokes NLP pipeline, and returns refined answers.
- Hugging Face Embeddings Model: Retrieves relevant data from FAQs.
- Gemini Model: Generates natural and polished responses.
- Haystack RAG pipeline to integrate retrieval and generation seamlessly.
Technology | Description |
---|---|
Haystack | NLP framework for document retrieval & QA. |
Gemini Model | For interating with the user in Conversational way. |
Pinecone | A vector Database for as a RAG Storage |
FastAPI | High-performance Python backend framework. |
HTML/CSS/JS | Frontend structure and interactivity. |
Bootstrap | Responsive, modern UI components. |
SweetAlert2 | Beautiful and responsive alert modals. |
- Interactive Chat Interface: Real-time conversations with a chatbot.
- AI-Powered, Context-Aware Responses: High-quality, intelligent replies using RAG.
- Luxurious Design: Chat interface mimicking hotel lobby ambiance.
- Error Handling: Graceful error messages for unrecognized queries.
- Fully Responsive: Works seamlessly across devices.
- Python 3.7+
- pip (Python package manager)
- Clone the Repository:
git clone https://github.com/MuhammadAbdullah95/Hotel_Receptionist_AI_Agent.git
cd Hotel_Receptionist_AI_Agent
- Set Up a Virtual Environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install Dependencies:
pip install -r requirements.txt
- Run the FastAPI Server:
uvicorn app:app --reload
- Open the Chatbot Interface:
- Open
index.html
located in thetemplates
folder using any browser. - Or serve via local server:
python -m http.server
- Visit
http://localhost:8000
in your browser.
- Launch
index.html
or navigate to the hosted URL.
- Type your question in the chatbox and hit Send or press Enter.
- "What time is check-in?"
- "Do you offer room service?"
- "Is breakfast included in the stay?"
- AI-generated responses appear instantly in a conversational format.
Before running the project, make sure you have the following API keys:
- Google API Key - for accessing Google services (e.g., search, knowledge retrieval).
- Pinecone API Key - for vector database operations (e.g., storing and retrieving embeddings).
- Hugging Face Token (HF_TOKEN) - for accessing hosted LLM models and pipelines.
You can set these API keys as environment variables to keep them secure and avoid hardcoding them into your code.
export GOOGLE_API_KEY='your_google_api_key_here'
export PINECONE_API_KEY='your_pinecone_api_key_here'
export HF_TOKEN='your_huggingface_token_here'
-
Create a
.env
file in the root directory of your project:touch .env
-
Add your keys inside the
.env
file:GOOGLE_API_KEY=your_google_api_key_here PINECONE_API_KEY=your_pinecone_api_key_here HF_TOKEN=your_huggingface_token_here
-
Make sure to load this
.env
file in your Python app (if using something likepython-dotenv
):from dotenv import load_dotenv load_dotenv()
-
⚠️ Important: Add.env
to your.gitignore
to avoid exposing keys:# .gitignore .env
- Never share or commit your API keys publicly.
- Regenerate API keys if you suspect they are compromised.
Feel free to contribute or suggest improvements! ✨
We welcome contributions! Follow these steps to contribute:
- Fork the repository.
- Create a branch for your feature or bugfix:
git checkout -b feature-name
- Commit your changes:
git commit -m "Add feature"
- Push your branch:
git push origin feature-name
- Open a Pull Request for review.
- Haystack: NLP framework for retrieval and generation.
- FastAPI: Backend API framework.
- Bootstrap: Beautiful and responsive UI toolkit.
- SweetAlert2: For stunning alert dialogs.
Enjoy a seamless hotel experience with our AI Receptionist! 🌐✨