Context-Aware Distillation and Ablation for Text2DSL
The article presents advancements in the Text2DSL framework for generating domain-specific language (DSL) code from natural language by implementing context-aware distillation using the DeepSeek-V4-Flash model. This approach enhances the generation process through a structured context defined by BNF grammar, API specifications, and a closed identifier vocabulary, resulting in a significant increase in the PolkitBench corpus from 4,204 to 10,073 valid natural-language-to-Polkit-rule pairs with 100% AST validity and a 99.7% runtime pass rate. The findings underscore the importance of structured context in improving model performance, particularly emphasizing the critical role of vocabulary in enhancing semantic quality and the structural validity of the generated code.