Zing Forum

Reading

PathGPT: Redefining Personalized Route Recommendation with Large Language Models

PathGPT transforms the route recommendation problem into a natural language task. Using Retrieval-Augmented Generation (RAG) technology, it enables large language models to understand user preferences and generate personalized routes that meet their needs, without requiring retraining for new scenarios.

PathGPT路径推荐大语言模型LLMRAG检索增强生成个性化导航智能交通Qwen地理信息系统
Published 2026-06-13 17:16Recent activity 2026-06-13 17:19Estimated read 7 min
PathGPT: Redefining Personalized Route Recommendation with Large Language Models
1

Section 01

Introduction / Main Floor: PathGPT: Redefining Personalized Route Recommendation with Large Language Models

PathGPT transforms the route recommendation problem into a natural language task. Using Retrieval-Augmented Generation (RAG) technology, it enables large language models to understand user preferences and generate personalized routes that meet their needs, without requiring retraining for new scenarios.

2

Section 02

Original Author and Source

  • Original Author/Maintainer: Kuramenai
  • Source Platform: GitHub
  • Original Title: PathGPT: Leveraging Large Language Models for Personalized Route Generation
  • Original Link: https://github.com/Kuramenai/PathGPT
  • Publication Date: 2026-06-13

3

Section 03

Introduction: Paradigm Shift in Route Recommendation

Today, with the popularity of GPS devices, we have accumulated massive amounts of historical trajectory data. Traditionally, route recommendation problems are usually solved by classic methods like the Dijkstra shortest path algorithm. While these methods are efficient, they lack an understanding of personalized needs. In recent years, machine learning models can generate routes that better align with user preferences by learning patterns in data. However, once trained, these models are limited to the distribution of training data and require retraining for new scenarios, leading to high deployment costs.

PathGPT proposes a new approach: redefining route recommendation as a natural language task, leveraging the natural language understanding capabilities of large language models (LLMs) combined with Retrieval-Augmented Generation (RAG) technology to implement a unified and highly adaptable personalized route recommendation system.


4

Section 04

From Numerical Calculation to Semantic Understanding

Traditional route recommendation systems rely on graph algorithms or neural networks to directly process road network structures, transforming the problem into a numerical optimization task. PathGPT's breakthrough lies in representing routes as natural language descriptions, allowing LLMs to understand the semantic features of routes. For example:

  • "Scenic route" —— The system understands that the user wants a path passing through parks and riversides
  • "Commute route avoiding highways" —— The system recognizes the user's preference for road types
  • "Fastest route" —— The system prioritizes time efficiency

This semantic understanding capability enables the system to handle complex and ambiguous preferences that are difficult to encode with traditional methods.

5

Section 05

Retrieval-Augmented Generation (RAG) Architecture

PathGPT's core architecture draws on the successful experience of RAG systems:

  1. Retrieval Module: Uses lexical search methods like BM25 to retrieve candidate routes similar to the user's current needs from massive historical trajectories
  2. Context Enhancement: Inputs the retrieved routes as context along with the user query into the LLM
  3. Generation Module: The LLM generates new routes that meet the user's needs based on pre-trained knowledge and retrieved examples

This design allows the model to "see" how similar scenarios are handled, thus generating more reasonable recommendations.


6

Section 06

Model Selection and Deployment

PathGPT uses Qwen2.5-14B-Instruct as the base model, with a 4-bit quantized version to reduce memory requirements. Official recommended configurations:

  • Memory Requirement: At least 10GB VRAM
  • Deployment Tool: Ollama (supports local deployment)
  • Recommended Environment: Ubuntu 22.04 LTS + NVIDIA RTX 4090
  • CUDA Version: 12.4
7

Section 07

Data Format and Preprocessing

The project uses real urban road network data (Beijing, Chengdu, Harbin), organized as follows:

  • Trajectory Data: Python pickle format, each trajectory includes (trip_id, trip, time_info), where trip is a list of edge IDs
  • Road Network Data: OSM format, including nodes.shp (node coordinates) and edges.shp (edge connections)
  • POI Data: Point of Interest information, used to understand the semantics of locations
  • Map Graph Structure: graph_with_haversine.pkl in NetworkX format
8

Section 08

Supported Route Types

The system currently supports five route preference types:

  1. most_used —— Most frequently used route
  2. fastest —— Fastest route
  3. shortest —— Shortest route
  4. touristic —— Scenic route (passes through attractions)
  5. highway_free —— Route avoiding highways