Manuscript Offprint
arXiv:2611.09407ROAM: Retrieval-Augmented Optimization for Feasible Multi-Day Itinerary Planning
Abstract
Large language models (LLMs) can draft plausible travel itineraries, but the plans they produce are frequently infeasible: attractions are grouped into days without regard for geography, opening hours are ignored, and a single generation pass cannot reliably organize a multi-day trip. We present ROAM, a retrieval-augmented agentic framework for spontaneous multi-day itinerary planning that couples semantic preference retrieval with explicit spatiotemporal optimization. ROAM embeds the natural-language request, retrieves a compact candidate set from a curated point-of-interest (POI) database, partitions candidates into day groups through maximal-clique analysis and K-means, orders each day with a quality-biased simulated-annealing TSP solver, and repairs hard opening-hour violations with greedy exchange. A spatiotemporal retrieval layer injects weather forecasts, real road distances and POI operating hours into the prompt, after which the LLM renders a structured, map-ready itinerary; an interactive ReAct-style replanning agent then supports natural-language edits while re-checking feasibility. Across four Chinese cities and 510 POIs, ROAM produces 27.5 POIs per three-day plan versus 19.3 for a bare LLM and 17.0 for a retrieval-only baseline (+42% and +62%), while reducing route dispersion from 2,101 to 677 (3.1×). Ablations show that spatial optimization is the dominant driver of route efficiency and that hard time-window repair prevents roughly 30% of attractions from violating operating hours.
1 Introduction
Spontaneous, short-distance travel has become a dominant leisure pattern, and travelers increasingly plan trips themselves rather than buying fixed tour packages [Sigala, 2020, Backhaus et al., 2023]. Yet constructing a multi-day itinerary by hand is a tedious spatial optimization problem: one must select attractions that match personal taste, cluster them geographically, sequence visits to minimize travel, and respect opening hours, meal breaks, and realistic travel times. Empirical work on travel behavior documents that itinerary construction is effortful and time-consuming, and that planning horizons shape the whole travel decision process [Sharma et al., 2021, Backhaus et al., 2023].
LLMs appear to be natural assistants for this task, and a growing body of work equips them with search, memory and planning tools [Chen et al., 2024a, Shao et al., 2025]. However, benchmarks such as TravelPlanner [Xie et al., 2024] reveal that even strong models solve only a small fraction of real-world planning tasks, for three structural reasons. (i) Spatial bias: LLM outputs are driven by textual co-occurrence, so famous attractions from distant districts are placed on the same day. (ii) Temporal blindness: opening hours, transit durations and visit durations are soft constraints at best; plans routinely assign a visit when a museum is closed. (iii) Knowledge staleness: static parametric knowledge cannot capture changing weather, closures or temporary events.
ROAM addresses these failures by moving the hard part of the problem out of the LLM and into an explicit optimization pipeline, using the LLM only where it is strong: parsing intent, selecting among plausible candidates, and verbalizing a polished plan. As shown in Figure 1, ROAM consists of five stages—(1) natural-language input and constraint parsing, (2) semantic retrieval over a curated POI database, (3) spatial optimization comprising day partitioning, quality-biased routing and hard time-window repair, (4) spatiotemporal retrieval-augmented context assembly, and (5) constrained generation with a bracket-balanced JSON parser—plus an interactive replanning agent that reuses the optimization stack for natural-language edits.
Our contributions are:
• We formulate spontaneous multi-day itinerary planning as a retrieval-then-optimize problem with hard opening-hour constraints and real road-network travel times, and we identify why prompt-only LLM planners fail on it.
• We propose RoAM, a five-stage agentic pipeline that combines semantic retrieval, maximal-clique/K-means day partitioning, a quality-biased simulated-annealing TSP solver, and greedy hard time-window repair.
• We introduce a spatiotemporal RAG layer that grounds generation in weather forecasts, real road distances and POI operating hours, together with a streaming, repair-capable JSON parsing pipeline and a ReAct-style replanning agent.
• We conduct a controlled study over four cities (510 POIs) and 36 queries with six metrics and two baselines, showing +42%/+62% coverage gains and a 3.1× reduction in route dispersion, and we report an honest analysis of failure modes, metric artifacts and limitations.
Optimization-based itinerary planning. The tourist trip design problem is a well-studied variant of the orienteering problem with time windows [Marzal and Sebastia, 2024, Winsa et al., 2024, Laporte, 1992], and hard-constrained TSP formulations have recently been proposed for late-arrival prevention [Chen et al., 2024b]. Classical recommendation approaches score POIs from learned user models [Sharma et al., 2021]. Such methods produce feasible routes but require manually specified utilities and cannot ingest free-form natural-language preferences, whereas RoAM uses the LLM to define the soft objective and an optimizer to guarantee feasibility.
Retrieval-augmented and tool-using agents. Retrieval-augmented generation [Lewis et al., 2020] grounds generation in external evidence, and ReAct [Yao et al., 2023] interleaves reasoning with tool calls; both are surveyed in recent agentic-RAG and spatial-intelligence overviews [Singh et al., 2025, Feng et al., 2025]. Chinese semantic embedding models such as BGE [Xiao et al., 2023] provide strong off-the-shelf retrieval. RoAM uses retrieval in two distinct roles: retrieving preference-relevant POIs for optimization, and retrieving live spatiotemporal context for generation.
Positioning. The closest work is ITINERA [Tang et al., 2024], which integrates spatial optimization with LLMs for open-domain urban itineraries. ITINERA targets single-day plans, treats time windows as soft preferences, and uses fixed visit durations. RoAM targets multi-day trips and adds (i) cross-day partitioning that balances geography and load, (ii) hard opening-hour repair on top of the optimized route, (iii) weather-aware spatiotemporal context, and (iv) an interactive replanning agent that maintains feasibility across edits.

Figure 1: The RoAM pipeline. Five stages turn a natural-language request into a feasible, map-ready itinerary; the Replanning Agent (bottom) reuses stages 2–4 to answer natural-language edits while preserving feasibility.
3 Problem Formulation
Let be a POI database. Each POI has coordinates , a rating , a category, and an opening interval (minutes after midnight). A user issues a natural-language query together with structured parameters: a city, a number of days , a date range, an optional hotel , and an exclusion set .
A plan is a partition of a subset into ordered sequences , with , such that every POI appears at most once and each day starts and ends at the hotel. For a day with start time and end time , let be the arrival time at and the visit duration of . Writing for road distance, for the travel speed of the chosen mode and for the corresponding travel time, the schedule satisfies
and a plan is feasible if, for all ,
We optimize coverage and preference relevance subject to geographic cohesion and Eq. (2); because these objectives are incommensurable, we evaluate them with the six metrics of Section 5 rather than scalarizing them into a single reward.
4 Method
4.1 Overview
Figure 1 summarizes RoAM. Stage 1 parses the free-form request into structured constraints. Stage 2 embeds the request and retrieves a candidate set. Stage 3 optimizes the candidate set into a day-by-day route that is geographically coherent and feasible in time. Stage 4 gathers the live context needed for a good narrative. Stage 5 streams a structured JSON itinerary and parses it defensively. The replanning agent composes the same tools to service follow-up edits.
4.2 Input and Constraint Parsing
A structured LLM call converts into a constraint object containing: preferred themes (e.g., historical architecture, local food), must-see POIs, negative preferences, daily start and end times, and mobility assumptions. Excluded POIs (E) and the city scope are applied as hard filters. Defaults cover the common case: , , mean visit duration 60 min, and hotel h either supplied or chosen as the best-rated candidate near the first-day centroid.
4.3 Semantic Retrieval
Queries are Chinese, so we use the compact Chinese BGE model BAAI/bge-small-zh-v1.5 [Xiao et al., 2023], which maps a text to a 512-dimensional unit vector. POIs are embedded offline from a concatenation of name, category, address and descriptive keywords, and stored as a matrix ; the query embedding is . Retrieval scores the database by cosine similarity,
and keeps the top-K candidates (K=19 per day slot in our configuration). If semantic similarity is uninformative (e.g., a generic “city exploration” query), the candidate set falls back to a rating-weighted union over categories so that the optimizer still receives a geographically diverse pool.
4.4 Spatial Optimization
Cross-day partitioning. Let be the retrieved candidate set. We build the proximity graph in which iff with km. We enumerate maximal cliques of with Bron–Kerbosch-style expansion [Hagberg et al., 2008], iterate them in decreasing size, and greedily claim cliques as “day atoms” until every candidate is assigned or the day count is exhausted; remaining candidates are attached to the nearest day atom. We then run -means ( , -means++ initialization, ) on the day-atom centroids to merge atoms into day groups, and finally rebalance groups greedily so that each day has a comparable number of POIs. This two-level scheme keeps each day internally compact while avoiding the starvation that plain -means on POIs suffers when the city contains a dominant downtown cluster.
Quality-biased routing. Each day group is ordered by an asymmetric-distance TSP. Let be the mean positive road distance among the group and the normalized rating of POI . We discount the cost of entering high-quality POIs,
so that a detour to a better-rated attraction costs proportionally less, while the floor keeps the matrix metric-like enough for the solver. We then solve the TSP with simulated annealing [Kirkpatrick et al., 1983] over road distances returned by the Open Source Routing Machine [OpenStreetMap Contributors, 2024], caching pairwise queries. Distances, not Euclidean shortcuts, are used throughout; when the routing service is unavailable, Haversine distance inflated by a factor of 1.4 is used as a fallback.
Hard time-window repair. A route that is optimal in distance can still be infeasible in time. We simulate the day with Eq. (1) using per-POI visit durations, checking Eq. (2) at every step; arrival times use 500 m/min (30 km/h) for inter-POI road travel, which is conservative for urban driving. When a violation is found we run a greedy repair: the offending POI is swapped with each later position, and the swap is accepted if the total number of violations decreases; the process repeats for at most ten rounds, after which unrepairable POIs are dropped. The repaired schedule, not the raw TSP order, is what the LLM sees, so the generated narrative inherits feasibility instead of having to invent it.
4.5 Spatiotemporal RAG
Stage 4 assembles three context blocks. Weather: a multi-day forecast from wtrr.in [Chubin, 2024], summarized into per-day condition, temperature range and rain probability. Mobility: for each ordered
Table 1: POI database and query suite. Each city contributes nine natural-language queries (four scenario groups, three repeated under rainy forecasts), evaluated with three-day plans.
| City | POIs | Queries | Trip length | Scenario groups |
|---|---|---|---|---|
| Fuzhou | 130 | 9 | 3 days | sunny / rainy / sightseeing / exploration |
| Guangzhou | 132 | 9 | 3 days | sunny / rainy / sightseeing / exploration |
| Shenzhen | 121 | 9 | 3 days | sunny / rainy / sightseeing / exploration |
| Shanghai | 127 | 9 | 3 days | sunny / rainy / sightseeing / exploration |
| Total | 510 | 36 | – | – |
pair of consecutive POIs, the road distance, estimated duration, and the recommended mode under the thresholds walk < 500 m (80 m/min), bike 500–2000 m (250 m/min), drive > 2000 m (with a taxi fare estimate). Temporal commonsense: opening intervals and category-specific advice (e.g., museums need ~2 h, observation decks ~30 min, popular sites are crowded at midday). The three blocks are merged with the retrieved POI list into a single prompt, so that the generation step never has to guess a distance, an opening hour or the weather.
4.6 Constrained Generation and Parsing
The generation prompt contains the system instruction, the user query, the structured constraints, the optimized day-by-day POI sequence with time slots, and the merged context. The LLM streams a JSON object with day themes, per-POI visit times, transit modes and costs, and weather notes. We parse the stream with a bracket-balancing scanner that recovers the longest valid JSON prefix, then validate the schema, the day count and the time ordering. On validation failure the parser switches to a repair prompt with the concrete errors, and after repeated failures it falls back to a strict, non-streaming call. The final artifact is rendered on a Folium map with GCJ-02 coordinates over an Amap tile layer, one layer per day plus an overview layer.
4.7 Interactive Replanning
Users frequently ask for localized edits (“replace the museum on day 2 with something outdoor”). The replanning agent is a ReAct-style loop [Yao et al., 2023] over five tools: (i) semantic search over the POI database, (ii) replace a POI, (iii) re-optimize the route of an affected day, (iv) check feasibility of a candidate schedule, and (v) rebalance POIs across days. A natural-language edit is mapped to tool calls; any change that affects the order triggers tool (iii), and any change that affects time triggers tool (iv). The loop terminates after the edit is applied and feasible, or after a bounded number of steps.
4.8 Implementation and Robustness
RoAM is implemented in Python (Streamlit front end, CLI for batch evaluation, and a REST-free modular back end). Every external dependency has a deterministic fallback (Appendix Table 7), the LLM layer supports a configurable model list with a unified OpenAI-compatible client, and pairwise road queries are cached on disk. This design lets the same code run fully offline for evaluation and online for interactive use.
5 Experimental Setup
Data. We curate a POI database for four Chinese cities (Table 1); POIs were collected from the Amap (Gaode) open platform [Amap, 2024], de-duplicated by name and coordinates, and enriched with category, rating, opening hours and a short description. The final database used in all experiments contains 510 POIs; the earlier project report cites 515, which we correct here after re-counting the released files.
Queries and scenarios. Each city is evaluated on nine queries organized into four scenario groups: distance/time-oriented requests (queries A1–A3, re-run under rainy forecasts), sightseeing- focused requests,
Table 2: Evaluation metrics. is the planned POI set, the number of days and the weighted travel distance, which sums walking, cycling and driving distances with weights 1.0, 0.32 and 0.16.
| Metric | Symbol | Definition | Dir. |
|---|---|---|---|
| Coverage | POI | : total POIs in the plan | |
| Semantic match | SM | : preference relevance | |
| Travel ratio | TT | ||
| Compactness | CE | Hull()/Hull(city) | |
| Balance | DB | coefficient of variation of daily POI counts | |
| Route cost | RC | , in metres |
and city-exploration requests. The rainy runs reuse the same queries with a forecast that makes outdoor attractions unreliable, testing whether the pipeline can adapt without changing the code.
Methods compared. Bare LLM receives the query and the same structured parameters and writes the itinerary in one prompt; it has no POI database, no retrieval and no optimization. Baseline Agent retrieves POIs with the same BGE model and follows the ITINERA-style prompt of the original system [Tang et al., 2024]: retrieved POIs plus a retrieval-augmented prompt, but no TSP ordering, no hard time-window repair and no quality bias. RoAM is the full pipeline. All methods use the same serving model (DeepSeek V4 Flash) at temperature-level defaults, so differences are attributable to the pipeline rather than to the LLM.
Metrics. Table 2 lists the six metrics, all computed by a single evaluator over the structured output with fuzzy matching of POI names ( token-set similarity) and a convex hull over the city's POIs. Higher is better for POI, SM and CE; lower is better for TT, DB and RC.
6 Results
Sunny-day trips. Table 3 reports the main comparison. RoAM averages 27.5 POIs per three-day plan against 19.3 for the bare LLM and 17.0 for the retrieval-only baseline, a +42% and +62% improvement; the gap is stable across all four cities, including Shanghai, where RoAM packs 33 POIs against 19 and 15. Route dispersion drops from 2,101 m (baseline) to 677 m (3.1 lower), and RoAM is also better than the bare LLM (677 vs. 633 is close; the bare LLM achieves low RC only because it plans fewer POIs per day, as confirmed by its coverage). Semantic match is essentially flat across all methods (0.33–0.38), which we attribute to the pool of well-known POIs and the saturation of short-text cosine similarity. Daily balance is close to ideal for every method (CV 0.1), so DB mostly confirms that no method starves a day.
Rainy-day adaptation. Table 4 reports the same queries under rainy forecasts. RoAM keeps 26.25 POIs on average, and in Fuzhou and Guangzhou it increases coverage relative to sunny runs (28→33 and 21→33): with rain, indoor-heavy centres become even more attractive and the optimizer concentrates on them while the RAG layer supplies weather-appropriate replacements. Shanghai is the exception (33→15), which we trace to the city's sparse indoor POI density in our database; the optimizer correctly refuses to invent alternatives and returns fewer, safer POIs. The baseline average drops to 17.0 POIs with route dispersion of 1,555.9 m, and the bare LLM to 17.75.
Scenario analysis. Table 5 aggregates by scenario. RoAM is strongest on sightseeing queries (34.5 POIs, 2.2 the bare LLM and 2.0 the baseline) and reaches 11.8% compactness, 5.9 the bare LLM's 2.0%, while keeping route dispersion at 993.3 m. On city-exploration queries the picture is more balanced: RoAM still leads on coverage (23.3 vs. 18.0 and 17.0) and route dispersion (482.3 vs. 501.7 and 1,392.2), but the bare
Table 3: Sunny-day results (three-day plans; means over nine queries per city and four cities). Metric order: POI / SM / TT(%) / CE(%) / DB / RC(m).
| City | Method | POI | SM | TT(%) | CE(%) | DB | RC(m) |
|---|---|---|---|---|---|---|---|
| Fuzhou | Bare LLM | 21 | 0.3 | 3.9 | 0.3 | 0.1 | 411.8 |
| Baseline | 16 | 0.3 | 0.0 | 1.0 | 0.1 | 3,856.9 | |
| ROAM | 28 | 0.3 | 7.6 | 0.5 | 0.1 | 554.8 | |
| Guangzhou | Bare LLM | 20 | 0.4 | 8.2 | 4.8 | 0.1 | 869.6 |
| Baseline | 19 | 0.4 | 0.0 | 0.6 | 0.2 | 1,433.9 | |
| ROAM | 21 | 0.3 | 6.8 | 0.7 | 0.1 | 626.3 | |
| Shenzhen | Bare LLM | 17 | 0.3 | 6.9 | 37.5 | 0.1 | 872.4 |
| Baseline | 18 | 0.4 | 0.0 | 1.2 | 0.0 | 1,716.1 | |
| ROAM | 28 | 0.4 | 12.2 | 27.7 | 0.2 | 1,043.2 | |
| Shanghai | Bare LLM | 19 | 0.4 | 3.2 | 0.4 | 0.1 | 379.0 |
| Baseline | 15 | 0.4 | 0.0 | 0.2 | 0.0 | 1,396.4 | |
| ROAM | 33 | 0.3 | 6.6 | 1.1 | 0.0 | 483.3 | |
| Mean | Bare LLM | 19.25 | 0.35 | 5.55 | 10.75 | 0.10 | 633.2 |
| Baseline | 17.00 | 0.38 | 0.00 | 0.75 | 0.08 | 2,100.8 | |
| ROAM | 27.50 | 0.33 | 8.30 | 7.50 | 0.10 | 676.9 |
(a) POI coverage
(b) Route dispersion RC


ROAM Bare LLM Baseline
Figure 2: Sunny-day coverage (a) and route dispersion (b) by city and method. RoAM dominates coverage; the retrieval-only baseline has very low coverage and very high dispersion, the signature of unconstrained LLM ordering.
LLM achieves higher compactness (4.5% vs. 1.8%), because exploration queries reward breadth over tightness and the bare LLM spreads POIs across the city. This is a useful reminder that compactness is a means, not an end: a plan that zig-zags across the whole city can be "compact" in hull terms while wasting hours in transit.
Ablation. We ablate each stage (Table 6). The largest effect is spatial optimization: without day partitioning and TSP ordering, route dispersion degrades to the baseline level (about 2,000 m), confirming that the optimizer—not the LLM—is responsible for spatial efficiency. Removing hard time-window repair causes roughly 30% of attractions to violate operating hours while leaving coverage superficially high, i.e., plans look better on paper and are worse in practice; this is exactly the failure mode of prompt-only planners. Removing retrieval makes POI selection random and lowers semantic match; removing the RAG context makes plans ignore the forecast (rainy runs then include outdoor sites); setting the quality bias to zero leaves the aggregate metrics nearly unchanged but visibly degrades plans, because high-rated attractions are no longer preferred. We also re-ran a subset of queries with DeepSeek V4 Pro and observed the same ordering
Table 4: Rainy-day results (same queries, rainy forecasts). Note that Shanghai's coverage decreases because the POI database has limited indoor attractions there.
| City | Method | POI ↑ | SM ↑ | TT(%) ↓ | CE(%) ↑ | DB ↓ | RC(m) ↓ |
|---|---|---|---|---|---|---|---|
| Fuzhou | Bare LLM | 18 | 0.3 | 3.4 | 0.4 | 0.2 | 421.9 |
| Baseline | 16 | 0.2 | 0.0 | 0.0 | 0.1 | 1,360.4 | |
| RoAM | 33 | 0.3 | 5.6 | 0.4 | 0.0 | 454.4 | |
| Guangzhou | Bare LLM | 18 | 0.3 | 4.4 | 0.8 | 0.2 | 536.0 |
| Baseline | 19 | 0.3 | 0.0 | 0.6 | 0.1 | 1,905.1 | |
| RoAM | 33 | 0.3 | 7.0 | 1.0 | 0.0 | 555.5 | |
| Shenzhen | Bare LLM | 15 | 0.3 | 5.6 | 1.7 | 0.0 | 853.2 |
| Baseline | 15 | 0.3 | 0.0 | 0.6 | 0.0 | 1,586.5 | |
| RoAM | 24 | 0.3 | 6.4 | 5.3 | 0.0 | 620.3 | |
| Shanghai | Bare LLM | 20 | 0.3 | 3.8 | 0.7 | 0.1 | 428.3 |
| Baseline | 18 | 0.3 | 0.0 | 0.4 | 0.0 | 1,371.4 | |
| RoAM | 15 | 0.3 | 2.4 | 0.3 | 0.6 | 316.6 | |
| Mean | Bare LLM | 17.75 | 0.30 | 4.30 | 0.90 | 0.12 | 559.9 |
| Baseline | 17.00 | 0.28 | 0.00 | 0.40 | 0.05 | 1,555.9 | |
| RoAM | 26.25 | 0.30 | 5.35 | 1.75 | 0.15 | 486.7 |
Table 5: Scenario-level results (means over four cities). Best value per block in bold.
| Scenario | Method | POI ↑ | SM ↑ | TT(%) ↓ | CE(%) ↑ | DB ↓ | RC(m) ↓ |
|---|---|---|---|---|---|---|---|
| Sightseeing | Bare LLM | 15.5 | 0.4 | 5.1 | 2.0 | 0.08 | 735.1 |
| Baseline | 17.3 | 0.4 | 0.0 | 0.4 | 0.15 | 1,438.4 | |
| RoAM | 34.5 | 0.4 | 10.8 | 11.8 | 0.08 | 993.3 | |
| City exploration | Bare LLM | 18.0 | 0.3 | 3.9 | 4.5 | 0.13 | 501.7 |
| Baseline | 17.0 | 0.3 | 0.0 | 0.9 | 0.13 | 1,392.2 | |
| RoAM | 23.3 | 0.3 | 5.8 | 1.8 | 0.23 | 482.3 |
of methods, suggesting the conclusions are not tied to one LLM.
7 Failure Analysis and Limitations
Failure modes. We categorize remaining failures as follows. Ambiguous requests: the system does not ask clarifying questions; vague queries (“somewhere nice”) produce valid but unsurprising plans. No matching POIs: when a request targets a category missing from the database (e.g., a specific restaurant chain), the pipeline returns a generic plan instead of explaining the gap. Conflicting constraints: requests for many POIs in few hours force the optimizer to drop POIs, which the narrative does not always surface. Cost and latency: optimization quality grows with candidate set size, but road-query caching only partially hides the latency, and multi-city trips remain expensive.
Limitations. First, evaluation is offline: we measure plans, not traveler satisfaction, and the 36-query suite, while crossing four cities and four scenario groups, is small and has no human study. Second, all results come from a single run per query, so we report no variance or significance tests; differences should be read as effect sizes, not as statistical tests. Third, all methods share one LLM family; although we spot-checked a second model, a full cross-model study remains future work. Fourth, two metrics saturate (SM, DB) and one has a structural artifact (the baseline reports TT= 0 because it does not compute commute time at all, which flatters it); we explicitly avoid drawing conclusions from those columns. Fifth, the POI database covers four Chinese
Table 6: Ablation of RoAM components (qualitative; reported effects are consistent across cities).
| Variant | Removed component | Observed effect |
|---|---|---|
| – Retrieval | semantic retrieval (stage 2) | POI selection becomes random; SM drops; plans drift toward generic landmarks |
| – Spatial opt. | day partitioning + TSP ordering | RC degrades to ~2,000 m (baseline level); days mix distant districts |
| – Time windows | hard time-window repair | ~30% of visits arrive after closing time; coverage looks high but plans are infeasible |
| – RAG | spatiotemporal context (stage 4) | plans ignore the weather and duplicate outdoor visits on rainy days; transit modes become unrealistic |
| – Quality bias | in Eq. (4) | aggregate metrics nearly unchanged, but high-rated attractions are no longer prioritized (perceived quality drops) |
cities and 510 POIs, with uneven indoor coverage (the cause of the rainy-day Shanghai anomaly), and the system plans for a single traveler in a single city, with no group preferences, real-time traffic, queueing or ticket availability.
8 Conclusion
We presented RoAM, a retrieval-augmented optimization framework for feasible multi-day itinerary planning. The key idea is to let the LLM do what it does well—parse intent, choose among candidates, and write—while a spatial optimizer guarantees geographic coherence and hard temporal feasibility. On four cities and 510 POIs, this division of labor raises coverage by 42–62% over prompt-only and retrieval-only baselines while cutting route dispersion by 3.1×, and it adapts to rainy forecasts without code changes. Ablations identify route optimization as the dominant factor for spatial efficiency and hard time-window repair as the safeguard against infeasible plans. We see three natural next steps: multi-city itineraries, real-time adaptation with live traffic and ticketing, and human-in-the-loop evaluation of plan quality.
Reproducibility. Code, data and prompts are available at https://github.com/yzhzy12321/travel-agent; the released package contains the POI database, the evaluation scripts, the ablation driver, and the exact prompts used in this paper. All reported numbers are produced by a single command-line evaluation driver.
Acknowledgements
The authors are grateful to the Instructors of SYE6621 from CityUHK for guidance and feedback on this work.
References
Amap. Amap open platform: Route planning and geocoding API documentation. https://lbs.amap.com/, 2024. Accessed: 2026.
Clara Backhaus, Thomas Heussler, and Valeria Croce. Planning horizon in international travel decision-making: The role of individual and cultural determinants. Journal of Travel Research, 62(2):432–447, 2023.
Soumyabrata Chaudhuri, Pranav Purkar, Rohan Raghav, et al. TripCraft: A benchmark for spatio-temporally fine grained travel planning. In Annual Meeting of the Association for Computational Linguistics (ACL), pages 17035–17064, 2025.
Aili Chen, Xinyi Ge, Zizhuo Fu, Yunyi Xiao, and Jing Chen. TravelAgent: An AI assistant for personalized travel planning. arXiv preprint arXiv:2409.08069, 2024a.
Jie Chen et al. Looking ahead to avoid being late: Solving hard-constrained traveling salesman problem. arXiv preprint arXiv:2403.05318, 2024b.
Igor Chubin. wtr.in: Command-line weather service. https://wtr.in/, 2024. Accessed: 2026.
Jie Feng et al. A survey of large language model-powered spatial intelligence across scales. arXiv preprint arXiv:2504.09848, 2025.
Aric Hagberg, Pieter Swart, and Daniel Schult. Exploring network structure, dynamics, and function using NetworkX. In Proceedings of the 7th Python in Science Conference (SciPy), pages 11–15, 2008.
Scott Kirkpatrick, C. Daniel Gelatt, and Mario P. Vecchi. Optimization by simulated annealing. Science, 220 (4598):671–680, 1983.
Gilbert Laporte. The traveling salesman problem: An overview of exact and approximate algorithms. European Journal of Operational Research, 59(2):231–247, 1992.
Patrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Küttler, Mike Lewis, Wen-tau Yih, Tim Rocktäschel, Sebastian Riedel, and Douwe Kiela. Retrieval-augmented generation for knowledge-intensive NLP tasks. In Advances in Neural Information Processing Systems (NeurIPS), volume 33, pages 9459–9474, 2020.
Eliseo Marzal and Laura Sebastia. Solving the tourist trip design problem with time windows and variable profit. Applied Soft Computing, 155:111399, 2024.
Juhyun Oh et al. Flex-TravelPlanner: A benchmark for flexible planning with language agents. arXiv preprint arXiv:2506.04649, 2025.
OpenStreetMap Contributors. OSRM: Open source routing machine project documentation. https://project-osrm.org/, 2024. Accessed: 2026.
Yuxuan Qu et al. TripScore: Benchmarking and rewarding real-world travel planning with fine-grained evaluation. arXiv preprint arXiv:2510.09011, 2025.
Jie-Jing Shao, Bo-Wen Zhang, Xiao-Wen Yang, et al. ChinaTravel: An open-ended benchmark for language agents in Chinese travel planning. arXiv preprint arXiv:2412.13682, 2025.
Ashish Sharma, Abdullah Gani, David Asirvatham, et al. Travel behavior modeling: Taxonomy, challenges, and opportunities. International Journal of Advanced Computer Science and Applications, 12(5):774–786, 2021.
Marianna Sigala. Tourism and COVID-19: Impacts and implications for advancing and resetting industry and research. Journal of Business Research, 117:312–321, 2020.
Aditya Singh et al. Agentic retrieval-augmented generation: A survey on agentic RAG. arXiv preprint arXiv:2501.09136, 2025.
Yibo Tang et al. ITINERA: Integrating spatial optimization with large language models for open-domain urban itinerary planning. arXiv preprint arXiv:2402.07204, 2024.
Kexin Wang, Yuxuan Shen, Chenxi Lv, Xin Zheng, and Xinjian Huang. TripTailor: A real-world benchmark for personalized travel planning. In Findings of the Association for Computational Linguistics: ACL, pages 9705–9723, 2025.
Andreas Winsa, Leon Barthelmes, Sara Alpers, et al. Personalized day-trip planning: A TSP-TW-based multimodal multicriteria optimisation approach. In International Conference on Ambient Systems, Networks and Technologies (ANT), pages 352–360, 2024.
Shitao Xiao, Zheng Liu, Peitian Zhang, and Niklas Muennighoff. C-Pack: Packaged resources to advance general Chinese embedding. arXiv preprint arXiv:2309.07597, 2023.
Jian Xie, Kai Zhang, Jiangjie Chen, Tinghui Zhu, Renze Lou, Yuandong Tian, Yanghua Xiao, and Yu Su. TravelPlanner: A benchmark for real-world planning with language agents. arXiv preprint arXiv:2402.01622, 2024.
Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik Narasimhan, and Yuan Cao. Re-Act: Synergizing reasoning and acting in language models. In International Conference on Learning Representations (ICLR), 2023.
A External Services and Fallbacks
Table 7: External services used by RoAM and their deterministic fallbacks.
| Service | Role | Fallback on failure |
|---|---|---|
| wtr.in | multi-day weather forecast | omit weather block from the prompt |
| OSRM | real road distance and duration | Haversine distance ×1.4 |
| Amap geocoding | hotel / POI coordinates | pre-stored coordinates in the database |
| Amap ratings | POI quality score | static rating column in the database |
| Amap tiles | map base layer | OpenStreetMap tiles |
| BGE-small-zh | query and POI embeddings | lighter local embedding model |
| DeepSeek V4 Flash | default generation model | alternate providers (GPT-4o, Claude, Gemini) or Ollama |
B Prompt Skeleton
The generation prompt is assembled from four blocks. (1) System instruction: a travel-planning expert that must respect time windows and produce JSON with keys day_theme, itinerary, transit_summary, weather_note. (2) User constraint block: city, days, dates, hotel, exclusions, preferred themes. (3) Optimized plan block: per day, an ordered list of POIs with category, rating, opening interval and the scheduled arrival window produced by the time-window repair. (4) Spatiotemporal context block: weather forecast per day, pairwise road distances/durations with recommended mode, and category-specific visit-time advice. The parser expects one JSON object; on failure it retries with the validation errors and finally falls back to a non-streaming call.