How anushka3031/hotel_booking_chatboat works
Project type and purpose
• This is a specialized chatbot application built around an LSTM model for hotel booking.
• Its main purpose is to gather user information (name, number of people, room type, etc.), save booking details, generate and return a booking ID, and support cancellation by ID.
File structure
Top-level files and directories:
• Assingment_1.docx – project description (not part of runtime)
• Chatboat.ipynb – interactive prototype of the chatbot logic
• Fchat_model/ – serialized TensorFlow LSTM model (saved_model.pb, fingerprint, variables, metadata)
• intents.json – dialogue intents and sample utterances
• tokenizer1.pickle, label_encoder1.pickle – preprocessing artifacts for text → token indices and label encoding
• Result.mp4 – demo recording (not part of runtime)
• README.md – high-level project overview
Observations:
• There is no explicit “frontend” folder; interaction likely occurs through a Python script or notebook (could be extended via a REST API).
• Persistence layer is implied by “Save details” but no database driver or config file is present; you may choose SQLite or another datastore.
README for additional insights
• Describes features: gather booking info, save it, generate a Booking_ID, enable cancellation.
a. Main components
1. User Interface (UI)
– CLI, Jupyter notebook or Web UI (Flask/Streamlit) where user enters booking details.
2. Chatbot Service
– “Controller” layer that accepts user input, orchestrates preprocessing, model inference, and booking logic.
3. NLP Pipeline
– Tokenizer (tokenizer1.pickle)
– Label Encoder (label_encoder1.pickle)
– LSTM Model (Fchat_model/saved_model.pb)
– intents.json lookup for response templates
4. Dialogue Manager / Booking Manager
– Business logic to parse model output, collect parameters (name, people count, dates, room type).
– Generates unique Booking_ID, stores/cancels records.
5. Persistence Layer
– Database or file-based storage for booking records.
6. Model Artifacts Storage
– Filesystem location for the TensorFlow saved model and pickled preprocessing objects.
b. Relationships and interactions
• UI → Chatbot Service: user sends text message
• Chatbot Service → NLP Pipeline: preprocess & run inference
• NLP Pipeline → Chatbot Service: returns intent + entities
• Chatbot Service → Dialogue Manager: apply business rules (create or cancel booking)
• Dialogue Manager → Persistence Layer: write/read booking records
• Dialogue Manager → Chatbot Service: returns confirmation or error message
• Chatbot Service → UI: display the response
c. Architectural patterns / design principles
– Modular separation: keep NLP pipeline, business logic, and storage separate
– Stateless service layer: each request carries all needed context (or use session tokens)
– Single responsibility: one module for inference, one for booking logic
– Easily replaceable model artifacts: model folder can be swapped without changing code
d. Key technologies and frameworks
– Python 3.x
– TensorFlow SavedModel (LSTM)
– Pickle for tokenizer and label encoder
– JSON for intents definitions
– Optional web framework (Flask/FastAPI/Streamlit) for a UI
– SQLite or other RDBMS / file storage for bookings
Essential details to capture
– Exact artifact locations (Fchat_model folder, pickles, JSON)
– Data flows: tokenization → inference → intent→ booking
– Booking lifecycle: create/read/delete