Advanced guide · 20 min read
AI Itineraries Without Invented Data: Separating Suggestions, Places, and Routes

A useful travel assistant must be creative about what a traveller might enjoy and conservative about what it claims to know. The safest design treats an itinerary as a pipeline: interpret the request, generate candidate ideas, resolve selected places through a place-data provider, calculate routes through a routing service, and ask the user to confirm important choices before presenting a plan.
The boundary that prevents invented travel facts
The central failure mode is hallucination: a model produces a plausible restaurant, opening time, address, travel duration, or attraction name that was never verified. Travel prompts make this especially easy because they combine soft preferences with hard constraints. “Plan a relaxed Saturday around independent bookstores and vegetarian food” invites useful synthesis, but it does not authorize the system to invent businesses or assert that a venue is open.
Separate the output into three data classes:
- Suggestions: generated hypotheses about activities, neighbourhoods, themes, or search directions. They may be helpful without being factual claims.
- Places: records returned by a place provider or entered by the user. They have identifiers, coordinates, names, addresses, and provider metadata.
- Routes: calculations made from resolved coordinates, travel mode, departure assumptions, and a routing provider. They are not opinions generated by the language model.
The model may propose “look for a small independent bookshop near the museum district.” It should not silently turn that sentence into a real business. A place enters the itinerary only after geocoding or place search returns a usable record. A route enters the itinerary only after a routing engine calculates it.
A reproducible prototype architecture
The prototype can be implemented as four explicit stages with typed boundaries:
- Intent interpretation: convert natural language into constraints and preferences.
- Suggestion generation: produce candidate activities or search queries, clearly marked as unverified.
- Place lookup: resolve candidates through a provider and retain the provider’s identifiers and raw evidence.
- Route calculation and confirmation: calculate travel between confirmed places, expose assumptions, and request user approval.
A language model can operate in the first two stages. It should not be the source of truth for the last two stages.
{
"request": {
"text": "A relaxed Saturday in Lisbon, mostly on foot, with bookstores and vegetarian lunch",
"origin": null,
"date": null
},
"intent": {
"city": "Lisbon",
"date": null,
"travel_mode": "walking",
"pace": "relaxed",
"themes": ["independent bookstores", "vegetarian lunch"],
"max_stops": 4,
"unknowns": ["starting point", "time window"]
},
"suggestions": [
{
"label": "Find an independent bookstore in the central area",
"status": "unverified",
"query": "independent bookstore Lisbon central"
}
],
"places": [],
"routes": [],
"confirmation": {
"required": true,
"questions": [
"Where should the walk start?",
"What time window should be used?"
]
}
}
This example is a proposed data shape, not a report of a tested integration. The important property is that each stage has a visible status and that unresolved values remain unresolved.
Stage one: interpret intent without pretending to know the answer
Intent interpretation should extract constraints, preferences, and missing information. It should not fill gaps with plausible defaults unless the product explicitly documents those defaults.
Useful fields include:
- destination or geographic area;
- starting point and endpoint;
- date and time window;
- travel mode;
- pace and maximum number of stops;
- accessibility requirements;
- budget or dietary preferences;
- must-include and must-avoid constraints;
- unknown values that require a question.
Do not infer that “Saturday” means the next Saturday, that “near the hotel” means a known hotel, or that “open” means open at the current time. Store these as unresolved constraints until the user supplies them or a clearly documented product rule resolves them.
A compact intent schema might look like this:
{
"destination": {
"value": "Lisbon",
"source": "user",
"confidence": "explicit"
},
"travel_mode": {
"value": "walking",
"source": "user",
"confidence": "explicit"
},
"time_window": {
"value": null,
"source": null,
"confidence": "missing"
},
"preferences": [
{
"value": "vegetarian lunch",
"source": "user",
"confidence": "explicit"
}
]
}
The source field is more useful than a single model confidence score. It distinguishes user-provided information from an inferred preference and from provider-returned data.
Stage two: generate suggestions as proposals
Suggestions are where generative systems add value. They can propose a sequence such as “bookstore first, lunch nearby, then a quiet public garden.” But every generated entity should carry a status such as unverified until a provider resolves it.
Prefer suggestion objects that describe the search task rather than fabricate names:
{
"suggestion_id": "s-001",
"kind": "place_search",
"label": "Independent bookstore near the central area",
"search_query": {
"text": "independent bookstore",
"area": "central Lisbon"
},
"reason": "Matches the user's bookstore preference and relaxed pace",
"status": "unverified"
}
If the model offers a specific venue name, treat it as a query string, not as a fact. The lookup stage must verify whether the name exists, where it is located, and whether the returned record is a plausible match. A generated name is not evidence.
Keep the recommendation rationale separate from the factual record. “This may fit the requested pace” is a judgement. “The place is at this address” is provider data. Mixing them makes it difficult for a user or reviewer to see what needs checking.
Stage three: resolve places and preserve provenance
A place lookup service may return several candidates. The application should retain the provider response, selected canonical place ID, coordinates, display name, address, categories, and retrieval time. The exact fields depend on the provider; do not assume that every provider supplies opening hours, accessibility attributes, or current availability.
{
"place_id": "provider-specific-id",
"source": {
"provider": "place-provider",
"retrieved_at": "2026-11-18T08:00:00Z"
},
"name": "Provider-returned display name",
"address": "Provider-returned address",
"coordinates": {
"latitude": 0.0,
"longitude": 0.0
},
"categories": ["bookstore"],
"match": {
"query": "independent bookstore",
"selection": "user_confirmed"
},
"status": "resolved"
}
The values above are structural placeholders, not real place data. In a working implementation, coordinates and identifiers must come from the provider response or the user’s own input.
Matching deserves a confirmation step. If several results have similar names, show the user enough information to distinguish them. If the provider returns no suitable match, preserve the suggestion as unresolved and offer a revised search. Never replace a failed lookup with a model-generated address.
Stage four: calculate routes only from resolved points
A route request should accept place IDs or coordinates that have already passed validation. It should also include travel mode and any assumptions that affect the result.
{
"origin": {
"place_id": "confirmed-origin-id",
"coordinates": {
"latitude": 0.0,
"longitude": 0.0
}
},
"destination": {
"place_id": "confirmed-destination-id",
"coordinates": {
"latitude": 0.0,
"longitude": 0.0
}
},
"travel_mode": "walking",
"departure_time": null
}
A route response should be treated as time-sensitive calculation output. It may contain distance, duration, geometry, warnings, and provider metadata. It should not be rewritten into a stronger claim such as “this takes exactly 12 minutes” when the request lacks a departure time or the provider reports an estimate.
If a route service is unavailable, the application can say that routing is unavailable. It may still display the confirmed places and the unresolved order, but it should not estimate travel time from memory or from a language model.
User confirmation is a data boundary
Confirmation is not merely a user-interface courtesy. It is the point where a candidate becomes an accepted itinerary input.
Ask for confirmation when:
- a place match is ambiguous;
- the starting point is missing;
- the route depends on a date or departure time;
- the itinerary includes a meaningful assumption about accessibility, opening hours, or reservations;
- the system is about to commit to a long or expensive journey;
- the user’s request contains conflicting constraints.
A confirmation card can show three separate labels: “Suggested by the assistant,” “Found by place search,” and “Route calculated for walking.” That language teaches the user how much trust to place in each field.
Do not hide uncertainty in a footnote. Put it beside the relevant item. For example: “Opening hours were not verified for this plan” is more actionable than a general disclaimer at the bottom of the page.
Minimal orchestration logic
The orchestration layer should enforce the boundaries in code. The model can return structured suggestions, but only the application can promote them to resolved places or route inputs.
async function buildItinerary(userRequest) {
const intent = await interpretIntent(userRequest);
if (intent.unknowns.length > 0) {
return {
status: "needs_confirmation",
intent,
suggestions: [],
places: [],
routes: []
};
}
const suggestions = await generateSuggestions(intent);
const places = [];
for (const suggestion of suggestions) {
if (suggestion.kind !== "place_search") continue;
const matches = await searchPlaces(suggestion.search_query);
places.push({
suggestion_id: suggestion.suggestion_id,
matches,
status: "awaiting_selection"
});
}
return {
status: "awaiting_place_selection",
intent,
suggestions,
places,
routes: []
};
}
A second request can resolve selected places and calculate routes:
async function calculateConfirmedRoute(origin, destination, mode) {
assert(origin.status === "user_confirmed");
assert(destination.status === "user_confirmed");
assert(origin.coordinates);
assert(destination.coordinates);
return routeProvider.calculate({
origin: origin.coordinates,
destination: destination.coordinates,
mode
});
}
The assertions are conceptual. Adapt them to the language and provider used by the prototype. Their purpose is to make invalid transitions visible: an unverified suggestion cannot become a route endpoint.
Configuration and provider adapters
Keep external services behind narrow adapters. The itinerary domain should not depend on a particular provider’s response format.
PLACE_PROVIDER=example-place-provider
ROUTE_PROVIDER=example-route-provider
ROUTE_DEFAULT_MODE=walking
REQUIRE_USER_CONFIRMATION=true
STORE_PROVIDER_RESPONSES=false
These are example configuration keys. Do not place API keys in source code, HTML, prompts, logs, screenshots, or article examples. Use the secret-management mechanism appropriate to the deployment environment.
A place adapter should expose operations such as search(query, area) and getById(id). A route adapter should expose an operation such as calculate(origin, destination, mode, departureTime). The adapter should normalize provider responses while preserving the provider identifier and retrieval metadata.
Verification: tests that prove the boundary
Verification should test state transitions, not just whether the model produces fluent text. The following cases are suitable for a prototype test suite:
- Unknown start: a request without a starting point returns a confirmation question and does not call the route provider.
- Generated venue: a model-suggested venue remains
unverifieduntil a place lookup returns a match. - Ambiguous match: multiple place results remain selectable and do not automatically become an itinerary stop.
- Failed lookup: no place result is replaced with a generated address or coordinate.
- Unconfirmed route: the route adapter rejects endpoints that are not user-confirmed or otherwise explicitly accepted.
- Missing route: a provider error is displayed as unavailable routing, not as an estimated duration.
- Provenance: each resolved place and route retains its provider and retrieval metadata.
Example command structure:
# Adapt these commands to the project’s package manager.
npm test -- --runInBand
npm run lint
npm run typecheck
These commands are illustrative. No test results are claimed here because this article does not run a project-specific test suite.
Failure cases and safe responses
| Failure | Unsafe response | Safe response |
|---|---|---|
| No place provider result | Invent an address or use a plausible coordinate | Keep the suggestion unresolved and ask for another search or user input |
| Opening hours unavailable | Say the place is open | State that hours were not verified |
| Ambiguous place name | Select the first result silently | Show candidates and request selection |
| Routing service timeout | Estimate travel time from memory | Report that route calculation is unavailable |
| Conflicting preferences | Choose one without explanation | Ask which constraint has priority |
| Stale provider data | Present it as current certainty | Show retrieval time and recommend checking before departure |
What this architecture does not solve
Separation reduces a major class of errors, but it does not make travel information permanently correct. A provider may have stale listings. A route may change because of closures, weather, construction, or accessibility conditions. A place can be correctly identified but unsuitable for a user’s needs if the provider lacks relevant attributes.
The architecture also does not decide whether a recommendation is good. Ranking suggestions still requires product policy, user preferences, and transparent reasoning. “Best” is not a provider field unless the application defines what it means.
Finally, confirmation does not transfer responsibility for hidden assumptions to the user. The application should still show which facts were checked, which were not available, and which choices came from the user.
A practical implementation checklist
- Represent suggestions, places, and routes as different types.
- Attach source and status metadata to every external fact.
- Keep unknown values explicit instead of filling them with plausible defaults.
- Use model output to create search tasks, not to manufacture place records.
- Resolve places before calculating routes.
- Require confirmation for ambiguous or consequential choices.
- Pass only resolved coordinates or provider IDs to the routing adapter.
- Show route assumptions such as travel mode and departure time.
- Test rejected transitions as carefully as successful ones.
- Do not claim current opening hours, availability, prices, or travel times without corresponding evidence.
The resulting system is less magical, but more dependable. The assistant can still provide creative structure and useful next steps. It simply makes a visible distinction between an idea worth checking, a place returned by a data source, and a route calculated from confirmed endpoints.