Personalized public transit routing in public transit systems remains challenging due to the difficulty of capturing and integrating diverse user preferences into routing algorithms. This paper presents ChatPlanner, a novel framework that leverages Large Language Models (LLMs) to enable preference aware public transit routing. Our approach employs fine-tuned LLMs with Retrieval-Augmented Generation (RAG) to extract routing parameters and interpret nuanced user preferences from natural language queries, subsequently integrating these preferences into the objective function of a public transit routing algorithm. This study designs preference aware datasets incorporating eight personas and five contexts to establish scoring standards for both fine-tuning and RAG. This work conducted three experiments to validate the solutions' feasibility, extraction of routing information and preferences, and solution set quality and completeness. Results demonstrate that ChatPlanner generates feasible solutions reliably. Fine-tuning enforces the required output structure and learns general preference patterns, while RAG provides query-specific context to resolve imprecise or conversational expressions and calibrate continuous scores. The combination of both achieves the highest accuracy in routing information extraction and user preference interpretation. Results based on selected case studies show that by capturing user preferences, ChatPlanner identifies valuable solutions across different dimensions that existing route planners overlook, generating more valuable route alternatives. This research establishes a new paradigm for integrating natural language understanding into transportation optimization.
翻译:公交系统中的个性化出行规划因难以捕捉并整合多样化的用户偏好到路径规划算法中而面临挑战。本文提出ChatPlanner——一个利用大语言模型实现偏好感知公交出行规划的新型框架。该方法采用经微调的大语言模型与检索增强生成技术,从自然语言查询中提取路径规划参数并解析细微的用户偏好,进而将这些偏好整合到公交路径规划算法的目标函数中。本研究设计了包含八种用户画像和五种情境的偏好感知数据集,为微调和检索增强生成建立评分标准。通过三项实验验证了解决方案的可行性、路径信息与偏好的提取能力以及解集质量与完整性。结果表明,ChatPlanner能可靠生成可行方案:微调技术强化了所需输出结构并学习通用偏好模式,而检索增强生成则提供查询特定上下文以纠正模糊或口语化表达并校准连续评分。二者结合在路径信息提取与用户偏好解析中获得了最高准确率。基于选定案例的研究显示,通过捕捉用户偏好,ChatPlanner能识别出现有路径规划器忽略的不同维度的有价值解,从而生成更优的替代路线。本研究为将自然语言理解融入交通优化建立了新范式。