Reinforcement Learning Enhanced LLM Agents for Complex Vehicle Routing Problems

Yi Chen, Zikang Yu, Jiahai Wang, Jinbiao Chen, Jianpeng Zhou, Zizhen ZhangarXiv 2026

Here is a concise, engaging summary of the paper, tailored for technically literate readers.

TL;DR

RLEA (Reinforcement Learning Enhanced LLM Agents) is a novel multi-agent framework designed to automatically translate natural language descriptions of complex Vehicle Routing Problems (VRPs) into executable, solver-ready code. By orchestrating LLM actions with a lightweight neural Planner trained via Soft Q-learning, RLEA achieves a 16.67% higher success rate than previous state-of-the-art methods while drastically reducing inference latency and runtime errors.

What Problem Does This Paper Address?

Vehicle Routing Problems (VRPs) are foundational, NP-hard combinatorial optimization problems central to logistics, transportation, and communication. While industrial solvers like Gurobi and Google's OR-Tools are incredibly powerful, using them requires significant domain expertise to translate messy, real-world constraints (like time windows, vehicle capacities, and multiple depots) into rigorous mathematical code.

Recent attempts to use Large Language Models (LLMs) for this "automatic modeling" task fall short in two ways:

  1. High Latency: They rely on expensive LLM calls at every single step to decide what action to take next (e.g., whether to debug, retrieve documentation, or rewrite).
  2. Ignored Experience: They rely heavily on external documentation via Retrieval-Augmented Generation (RAG) but fail to learn from their own internal successes and failures across previous modeling attempts.

Methods

RLEA introduces a hybrid approach that combines the reasoning power of LLMs with the efficiency of Reinforcement Learning (RL).

Fig. 1. Architecture of RLEA for automated VRP modeling. The input consists of the problem name and the current modeling code to be generated or revised. An extractor encodes this pair into embeddings, which define the Planner state. Based on the current state, the Planner follows a policy π(a | s) to select the action, such as exploiting similar historical experiences from the memory pool (MLEM). The selected action is then executed to generate or update the modeling code and invoke the solver for the current problem instance. During training, the Planner samples actions according to the learned policy; during inference, the Planner is frozen and selects actions deterministically.

The framework consists of three core components:

  • Lightweight Neural Planner: Instead of asking an LLM to decide the next step, a small, frozen language model (Qwen2.5-1.5B) combined with a trainable Q-value head acts as a traffic cop. Trained using Soft Q-learning, it evaluates the current state (problem description + current code) and instantly selects the best action.
  • LLM-based Executor: A heavy-duty reasoning model (DeepSeek-r1) that executes the chosen action to generate or refine the solver code.
  • Evolvable Memory Module (MLEM): A separate agent (GPT-4o) that acts as a "Collector" and "Distiller." It analyzes past trajectories, extracts the root causes of constraint conflicts, and feeds these historical lessons back to the Executor as in-context demonstrations.

The Planner chooses from three distinct actions:

  1. Refine: Iterative self-correction and debugging based on solver error messages.
  2. RAG: Decomposing the problem into atomic constraints and retrieving specific external solver documentation.
  3. MLEM: Retrieving similar historical success/failure experiences from the internal memory pool.

Datasets

The authors evaluated RLEA across 48 distinct VRP variants featuring diverse combinations of 9 real-world constraints, including vehicle capacity limits, open routes, distance limits, service times, time windows, multiple depots, resource constraints, prize collecting, and pickup-and-delivery setups. The code generation was tested against two major optimization backends: Gurobi and OR-Tools.

Key Insights and Ideas

  • Decoupling Strategy from Execution: The biggest "aha moment" is that LLMs shouldn't waste compute deciding how to solve a problem step-by-step. A lightweight RL policy can learn action-selection patterns across different VRP variants much faster and cheaper than an LLM.
  • Heterogeneous Multi-Agent Synergy: The paper highlights that a single-model setup causes cognitive overload. Using a reasoning-intensive model (DeepSeek-r1) for code generation paired with a general-purpose model (GPT-4o) for memory distillation yields the best results. DeepSeek-r1's intense reasoning actually introduced noise when applied to simple memory distillation.
  • Learning from Failure: Relying solely on external documentation isn't enough. Giving the framework an "evolved memory" to remember why a previous constraint implementation failed prevents it from falling into repetitive coding traps.

Key Results

  • Higher Success Rate: On OR-Tools, RLEA achieved a 62.50% success rate, outperforming the previous state-of-the-art method (DRoC) by 16.67%.
  • Fewer Errors: RLEA reduced the runtime error rate (syntax errors, API misuse) down to 12.50% in online inference mode.
  • Massive Speedup in Decision Making: Thanks to the neural Planner, the average action-selection time plummeted to 3.06 seconds, compared to 153.30 seconds when using an LLM prompt-based planner—a near 50x speedup in orchestration latency.

Limitations and Future Work

While RLEA excels at generating valid, executable solver models, the authors note that the generated code does not always yield the absolute mathematically optimal solution for highly complex edge cases.

For future work, the authors plan to expand RLEA in two directions:

  1. Multi-modal Inputs: Allowing the framework to parse VRP specifications directly from visual diagrams or flowcharts.
  2. Dynamic Routing: Extending the framework to real-time routing scenarios where constraints change dynamically on the fly.

Summary updated

BibTeX
@misc{chen2026reinforcement,
  author = {Yi Chen and Zikang Yu and Jiahai Wang and Jinbiao Chen and Jianpeng Zhou and Zizhen Zhang},
  title = {{Reinforcement Learning Enhanced LLM Agents for Complex Vehicle Routing Problems}},
  year = {2026},
  eprint = {2609.00859},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.00859},
}
Figure