Plan with Code: Comparing approaches for robust NL to DSL generation
Not on the map. Why?
Abstract (arXiv)
Planning in code is considered a more reliable approach for many orchestration tasks. This is because code is more tractable than steps generated via Natural Language and make it easy to support more complex sequences by abstracting deterministic logic into functions. It also allows spotting issues with incorrect function names with the help of parsing checks that can be run on code. Progress in Code Generation methodologies, however, remains limited to general-purpose languages like C, C++, and Python. LLMs continue to face challenges with custom function names in Domain Specific Languages or DSLs, leading to higher hallucination rates and syntax errors. This is more common for custom function names, that are typically part of the plan. Moreover, keeping LLMs up-to-date with newer function names is an issue. This poses a challenge for scenarios like task planning over a large number of APIs, since the plan is represented as a DSL having custom API names. In this paper, we focus on workflow automation in RPA (Robotic Process Automation) domain as a special case of task planning. We present optimizations for using Retrieval Augmented Generation (or RAG) with LLMs for DSL generation along with an ablation study comparing these strategies with a fine-tuned model. Our results showed that the fine-tuned model scored the best on code similarity metric. However, with our optimizations, RAG approach is able to match the quality for in-domain API names in the test set. Additionally, it offers significant advantage for out-of-domain or unseen API names, outperforming Fine-Tuned model on similarity metric by 7 pts.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 7 of its 17 references that are in the map. First posted on arXiv 15 Aug 2024.
Builds on
7 of 17 references.
References · 7
- 2022Large Language Models are Zero-Shot Reasonerscited by 4,323
- 2023Toolformer: Language Models Can Teach Themselves to Use Toolscited by 4,072
- 2022Solving Quantitative Reasoning Problems with Language Modelscited by 1,359
- 2023Gorilla: Large Language Model Connected with Massive APIscited by 1,302
- 2023TaskMatrix.AI: Completing Tasks by Connecting Foundation Models with Millions of APIscited by 184
- 2021Jigsaw: Large Language Models meet Program Synthesiscited by 103
- 2023Improving ChatGPT Prompt for Code Generationcited by 28
Built on by
Citing papers per year: 2024: 1.
1 paper.
Similar, not cited
Close in wording, no citation either way
- 2024A Comparative Study of DSL Code Generation: Fine-Tuning vs. Optimized Retrieval Augmentation
- 2023Self-planning Code Generation with Large Language Models
- 2024Planning-Driven Programming: A Large Language Model Programming Workflow
- 2026Text2DSL: LLM-Based Code Generation for Domain-Specific Languages
- 2025Exploring Code Language Models for Automated HLS-based Hardware Generation: Benchmark, Infrastructure and Analysis
- 2025A Survey on Code Generation with LLM-based Agents
- 2023CRAFT: Customizing LLMs by Creating and Retrieving from Specialized Toolsets
- 2024StateFlow: Enhancing LLM Task-Solving through State-Driven Workflows