Winner of First Position at Expedia Group Campus Hackathon 2026 (Flex!!) An AI-powered hotel recommendation and intelligence platform built to analyze hotel reviews, extract structured sentiment insights, track performance trends over time, detect seasonal drift and review contradictions, and recommend personalized hotels based on user profiles.
The platform separates business logic from presentation and is structured into two independent pipelines:
- Aspect Extraction: Uses a rule-based negation-aware sentiment parser that maps reviews to 14 aspect dimensions (cleanliness, service, wifi, quiet, family, spa, value, accessibility, beach, dining, safety, nightlife, location). It falls back to a generalized token keyword extractor to ensure generalization on out-of-sample data.
- Aspect Aggregation: Aggregates individual sentiments per hotel into rolling historical scorecards.
- Temporal Analysis: Groups review averages by year-quarter to track performance trends.
- Seasonal Drift Detection: Computes quarterly aspect score deviations against the hotel's overall average aspect score to identify cyclic operational strengths/weaknesses (e.g. pool complaints in Q3).
- Contradiction Detection: Extracts polar opposite positive/negative review sentence pairs within the same aspect for a hotel to display balanced viewpoints.
- Data-Driven Weather Simulator: Generates realistic daily weather indicators (temperature, humidity) for each review based on city-specific monthly climate curves.
- Empirical Bayes (EB) Shrunken Profiling: Calculates monthly rating and volume shrunken probability distributions to eliminate noise for low-volume hotels. Establishes weather covariance matrices for positive stays.
- Dynamic Badge Generation: Maps shrunken profiles to seasonal tags (🏖 Summer Favorite, ❄ Winter Escape, 🏡 Quiet Off-Season Gem, 🔥 Crowd Favorite) with statistical explanations.
- Storage Layer: Persists structured data to a local SQLite database (
hotel_intelligence.db) for low-latency querying.
- Preference Representation: Maps raw user descriptions to one of 12 distinct archetypes and extracts structured desired dimensions. Represents the description as a dense concept vector using Latent Semantic Analysis (LSA via TF-IDF + SVD) on the reviews vocabulary.
- First-Stage Retrieval: Cosine similarity nearest-neighbor search (equivalent to FAISS vector index) to retrieve the top 30 candidate hotels in the SVD concept space.
- Second-Stage Hybrid Re-ranking: Scores candidates using a weighted linear combination of:
- Number of desired aspects satisfied (primary rank factor).
- Overall hotel average rating.
- Semantic query similarity.
- Core aspect safety filters (applying penalty weights if safety sentiment is negative).
- NEW: Seasonal Suitability: Multi-factor scoring incorporating shrunken visitor volume probabilities, rating drifts, and destination weather joint alignment likelihoods (Bivariate Gaussian Mahalanobis distances).
- Evidence Extraction: Retrieves grounding positive reviews for each matched aspect to justify recommendations.
preprocess_data.py: Preprocessing script that initializes database, parses reviews, calculates seasonal drift, and extracts contradictions.engine.py: Core recommendation and retrieval logic (LSA vector space, re-ranking, and database retrieval).app.py: Beautiful, premium dark-themed Streamlit dashboard.run.bat: Execution script to preprocess data and launch Streamlit.hotel_intelligence.db: Generated SQLite database.
- Python 3.12+
- Packages:
pandas,numpy,streamlit,plotly,scikit-learn
To run the preprocessing pipeline and launch the dashboard, execute:
run.batOr run manually:
python preprocess_data.py
streamlit run app.py- Archetype mapping: User profiles repeat the same semantic archetypes (solo travelers, business travelers, foodies, etc.). A lookup keyword mapping was created to reliably classify profiles to archetypes and desired dimensions.
- Offline precomputation: Sentiment, temporal, seasonal drift, and contradiction profiles are calculated during batch preprocessing rather than on-the-fly, simulating a production setup where serving latency must remain under 10ms.
- Template reviews: The synthetic reviews are generated from exactly 87 distinct template sentences. The parser was built to perfectly resolve these templates, but it includes an active fallback NLP parser to handle raw, un-templated text.
- Local Retrieval Space: LSA (TF-IDF + SVD) is used for semantic search. While highly efficient and requiring zero internet or GPU, a production system would use dense pre-trained embeddings (e.g. BERT-based or OpenAI embeddings) stored in a distributed vector database like Milvus or pgvector.
- Cold Start: New hotels with no reviews cannot be scored for semantic similarity or aspect matching. A fallback rating-based heuristic is required.
- Deep Learning ABSA: Replace the lexicon aspect parser with a fine-tuned sequence-labeling DeBERTa-v3-small model deployed on Triton Inference Server.
- Generative RAG Summaries: Use a local LLM (e.g. Llama-3-8B) to rewrite extracted review snippets into cohesive, personalized paragraphs (e.g. "Guests like you loved this hotel because...").
- Learning to Rank (LTR): Use historical user click-through rate (CTR) and conversion labels to train a LightGBM Ranker to optimize the hybrid re-ranking weights.