All work

TripTactix

AI travel planning with a real price-prediction model

Year
2026
Status
Shipped

Solo: full stack, model training, deployment

Screenshot of TripTactix

The problem

Fare prediction is the part of travel planning that actually needs a model, and it is usually the part that gets faked. Most "AI travel" tools ask a language model when to book, which produces a confident sentence and no signal.

Approach

Itinerary generation uses LLMs, because that is a language task. Fare forecasting does not. It uses a gradient-boosting regressor trained on over 600,000 Indian flight records, reaching R² ≈ 0.97, which predicts the fare and the best time to book. Live flight and train comparison comes through SerpAPI. The whole thing runs on Cloudflare's edge: Pages Functions for the API, D1 for the database, Prisma as the ORM.

Architecture

Requests hit Cloudflare Pages; itinerary generation routes to an LLM while fare prediction routes to a gradient-boosting model, with D1 through Prisma for storage.BrowserNext.js 15CLOUDFLARE EDGEPages FunctionsAPI routesLLM itineraryGroq · GeminiFare modelGBM, R2 ~ 0.97D1 via PrismaItinerary + faresbest time to book600K+ flight records, trained offline
Language tasks go to the LLM; regression goes to the regressor. Both run behind one edge API.

In short

  • Gradient-boosted fare model trained on 600,414 flight records, reaching R² 0.978 and a mean error of about ₹2,088
  • Layered recovery for unreliable model output: structural extraction, regex repair passes, then a conversational self-correction turn
  • Full edge deployment on Cloudflare Pages Functions, D1 and Prisma

What I took from it

Splitting the problem by what each tool is actually good at, a language model for language and a regressor for regression, is what makes the price prediction defensible. A number from a gradient-boosting model trained on 600K records can be checked against held-out data. A number a language model produces cannot.

Built with

  • Next.js 15
  • TypeScript
  • Python
  • scikit-learn
  • Perplexity API
  • Cloudflare Pages
  • Cloudflare D1
  • Prisma