arXiv:2506.03424cs.CLcs.IR2025-06被引 10

让大模型学会基于距离的空间推理,解决地图问答难题。

DistRAG: Towards Distance-Based Spatial Reasoning in LLMs

  • 构建城市间地理距离图谱,动态检索相关空间信息
  • 在未训练过的地点上实现90%以上的距离推理准确率
  • 适合需要地理常识的推荐与规划类应用

许多实际应用场景中,大语言模型(LLMs)需具备空间推理能力,如兴趣点(POI)推荐和行程规划。然而,单纯依赖训练数据的LLM在距离判断上表现不佳。为此,我们提出DistRAG方法,通过图结构编码城市间测地距离,并根据问题检索相关上下文子图。该方法使模型能够回答原本无法处理的距离推理问题。面对海量可能被询问的地点,DistRAG为补充语言模型的语义知识、构建初步的‘世界模型’提供了灵活起点。

原文摘要 · Abstract (English)

Many real world tasks where Large Language Models (LLMs) can be used require spatial reasoning, like Point of Interest (POI) recommendation and itinerary planning. However, on their own LLMs lack reliable spatial reasoning capabilities, especially about distances. To address this problem, we develop a novel approach, DistRAG, that enables an LLM to retrieve relevant spatial information not explicitly learned during training. Our method encodes the geodesic distances between cities and towns in a graph and retrieves a context subgraph relevant to the question. Using this technique, our method enables an LLM to answer distance-based reasoning questions that it otherwise cannot answer. Given the vast array of possible places an LLM could be asked about, DistRAG offers a flexible first step towards providing a rudimentary `world model' to complement the linguistic knowledge held in LLMs.

空间推理大模型地理知识

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。