TripOn2.0 is an intelligent, evidence-based travel assistant designed for the Indian market. It leverages a powerful Retrieval-Augmented Generation (RAG) pipeline to analyze thousands of real guest reviews via vector embeddings ( pgvector ) and natural language processing. Instead of relying purely on star ratings.
1
stars
40
commits
TypeScript
primary language
Aug 29, 2026
updated
TripOn 2.0 is an intelligent, evidence-first hotel recommendation system and travel assistant designed specifically for the Indian market. Unlike traditional search engines that rely purely on star ratings or basic keyword matching, TripOn 2.0 uses Retrieval-Augmented Generation (RAG) to "read" thousands of real guest reviews and provide conversational recommendations backed by specific, verifiable evidence.
The project is divided into a robust Next.js frontend and a Python-powered Machine Learning backend, connected to a PostgreSQL database with vector capabilities.
/frontend)/ml)/chat route).all-MiniLM-L6-v2 via sentence-transformers.en_core_web_sm) for Named Entity Recognition (NER).cross-encoder/ms-marco-MiniLM-L-6-v2 for precise semantic candidate ranking.pgvector extension for storing 384-dimensional embeddings of hotel reviews.hotels, reviews, locations, users, chat_history, and user_views.TripOn2.0/
βββ frontend/ # Next.js Web Application
β βββ src/app/ # App Router pages (chat, hotels, login, signup)
β βββ src/components/ # Reusable UI (ChatSidebar, ChatInterface, AuthForm)
β βββ src/lib/ # Utilities and NextAuth configuration
β βββ src/app/actions/ # Next.js Server Actions for DB operations
β
βββ ml/ # Python Backend & ML Pipeline
βββ rag/engine/ # Core intelligence (retrieval, aggregation, orchestration)
β βββ chat_assistant.py # LLM orchestration and chat history management
β βββ hybrid_retriever.py # Vector + Keyword search & Dynamic Ranking
β βββ evidence_aggregator.py# SQL-safe evidence packaging & Quote Extraction
βββ rag/pipeline/ # Embedding generation scripts
βββ scripts/ # Data engineering (ingestion, cleaning, scoring)
βββ api.py # Backend API endpoint server
When a user types "Find me a clean hotel in Delhi with fast Wifi", the system executes the following pipeline:
spaCy to extract the destination city ("Delhi").pgvector database, combining semantic vector similarity with exact keyword matching (ILIKE) to fetch a broad set of candidate hotels in the targeted city.evidence_aggregator.py pulls the top reviews for the best candidates.chat_history are passed to Llama 3.HotelRecommendationCard components populated directly by the structured Evidence Packet.Embeddings Creation:
During the data engineering phase, over 81,000 raw guest reviews were vectorized using the all-MiniLM-L6-v2 transformer model. This converts human text into 384-dimensional mathematical arrays (vectors) that capture the semantic meaning of the text, rather than just exact words. These vectors are saved in the pgvector PostgreSQL column.
Hybrid Search:
Relying entirely on vectors can sometimes miss exact names or hard constraints. TripOn 2.0 uses a hybrid approach. It calculates the Cosine Distance (<=>) between the user's query vector and the review vectors in the DB, but simultaneously applies traditional SQL filters (like city_id = X) and keyword boosting to ensure the highest accuracy.
error.tsx) catch unexpected server crashes and display a friendly "Oops! We'll be back soon" UI.loading.tsx) provide smooth spinner animations during route transitions.cd ml
pip install -r requirements.txt
python -m spacy download en_core_web_sm
# Create a .env file with your DB credentials & Groq API Key
python api.py
cd frontend
npm install
# Create a .env file based on .env.example
npm run dev
Open http://localhost:3000 to start exploring!
40 commits
TypeScript
53.6%
Python
40.3%
CSS
5.8%
TripOn2.0 is an intelligent, evidence-based travel assistant designed for the Indian market. It leverages a powerful Retrieval-Augmented Generation (RAG) pipeline to analyze thousands of real guest reviews via vector embeddings ( pgvector ) and natural language processing. Instead of relying purely on star ratings.
1
stars
40
commits
TypeScript
primary language
Aug 29, 2026
updated
TripOn 2.0 is an intelligent, evidence-first hotel recommendation system and travel assistant designed specifically for the Indian market. Unlike traditional search engines that rely purely on star ratings or basic keyword matching, TripOn 2.0 uses Retrieval-Augmented Generation (RAG) to "read" thousands of real guest reviews and provide conversational recommendations backed by specific, verifiable evidence.
The project is divided into a robust Next.js frontend and a Python-powered Machine Learning backend, connected to a PostgreSQL database with vector capabilities.
/frontend)/ml)/chat route).all-MiniLM-L6-v2 via sentence-transformers.en_core_web_sm) for Named Entity Recognition (NER).cross-encoder/ms-marco-MiniLM-L-6-v2 for precise semantic candidate ranking.pgvector extension for storing 384-dimensional embeddings of hotel reviews.hotels, reviews, locations, users, chat_history, and user_views.TripOn2.0/
βββ frontend/ # Next.js Web Application
β βββ src/app/ # App Router pages (chat, hotels, login, signup)
β βββ src/components/ # Reusable UI (ChatSidebar, ChatInterface, AuthForm)
β βββ src/lib/ # Utilities and NextAuth configuration
β βββ src/app/actions/ # Next.js Server Actions for DB operations
β
βββ ml/ # Python Backend & ML Pipeline
βββ rag/engine/ # Core intelligence (retrieval, aggregation, orchestration)
β βββ chat_assistant.py # LLM orchestration and chat history management
β βββ hybrid_retriever.py # Vector + Keyword search & Dynamic Ranking
β βββ evidence_aggregator.py# SQL-safe evidence packaging & Quote Extraction
βββ rag/pipeline/ # Embedding generation scripts
βββ scripts/ # Data engineering (ingestion, cleaning, scoring)
βββ api.py # Backend API endpoint server
When a user types "Find me a clean hotel in Delhi with fast Wifi", the system executes the following pipeline:
spaCy to extract the destination city ("Delhi").pgvector database, combining semantic vector similarity with exact keyword matching (ILIKE) to fetch a broad set of candidate hotels in the targeted city.evidence_aggregator.py pulls the top reviews for the best candidates.chat_history are passed to Llama 3.HotelRecommendationCard components populated directly by the structured Evidence Packet.Embeddings Creation:
During the data engineering phase, over 81,000 raw guest reviews were vectorized using the all-MiniLM-L6-v2 transformer model. This converts human text into 384-dimensional mathematical arrays (vectors) that capture the semantic meaning of the text, rather than just exact words. These vectors are saved in the pgvector PostgreSQL column.
Hybrid Search:
Relying entirely on vectors can sometimes miss exact names or hard constraints. TripOn 2.0 uses a hybrid approach. It calculates the Cosine Distance (<=>) between the user's query vector and the review vectors in the DB, but simultaneously applies traditional SQL filters (like city_id = X) and keyword boosting to ensure the highest accuracy.
error.tsx) catch unexpected server crashes and display a friendly "Oops! We'll be back soon" UI.loading.tsx) provide smooth spinner animations during route transitions.cd ml
pip install -r requirements.txt
python -m spacy download en_core_web_sm
# Create a .env file with your DB credentials & Groq API Key
python api.py
cd frontend
npm install
# Create a .env file based on .env.example
npm run dev
Open http://localhost:3000 to start exploring!
40 commits
TypeScript
53.6%
Python
40.3%
CSS
5.8%