Skip to main content
Back

FZI Lets LLMs Decide What Autonomous Vehicles Actually Record

Researchers built a formal grammar that lets language models translate plain-English data requests into on-device sensor triggers for vehicles and robots.

Pro

Paper, Full Access
  • FZI researchers propose a DSL for LLM-generated triggers that selectively capture multimodal sensor data on-device.
  • An EBNF grammar defines predicates and triggers; LLMs emit JSON that maps directly to executable configurations.
  • DSL generation consistency hit 0.966 SequenceMatcher similarity versus 0.392 for unconstrained code generation.
  • Runtime was lowest among tested approaches, beating both plain code and a gemma3-based VLM classifier.
  • Detection F1 slightly trailed the VLM (0.67), with recall of 0.66 versus 0.75, reflecting perception-stack limits.
  • Evaluated on 35 labeled BDD100k images using gpt-oss-120b with YOLO and CLIP primitives; no public code released.

Autonomous vehicles and robots generate absurd volumes of multimodal sensor data. Recording all of it is prohibitively expensive, but recording the wrong parts leaves downstream teams sifting through mountains of useless frames looking for the rare pedestrian-in-the-rain scene they actually needed. A new paper from researchers at Germany's FZI Research Center proposes a domain-specific language that lets large language models turn natural-language data requests into verifiable, on-device triggers that decide what to keep.

Instead of engineers hand-coding capture logic for every new data need, a validation engineer types something like I want data with a red traffic light, and the system compiles that request into a structured trigger program that runs directly on the vehicle's edge hardware, watching sensor streams and firing only when the condition is met.

Why passive logging breaks down

The authors frame current data collection as fundamentally indiscriminate. Transmission and storage costs scale linearly with volume, post hoc filtering introduces latency into decision-making, and downstream teams end up curating large quantities of irrelevant samples before any learning can begin. Existing selective-capture approaches share three recurring flaws, according to the paper: they lean on brittle expert-crafted low-level code, they compose triggers whose parallel interactions are undefined, and they treat relevance as a generic anomaly signal when in practice relevance depends on the user and the task.

The positioning table is telling. Prior work like ViperGPT, CERN, and DoraemonGPT each hit two or three of the four criteria the authors care about, yet none combine modularity, multimodality, declarative specification, and real-time online selection in a single framework.

A grammar for triggers

The DSL is defined formally in Extended Backus-Naur Form. The grammar builds up from a few clean primitives:

  • Scene: a finite set of elements, each with semantic and spatial properties
  • Vehicle State: internal signals as (type, value, unit) tuples
  • Situation: the union of the current scene and vehicle state
  • Predicate: a Boolean function over a situation, like speed > 30 or detect person
  • Trigger: predicates combined with AND, OR, and NOT

An LLM (the paper uses gpt-oss-120b) doesn't emit the DSL text directly. It produces an intermediate JSON representation that maps one-to-one onto the grammar. A trigger declaration with a sampling frequency becomes a JSON object with a spec block; PREDICATE(detect, class="person") becomes {"type": "detect", "target": {"class": "person"}}; negation adds a "not": true field. A basic retrieval-augmented setup feeds the model system-specific context like signal descriptions and sensor mappings.

Three example triggers showing how queries like snowy conditions, red car, and person detection get converted into predicates that evaluate against a data cache.

On the vehicle itself, three ROS components handle execution. The Data Manager preprocesses sensor streams and maintains a cache representing the current situation. Each generated trigger spawns its own Trigger Engine instance that evaluates its predicates when new relevant data arrives and its update frequency ticks. A Trigger Manager supervises all engines, orchestrating schedules and enforcing resource constraints. When any trigger fires, an OR gate persists the current cache.

How it holds up against plain code

The team evaluated the framework on 35 manually labeled images from BDD100k across three query types: single (find persons), conditional (persons plus snowy weather), and reasoning (car-following scenarios). They compared three approaches using the same backbone model: DSL-based generation, unconstrained Python code generation, and direct classification by a VLM based on gemma3:27b. All three share the same perception primitives, calling YOLO through run_yolo(args) and CLIP through run_clip(args).

The consistency numbers are where the DSL really pulls ahead. Generating the same query twice under default temperature settings, the DSL produced near-identical triggers while plain code varied wildly:

MetricDSLPlain Code
SequenceMatcher similarity0.9660.392
Levenshtein similarity0.9550.510
Cosine similarity0.9180.802

Detection F1 tells a more nuanced story. The VLM led at 0.67, with the DSL slightly behind. The DSL had lower recall (0.66) than the VLM (0.75) or plain code (0.76), meaning it misses more relevant frames. On runtime, though, the DSL was fastest end-to-end because its backbone integration avoids the redundant checks that plain-code generations tend to introduce, and it sidesteps the constant inference cost that makes the VLM the slowest option per query.

Where it actually fits

The practical case for this approach is edge deployment with many concurrent triggers. Every new VLM-based trigger requires a separate inference pass, which scales badly on a car's compute budget. DSL triggers are compiled artifacts you can add, remove, or modify independently without redesigning the pipeline, which matters when fleet data needs evolve constantly.

The limitations are honest. Trigger correctness is bounded by the underlying perception stack: YOLO's detection quality, CLIP's attribute filtering, and the LLM's reasoning during translation. The framework enforces syntactic correctness and structured execution, yet it cannot fix a wrong YOLO class prediction or a bad CLIP embedding. Manually written trigger logic still wins for highly specific scenarios that need creative problem-solving, at the cost of modularity. The authors flag future work on hybrid approaches that combine DSL constraints with more flexible reasoning.

The paper does not link to a public repository, and no code or trained artifacts are released alongside the manuscript. For teams building similar pipelines, the EBNF grammar and JSON schema in the paper are complete enough to reimplement directly, and the choice to build on open models like gpt-oss-120b and gemma3 means the full stack can be reproduced without vendor dependencies.