TL;DR
Large Language Model (LLM) agents are great at reasoning in natural language, but they frequently trip at the finish line: turning that reasoning into valid, executable commands for rule-based systems like databases, shells, or renderers. This position paper argues that instead of just scaling up models, we should treat Domain-Specific Languages (DSLs)—and the deterministic harnesses that check and run them—as first-class design variables. Choosing the right language–harness pair acts as a cognitive shortcut, shrinking the space of possible mistakes and turning vague intent into mechanically verifiable actions.
What Problem Does This Paper Address?
Inside an LLM, everything is fluid and semantic-first. Outside, in the real world of databases, operating systems, APIs, and compilers, everything is rigid and schema-first. An agent might understand a user's request perfectly, yet still fail because it emits a slightly malformed SQL query, a hallucinated API flag, or an unparsable patch.
Today, these boundary interfaces are usually chosen ad hoc—wrapped in prompt templates or patched up with post-processing scripts. The authors argue that this treats a core systems problem as an afterthought. When we ignore the boundary language, we defer uncertainty to the most expensive and dangerous moment: right before execution.
Methods
Rather than proposing a single new algorithm, the authors lay out a conceptual framework and a practical selection protocol:
- Functional Definition of a DSL: A DSL isn't just a classic formal notation; it is any stable, task-facing action language paired with a harness (the deterministic parser, validator, executor, or renderer that consumes it). The unit of design is the language–harness pair.
- Dual-Lens Analysis: They map where DSLs matter across seven application domains (from SQL and Bash to Lean and Vega-Lite) and when they matter across the agent lifecycle (pre-training, post-training, inference, evaluation, deployment, and operations).
- A Four-Dimension Selection Protocol: To choose a DSL for a given deployment, they propose evaluating 2–4 candidates on held-out tasks along four axes: prior alignment (does the model already know it?), abstraction match (does it hide low-level tedium?), redundancy burden (how verbose is it?), and verifiability (does the harness give typed, actionable error feedback?).
Datasets
The paper synthesizes findings from existing execution-centered benchmarks—such as SWE-bench (GitHub issue resolution), HumanEvalFix, Spider (Text-to-SQL), WebArena, Mind2Web, nvBench, and SVGEditBench—and introduces a new controlled diagram-generation benchmark (Case 3). This new benchmark spans three task families (flowchart, architecture, and state-transition diagrams) and evaluates outputs by parsing them into a canonical internal representation rather than checking surface-level string matches.
Key Insights and Ideas
- DSLs as Information-Theoretic Shortcuts: A good DSL packages recurring patterns into compact primitives, pruning invalid paths before they are even explored. For example, drawing the same 27 diagrams takes an average of 680 characters in Mermaid versus 7,220 characters in SVG—a more than tenfold difference in representational burden for the exact same meaning.
- First-Pass Fluency $\neq$ Best Interface: In single-shot settings, a model's pre-training familiarity (inductive bias) dominates. Once you add a deterministic repair loop, however, verifiability and recoverability take over. An interface that starts weaker but gives crisp, typed error messages can leapfrog a more fluent one.
- Even "General-Purpose" Agents Secretly Use DSLs: In an extended comparison, a CodeAct-style Python agent only stayed competitive because its harness extracted a strict three-function API subset and rejected everything else—effectively enforcing a DSL-like contract inside Python.
- Tiered Expressiveness for Safety: Production deployments shouldn't have to retrain models to stay safe. A model can train on a rich DSL, while a deployment gateway enforces a minimal, auditable, rollback-capable subset, rejecting anything off-policy with typed feedback that drives repair.
Key Results
The paper anchors its argument with three case studies:
- Code Agents (Action Space): Reorganizing around minimal, structured actions (shell utilities, unified diffs, lexical search) in SWE-agent yields 12.5% pass@1 on SWE-bench and 87.7% on HumanEvalFix.
- Text-to-SQL (Front-Loading Constraints): Integrating PICARD (incremental parsing during decoding) into T5-3B boosts Spider dev execution accuracy from 74.4% to 79.3% while cutting invalid SQL outputs from ~12% to ~2%.
- Controlled Diagram Generation (
gpt-4.1-mini, temp 0.2): - Control run (graph transcription, 216 tasks): Graph-oriented DSLs perform near ceiling (Mermaid 0.977, DOT 1.000, PlantUML 1.000 first-pass success).
- Main run (open-ended prompt-to-diagram, 27 tasks per DSL): Mermaid wins on first-pass success (0.667 S@1) and brevity (680.4 chars), but DOT—despite starting at 0.333 S@1—achieves 1.000 success after one repair round (+0.667 repair lift) and the highest structural fidelity (0.906 StructF1). SVG trails badly (0.222 S@1, 0.741 after repair, 7,219.6 chars).
Limitations and Future Work
The authors note that their selection framework compares existing boundary languages but leaves out the language-engineering costs of building and maintaining them: constructing harnesses, designing helpful error messages, evolving DSLs as models drift, and co-designing interfaces from operational failure logs. They also highlight emerging, under-supported domains—like office-style authoring (where raw OOXML is too verbose), complex spreadsheets, and CAD/BIM—as prime territory for designing better task-facing DSLs and building executable data flywheels.
Summary updated