Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lodestar 🧭

The trustworthy answer to AI's infinite search problem.

Lodestar is an AI search-translation layer for travel. It turns natural-language travel intent — "somewhere warm, no red-eyes" — into a small set of personalized, bookable options, and ships every recommendation with a verification receipt: which facts were verified against a source of truth, which are advisory, and which it refused to answer and escalated to a human.

Built solo at the Beyond GenAI Hackathon (Amadeus × Contentstack · Bengaluru · 2026).

The rule

The model proposes, the data disposes.

The LLM is trusted to understand language — never to assert facts. Every booking-critical claim (price, refundability, baggage, visa, seats) surfaces as fact only when a source-of-truth record backs it. No record → hard refusal + human handoff.

Verdict Meaning
VERIFIED Claim matched a source-of-truth record (shown with its record ID)
🟡 ADVISORY Model inference, honestly labeled — never dressed up as fact
🚫 REFUSED Booking-critical but unverifiable → blocked + escalated to an agent

Architecture

Four layers behind one endpoint (POST /search):

  1. Intent translation — Claude (Haiku) turns free text into structured intent. Fallback ladder: Anthropic SDK → claude CLI → deterministic heuristic. Cached. Also classifies query type: trip search vs. visa question vs. flight status vs. hotels.
  2. Search & narrow — candidate query over destinations/fares (SurrealDB or in-memory).
  3. Personalization — history graph + declared interests matched to destination vibes + vibes learned from the user's own captured searches.
  4. Trust / verification — plain code checks each claim against records and issues verdicts. Verification is never an LLM call.

Plus:

  • Capture — every query (including refusals) is logged to a search_log table with parsed intent and verdicts: analytics + a demand-driven roadmap. Readout at /logs.
  • Editorial content layer — Contentstack-shaped destination briefs with per-interest variants (CONTENT_MODE=local stub or contentstack Delivery API).

Run it

npm install
npm run dev            # in-memory mode — zero external deps
# → http://localhost:3000

SurrealDB mode (multi-model store + capture table)

surreal start --user root --pass root --bind 127.0.0.1:8000 rocksdb:.data/lodestar.db
npm run seed:surreal   # 31 destinations, 37 fares, 19 visa policies, 2 demo users
DATA_MODE=surreal npm run dev

Configuration (all optional — see .env.example)

Var Default Purpose
ANTHROPIC_API_KEY Direct API intent translation (else claude CLI, else heuristic)
DATA_MODE memory memory | surreal
CONTENT_MODE local local | contentstack (needs CS_API_KEY, CS_DELIVERY_TOKEN, CS_ENV)
SURREAL_URL ws://127.0.0.1:8000 SurrealDB connection
PORT 3000 HTTP port

All data is demo seed data — fares, schedules and visa notes are illustrative, not real-world advice. In production the same adapter interface points at live travel inventory (e.g. GDS APIs) and the trust layer is unchanged.

Test

node server/smoketest.js   # exercises the full pipeline in-process

License

Hackathon demo — all rights reserved by the author.

About

Trustworthy AI travel search — the model proposes, the data disposes. Built at the Beyond GenAI Hackathon.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages