---
title: "VRPCoder Beats Gemini-2.5-Pro at Logistics Code With Just 8B Parameters"
subtitle: "VRPCoder, an 8B model trained with constraint-aware reinforcement learning, beats Gemini and Claude on vehicle routing code generation by catching bugs that objective-only testing misses"
url: "https://alphasignal.ai/news/vrpcoder-beats-gemini-2-5-pro-at-logistics-code-with-just-8b-parameters"
author: "AlphaSignal Newsroom"
author_url: "https://alphasignal.ai/editorial-team"
company: "AlphaSignal"
company_url: "https://alphasignal.ai/company/alphasignal"
published: "2026-06-03T00:00:00.000Z"
updated: "2026-06-11T02:49:24.034Z"
type: "Paper"
topics:
  - "Llms"
  - "Post Training"
subtopics:
  - "Structured Output"
  - "Rl"
  - "Fine Tuning"
upvotes: 924
source_url: "https://arxiv.org/abs/2606.04816"
comments: 0
truncated: true
---

# VRPCoder Beats Gemini-2.5-Pro at Logistics Code With Just 8B Parameters

> VRPCoder, an 8B model trained with constraint-aware reinforcement learning, beats Gemini and Claude on vehicle routing code generation by catching bugs that objective-only testing misses

When you ask an LLM to write solver code for a logistics optimization problem, how do you know it actually got the constraints right? The objective value might look correct on your test cases, but the model could have silently dropped a critical rule -- say, the one preventing trucks from exceeding their load capacity -- and you'd never know until a real delivery route fails. A new paper from researchers at Xizi Luo, Changhong He, and colleagues tackles this blind spot head-on, and the results are striking: their 8-billion-parameter model, [VRPCoder](https://arxiv.org/abs/2606.04816), outperforms Gemini-2.5-Pro Preview on three out of four benchmarks and beats Claude Sonnet 4.5 by 28 percentage points on average.

## The Invisible Bug Problem

The field of Operations Research (OR) -- the discipline of turning real-world logistics and planning problems into mathematical optimization models -- has been an exciting target for LLM automation. A specialized and highly impactful application of LLMs has emerged in OR, specifically using them for automated optimization modeling: translating natural language descriptions of real-world problems into precise mathematical formulations or directly into executable solver code.

The standard way to check whether that generated code is correct is **differential testing**: run the model's code and a reference solution on the same inputs, and see if the objective values match. This works well for simple problems. But for constraint-dense combinatorial problems like Vehicle Routing Problems (VRPs) -- where dozens of operational rules interact -- it breaks down badly.

Here's why: many constraints are **non-binding** on typical test instances. A constraint that says "no vehicle can visit more than 10 customers" might never be violated on a small 5-customer test case, even if the generated code forgot to include it entirely. The objective scores match, the test passes, and the bug ships. Systematic failure modes include constraint misunderstanding and a feasibility-optimality decoupling where models achieve high feasibility but zero optimality.

_Preview only. Full text requires an AlphaSignal Pro account._

## Sources

- [Beyond Objective Equivalence: Constraint Injection for LLM-Based Optimization Modeling on Vehicle Routing Problems](https://arxiv.org/abs/2606.04816)
- [ConstraintBench: Benchmarking LLM Constraint Reasoning on Direct Optimization](https://arxiv.org/html/2602.22465)
- [What is GRPO? | AI21](https://www.ai21.com/glossary/foundational-llm/what-is-grpo/)
- [OR-LLM-Agent: Automating Modeling and Solving of Operations Research Optimization Problems](https://arxiv.org/pdf/2503.10009)
- [An Agentic Framework with LLMs for Solving Complex Vehicle Routing Problems](https://arxiv.org/html/2510.16701v1)
