← things I build
AIPersonal · public repoRUNS LOCALLY

Travel Mitra.

Chat to find US hotels by location, price and rating, then ask what guests actually say. Answers come from reviews via hybrid vector and metadata search.

TECH USED
LangGraphGeminipgvectorAirflowFastAPIStreamlit
Travel Mitra chat showing six hotel cards with ratings and prices
01Search resultsSix hotel cards for New York under $300, 4+ stars
Travel Mitra chat answering a question about the Artezen Hotel from guest reviews
02Review answerA reply grounded in guest reviews, noting what they do not mention
demo
Space or K play and pause, M mute, F fullscreen, arrow keys seek 5 seconds
0:00 / 0:00
the full path

From problem to what's next.

In the order it actually happened. Use the route to jump around.

01THE PROBLEM

Hotel search handles location, price and rating, but what guests actually say is buried in reviews, and a free-form SQL agent is not safe to point at a database.

02THE SOLUTION

A LangGraph ReAct agent on Gemini 2.5 Flash calls typed tools, and the code owns the SQL. An Airflow ETL fills one Postgres and pgvector database, and FastAPI streams the agent steps over SSE to a Streamlit chat UI.

WHAT I BUILT
  1. 01Built the agent with constrained typed tools for locations, hotels, details and reviews, and a Postgres checkpointer for per-thread state.
  2. 02Wrote the Airflow ETL: idempotent upserts, raw-payload staging and a monthly TripAdvisor API call budget.
  3. 03Added hybrid retrieval: vector similarity and structured filters in one pgvector query over denormalized review embeddings.
  4. 04Streamed agent steps through FastAPI SSE into a Streamlit UI with a hotel-card carousel; LangSmith traces each tool call.
03HOW IT'S BUILT

The system, end to end.

CHAT PATH
  1. STEP 01Streamlit UIchat bubbles and hotel cards
  2. STEP 02FastAPISSE streams each agent step
  3. STEP 03LangGraph agentGemini 2.5 Flash · typed tools
  4. STEP 04Postgres + pgvectorhotels, reviews, embeddings
ETL PATH
  1. STEP 01TripAdvisor APImonthly call budget
  2. STEP 02Airflow DAGsidempotent upserts · raw staging
  3. STEP 03Postgresraw payloads, then clean tables
  4. STEP 04Embeddingsmodel recorded per row
01Typed tools, not free SQLThe model picks a tool and fills its arguments; the code owns the SQL. Queries stay safe, deterministic and testable.
02Talking is an actionThe agent speaks only through say() and show_hotels(), so each step renders as its own bubble and the run stops at success.
03Hybrid retrievalLocation, city, price, rating and type are denormalized onto review_embeddings, so similarity and filters run in one query.
04Re-embed only stale rowsThe embedding model is recorded per row, so a model change re-embeds only the rows that are stale.
04WHAT BROKE,
AND THE FIX

FIX →Escaped the dollar sign in chat text (PR #2).

FIX →Reviews are fetched for a price-stratified top-K per city, keeping budget, mid and luxury tiers represented.

FIX →ON CONFLICT upserts plus an api_call_log cap make reruns safe.
05WHERE IT IS NOW
  1. IDEA
  2. BUILDING
  3. LIVE

Public repo; runs locally with docker compose and is not deployed. CI compiles the code, validates compose and builds images.

06NEXT STOPS

The road keeps going.

  1. STOP +1Live date-based pricing via Xotelo /rates
  2. STOP +2Evals for tool-selection accuracy and answer relevance
  3. STOP +3A pytest suite targeting 80% coverage