How it works
CoastWise is a retrieval-augmented planner. The knowledge comes from a curated Coastal Karnataka dataset; the language model only writes the wording around it.
┌──────────────┐ ┌────────────────┐ ┌──────────────────┐
│ User input │ → │ Query process │ → │ RAG retrieval │
└──────────────┘ └────────────────┘ └────────┬─────────┘
│
┌───────────────────────────▼──────────────┐
│ Coastal Karnataka knowledge base │
│ places · stays · food · activities · │
│ transport · curated notes (+ sources) │
└───────────────┬──────────────────────────┘
│ pgvector cosine search
┌───────────────▼──────────────┐
│ Rule-based ranking │
│ interests · diet · style · │
│ intensity · feedback signal │
└───────────────┬──────────────┘
│
┌────────────────────▼─────────────────────┐
│ Route optimisation + budget optimisation │
└────────────────────┬─────────────────────┘
│
┌───────────▼───────────┐
│ LLM narrative layer │
└───────────┬───────────┘
│
┌─────────────────▼──────────────────┐
│ Personalised itinerary → feedback │
│ feedback → ranking signal (loop) │
└────────────────────────────────────┘Origin, destinations, days, people, budget, dates, style, interests, diet, transport, hotel preference and activity intensity are captured as one typed request object.
The request is turned into a retrieval query and a set of hard filters (diet, style, intensity, towns) plus soft scoring weights.
Curated notes are embedded and searched in Postgres with pgvector using cosine similarity; when embeddings are unavailable a keyword fallback keeps the demo working.
Places, beaches, temples, stays, restaurants, cuisine, activities and transport legs — each row keeps a source reference and an Approximate / Live / Unavailable confidence label.
Deterministic scoring on interest overlap, diet match, price fit to travel style, activity intensity, hidden-gem bonus and an aggregated feedback signal.
A nearest-neighbour pass over coastal coordinates orders towns to avoid backtracking; the budget optimiser fits transport, stays, food, activities, entry fees and misc to the total and proposes cheaper swaps when it overruns.
The model writes only the titles, taglines, day headlines and notes over the already-selected records. It is instructed to use retrieved knowledge and never invent prices, ratings or schedules.
Ratings and per-category feedback are stored and used as a controlled ranking signal for future recommendations — never as automatic model retraining.
Hotel prices, ratings, transport schedules, opening hours and ticket availability are never invented. Anything not verified live is labelled Approximate, and unavailable data is labelled Unavailable.
The architecture is modular so real Maps, Weather, Bus, Flight, Hotel and Restaurant APIs can replace the approximate layers later.