Saved in:
Bibliographic Details
Main Authors: Schneider, Nicole R, Ramachandran, Nandini, O'Sullivan, Kent, Samet, Hanan
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2506.03424
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866915323932835840
author Schneider, Nicole R
Ramachandran, Nandini
O'Sullivan, Kent
Samet, Hanan
author_facet Schneider, Nicole R
Ramachandran, Nandini
O'Sullivan, Kent
Samet, Hanan
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2506_03424
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle DistRAG: Towards Distance-Based Spatial Reasoning in LLMs
Schneider, Nicole R
Ramachandran, Nandini
O'Sullivan, Kent
Samet, Hanan
Computation and Language
Information Retrieval
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.
title DistRAG: Towards Distance-Based Spatial Reasoning in LLMs
topic Computation and Language
Information Retrieval
url https://arxiv.org/abs/2506.03424