LLM agents improve testing of self-driving car planners with scenario toolkit

PlannerForge: LLM Agents for Scenario-Based Testing of Motion Planners in Autonomous Driving

Artificial IntelligenceComputation and LanguageRobotics

Summary

Testing self-driving cars to make sure they drive safely is complicated and usually done by many separate tools that don’t work closely together. The authors created PlannerForge, a system that uses large language models (LLMs) to handle all parts of testing these cars, from making test scenarios to checking the results. They tested PlannerForge with different language models and found it works well at generating realistic driving situations, choosing the right tests, and fixing planning problems. Their system improves on previous methods by making testing more connected and accurate, helping find and reduce potential accidents without needing extra specialized training. This could help make autonomous cars safer by providing better ways to check how they plan their moves.

Autonomous Driving SystemsScenario-based testingLarge Language ModelsMotion planningScenario generationPlanner testingModule routingBenchmarkingPrompt engineering

Authors

Yuan Gao, Sebastian Müller, Mattia Piccinini, Marc Kaufeld, Yuchen Zhang, Finn Rasmus Schäfer, Qunying Song, Johannes Betz

Abstract

Ensuring the safety of autonomous driving is a critical challenge. Scenario-based testing is a systematic process used to validate Autonomous Driving Systems (ADSs), but it remains a fragmented modular pipeline in which scenario generation, retrieval, modification, ADS execution, and results analysis are performed by separate tools with little interaction. Large Language Model (LLM) agents have shown promise across ADS sub-systems such as perception, planning, and control. However, no prior work covers the whole scenario-based testing pipeline for ADSs with a unified LLM-agent framework. We present PlannerForge, an LLM-agent framework that extends all scenario-based testing stages (from Scenario Generation to ADS Assessment) and adds two further LLM-enhanced stages: ADS Enhancement and ADS Benchmarking. We evaluate PlannerForge with 10 off-the-shelf LLMs across all tasks (Generation, Selection, Modification, Module Routing, Planner Testing, and Enhancement) under 5 prompt conditions. Best-per-task scores range from 0.88 to 1.00, and open-source 20-35B backends match commercial APIs on most tasks. Open-source models such as Qwen3.6:35B match commercial APIs on three of the five tasks. Chaining the modules end-to-end retains 83% / 78% of seed queries (commercial / open). It outperforms Scenario Factory 2.0 (Finkeldei et al., 2025) on natural-language generation (193 vs. 144 executable of 200) and realises 92-96% of requested city, road and vehicle attributes. It outperforms BM25 (Robertson and Zaragoza, 2009) at rank 1 selection (92.0% vs. 67.5%) and From-Words-to-Collisions (Gao et al., 2025) on physically valid edits (>=94% vs. 31%). At N=400, cost-tuning lifts planner success from 50.4% to 70.2% and cuts collisions from 19.0% to 8.4%, without domain-specific fine-tuning.