SEAICLAug 15, 2024

Plan with Code: Comparing approaches for robust NL to DSL generation

arXiv:2408.08335v13 citationsh-index: 4
Originality Incremental advance
AI Analysis

This addresses the problem of reliable task planning over large API sets for RPA developers, though it appears incremental as it builds on existing RAG and fine-tuning methods.

The paper tackles the challenge of generating Domain Specific Language (DSL) code from natural language for workflow automation in RPA, where LLMs struggle with custom function names and syntax errors. It shows that a fine-tuned model performs best overall, but an optimized RAG approach matches it for in-domain API names and outperforms it by 7 points on similarity metrics for unseen API names.

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.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes