Skip to content

5.1/Travel DNA: preference modeling

Chapter 059 min read

Data & intelligence layer

Zilia's intelligence is not a bigger model. It is a structured memory of each traveler, a travel knowledge graph, proprietary price history, and one strict rule: models explain decisions, while data and code make them.

Key decisions in this chapter

  1. Ranking is learned, not generated: gradient-boosted learning to rank decides the order; a model writes the explanation.

  2. Travel DNA is typed and inspectable: every preference has a value, a confidence and a source.

  3. The knowledge graph lives in Postgres first. A graph database only if traversal needs prove it.

  4. Every search writes to price history from day one. By month six it is pricing intelligence nobody else has.

  5. The model never types a number the traveler pays. Prices, times and policies render from data.

5.1

Travel DNA: preference modeling

A typed profile that improves with every trip, scoped so that business habits never leak into family holidays, and visible to the traveler at all times.

Travel DNA, simplified
// One profile per traveler, scoped by trip typeTravelDNA {  companions: [{ id: "c_ana", relation: "partner" }, { id: "c_mia", relation: "child", age: 3 }]  hard: [{ key: "no_red_eye", value: true, source: "stated", confirmed: "2026-11-02" }]  soft: [{ key: "hotel_style.boutique", weight: 0.72, confidence: 0.81, source: "inferred" }]  value_of_time: { currency: "EUR", per_hour: 38, confidence: 0.6 }  budgets: { city_break: [600, 1200], family_summer: [3500, 5500] }  comfort: { seat: "aisle", max_layover_min: 150, red_eye_ok: false }  pace: "balanced"  loyalty: [{ program: "airline", tier: "gold", number: "vault:ly_19" }]  risk: { refundability_bias: 0.7 }  scopes: ["leisure", "family", "business"]}
SignalExampleWeightDecay
Stated"I'm vegetarian." "Never connect in Frankfurt."Highest, written at onceNone until changed
ChoicePicked the boutique hotel over a cheaper chainMedium, as a pairwise preference12-month half-life
BehaviorOpened every review that mentions noiseLow6-month half-life
OutcomeRated a stay 2 out of 5 for noise; complained about a 45-minute connectionHigh24-month half-life
ContextBusiness trip or family holiday, with or without kidsScopes all the othersNot applicable
Table 5.1 · Learning signals, how much they count and how long they last.

Solving the cold start

Sixty-second Travel DNA

Six visual either-or choices during onboarding: boutique or chain, early or late, packed or slow.

getmyhotels history

With consent, past bookings seed hotel style, budgets and favorite cities from day one.

Forward your confirmations

Travelers forward booking emails to their own Zilia address. No mailbox access to request, and the traveler stays in control.

Link loyalty programs

Status and points shape routing and hotel choices from the very first trip.

The ranking pipeline

  1. 01

    Candidates

    Supplier search plus hard-constraint filters. Anything that breaks a must-have never enters ranking.
  2. 02

    Features

    Price against the market, distance to the traveler's anchors, review aspects, preference fit, supplier reliability, flexibility.
  3. 03

    Learning to rank

    A LightGBM LambdaMART model trained on choices and outcomes, with margin excluded as a feature.
  4. 04

    Diversify

    Three candidates that differ in a meaningful trade-off, never three near-duplicates.
  5. 05

    Explain

    A small model writes the why, grounded in the features that actually drove the rank.

5.2

Knowledge graph and structured memory

A graph of places, properties and people that lets Zilia say 'a quiet courtyard room near a neighborhood like the one you loved in Lisbon', with every word grounded.

  • Mayavisited, loved itAlfama, Lisbon
  • Alfama, Lisbonsimilar_to 0.86Gràcia, Barcelona
  • Gràcia, Barcelonanear, 6 min walkHotel zh_88412
  • Hotel zh_88412has_room_typeCourtyard rooms (quiet)
  • Mayaavoids, after Rome 2025Street-facing rooms
  • Hotel zh_88412mapped_togetmyhotels, Rapid and Hotelbeds codes
Figure 5.1 · A slice of the knowledge graph. Each fact used in a recommendation traces back to an entity or a relation.

Entities

  • Traveler
  • Trip
  • Booking
  • Destination
  • Neighborhood
  • Place of interest
  • Hotel (canonical)
  • Room type
  • Airport
  • Airline
  • Route
  • Supplier
  • Event
  • Season

Relations

  • located_in
  • near (walk minutes)
  • good_for (tag)
  • similar_to
  • served_by
  • mapped_to (supplier codes)
  • has_room_type
  • visited (with rating)
  • avoids
  • reliability_of
  • Depth over breadth: the 30 launch destinations get editor-reviewed neighborhood profiles covering vibe, walkability, family fit, nightlife and safety notes. Thirty destinations done brilliantly beat three thousand done generically.
  • Built with AI, checked by people: profiles are drafted by extracting from licensed content and verified by editors before any agent may cite them.
  • Supplier reliability scores per supplier and property: booking failure rate, amendment speed, overbooking incidents and mismatched rooms. They feed ranking and supplier routing.

5.3

Pricing intelligence and optimization

Every search Zilia runs becomes a price observation. Together with getmyhotels' booking history, that turns into pricing intelligence competitors cannot buy.

MVP

  • All-in normalization: taxes, resort fees, currency
  • De-duplication across suppliers: same room and terms, best net rate wins
  • Deal badges grounded in history, such as 18% below this hotel's 60-day median
  • Re-shop scheduling for Price Guardian

Phase 2

  • A fair-price index per hotel and date
  • Fare-trend signals per route, such as fares usually rise in the last 21 days
  • Dynamic packaging: package rates unlocked with a flight, where contracts allow
  • Markup optimization within a band, never above public parity

Phase 3

  • Buy-or-wait predictions with calibrated confidence
  • Demand-aware prioritization of Price Guardian re-shops
  • Negotiated rates backed by aggregated Zilia demand
Trip optimizer
// Total-trip optimizer, solved for every set of candidatesminimize    all_in_price          + value_of_time × extra_hours          + risk_weight × risk_penaltysubject to  every hard constraint in the TripBrief            the budget ceiling            supplier and fare rules
  • Margin never boosts rank beyond breaking a tie between equivalent options.
  • Never hide the cheaper equivalent. If the same room is cheaper elsewhere in our supply, the traveler sees it.
  • Upsell only on value: an upgrade is offered when its value per dollar clears a threshold for this traveler, never by default.
  • Name the supplier on every booking, so the traveler knows who holds their reservation.

5.4

Safety and hallucination control

Booking actions are where a hallucination becomes a financial loss. The defense is structural: models can propose, only code can commit, and every number comes from data.

Model side · proposes

  1. Agents reason over grounded options

  2. BookingIntent@1 { items, quote_ids, total, travelers: vault refs }

  3. Verifier: constraints, policy and Mandates

Code side · commits

Transaction Service: six gates, all must pass

  1. 1

    Fresh quote

    The quote exists and is under 10 minutes old, and it is re-priced live at commit.

  2. 2

    Price within tolerance

    The live total matches what the traveler approved, within the absorb limit.

  3. 3

    Valid approval

    A signed token from a traveler tap or an active Mandate, bound to amount, items and expiry.

  4. 4

    Right travelers

    Names and documents from the vault match the booking exactly as on passports.

  5. 5

    Policy check

    Cancellation terms shown word for word, entry rules met, supplier rules respected.

  6. 6

    Limits and idempotency

    Spend limits per traveler, per Mandate and globally, and an idempotency key on every write.

Only then: suppliers, payment capture and confirmations

Figure 5.2 · The commit boundary. Everything left of the line is reasoning; everything right of it is deterministic, tested code with six gates.

Slot-filled rendering

Numbers, times, names and policies render from structured fields. The model writes the sentence around placeholders such as {offer.price}; it never types the value.

Grounded claims

Every factual claim about a place, rule or supplier must cite a tool result or a knowledge-graph entity. The Verifier strips or flags anything unsupported.

Structured handoffs

Messages between agents are structured outputs validated against schemas. Free text never crosses an agent boundary.

A second opinion for high stakes

Recovery actions and cancellations get an independent cross-check by a second model before they reach the commit boundary.

Prompt-injection defenses

  • Supplier descriptions, reviews, emails and web pages are untrusted data, read by a quarantined model with no tools.
  • Write tools need approval tokens that no text can produce, so an injected instruction cannot book, cancel or pay.
  • Browsing, where allowed, is limited to allow-listed domains, and every fetched page is logged.
  • Injection test suites run on every prompt and model change.
LayerWhatWhen
Golden scenarios500 trip requests across personas, each with expected constraint outcomesEvery prompt or model change
Simulated travelersModel-driven travelers for multi-turn conversations, including confused and adversarial onesNightly
Shadow modeNew agents and Mandate types run silently beside productionTwo weeks before they may act
Online metricsConstraint satisfaction, grounding rate, booking success, recovery time, escalation rate, cost per tripContinuously, with alerts
Red teamingPrompt injection, fraud and abuse attemptsBefore every new autonomy level
Human reviewA daily sample of conversations, plus every autonomous action above a thresholdDaily
Table 5.2 · The evaluation program. No agent ships, and no autonomy level rises, without passing it.

5.5

Compliance

Being a real agency means real obligations. Most are known and manageable if they are designed in from week one rather than bolted on before launch.

AreaWhat it means for ZiliaWhen
Seller of Travel (US)Register in California, Florida, Washington and Hawaii, and wherever else required, before selling to their residents.Before US launch
Package travel (EU and UK)Selling a flight and a hotel together can create a package or a linked travel arrangement under the EU Package Travel Directive, with insolvency protection and liability, and ATOL rules apply in the UK. Choose the entity, insurance and bundling design before bundles launch in Europe.Decide in weeks 1 to 4
Price displayAll-in prices that include mandatory fees, as the US FTC rule on hotel fees and EU consumer law require.MVP
PaymentsPCI DSS scope minimized with Stripe and the vault; Strong Customer Authentication with 3-D Secure in Europe.MVP
PrivacyGDPR and CCPA rights, data processing agreements with every model provider, and memory deletion that reaches backups.MVP
AI transparencyTell travelers they are talking to an AI, label AI-generated content and keep a human escalation path, in line with the EU AI Act.MVP
Messaging consentWhatsApp opt-in and template policies, and SMS consent rules such as the TCPA in the US.MVP
AccessibilityWCAG 2.2 AA for the web app and, later, the mobile apps.MVP
Table 5.3 · Compliance checklist. A starting point for counsel in each launch market, not legal advice.

getmyhotels already operates as a hotel seller, so parts of this exist today: payment flows, supplier contracts and customer-service obligations. What is new is flights, bundling, autonomous actions and AI transparency, and those deserve a named owner from the first sprint.