Workflow · Production

Google optimizes trip-planning itineraries with a hybrid LLM and constraint-optimization system

The problem

LLMs handle soft qualitative preferences well but are unreliable at hard logistical constraints like opening hours, travel times, and scheduling feasibility, producing itineraries with impractical elements.

Workflow diagram · grounded in source
1
Trip query received
trigger
“a feature that suggests day-by-day itineraries in response to trip-planning queries”
2
LLM generates initial plan
ai_action
“we first pass the query to an LLM, which for our system is a version of our latest Gemini models. The LLM suggests an initial trip plan consisting of a list of activities along with relevant details, such as the suggested duration and le…”
3
Grounding with real-world data
integration
“we start by grounding the initial itinerary with up-to-date opening hours and travel times”
4
Search retrieves substitutes
integration
“we also use search backends to retrieve additional relevant activities that serve as potential substitutes in case the LLM-suggested plan needs to be modified”
5
Two-stage optimization
validation
“There are two main stages to the algorithm. The first stage operates on the level of a single day within the trip. For each subset of activities (up to a reasonable maximum size), we determine an optimal scheduling of those activities in…”
6
Final itinerary produced
output
“This procedure is repeated until convergence, resulting in the final itinerary.”
Reported outcome

The hybrid system produces itineraries that are practical and feasible, correcting LLM-generated plans through optimization while preserving the user's qualitative intent.

Reported metrics
Itinerary feasibilitypractical and feasible
Plan quality vs pure retrievalbetter serve the user's needs than a traditional retrieval system
Reported stack
Geminisearch backends
Source
https://research.google/blog/optimizing-llm-based-trip-planning/
Read source ↗

Frequently asked questions

What did this team achieve with this AI workflow?

The hybrid system produces itineraries that are practical and feasible, correcting LLM-generated plans through optimization while preserving the user's qualitative intent.

What tools did this team use?

Gemini, search backends.

What results were reported?

Itinerary feasibility: practical and feasible; Plan quality vs pure retrieval: better serve the user's needs than a traditional retrieval system (source-reported, not independently verified).

How is this workflow AI workflow structured?

Trip query received → LLM generates initial plan → Grounding with real-world data → Search retrieves substitutes → Two-stage optimization → Final itinerary produced.