Answers are grounded in this paper and cite their sources.
Evaluates spatial reasoning capabilities of large language models in p-median problem, suggesting potential for enhanced optimization.
The p -median problem is a classical, NP-hard model in location science, and decades of research have produced exact, heuristic, and meta-heuristic algorithms to solve it. In parallel, large language models (LLMs) have begun to assist in optimization by interpreting problem descriptions and generating solver code; however, their intrinsic ability to reason about spatial structure in facility-location problems remains underexplored. We introduce an LLM-as-proposer framework for the discrete p-median problem that embeds an LLM within a classical local search with external evaluation. The LLM's contribution as a spatially informed proposer is evaluated within a controlled search structure and compared fairly with established heuristics. We benchmark the proposed framework with three frontier LLMs on six TSPLIB point sets commonly used in location analysis across multiple p facilities, comparing against (i) exact mixed-integer problem references and (ii) five classical heuristics and meta-heuristics baselines. Across all settings, LLM-guided search consistently outperforms greedy baselines, frequently attains near-optimal solutions on small-to-medium instances, and evaluates orders of magnitude fewer objectives than tabu search, although inference remains the dominant runtime cost. Prompt ablation further shows that some spatial summaries materially improve robustness on larger instances, whereas some local diagnostic cues can be counterproductive. Taken together, these results show that contemporary LLMs exhibit meaningful spatial reasoning as proposers in p-Median local search, while also clarifying the current gap to mature meta-heuristics in solution quality and computational efficiency, motivating continued exploration of hybrid designs as LLMs become more capable.
No takes yet. Share an insight, caveat, or question.
Feng et al. (2026) studied this question.
Synapse has enriched 10 related papers. Consider them for comparative context: