构建首个覆盖多种场景的PL/SQL自然语言生成评测基准
ProcArena: A Multi-Scenario Benchmark for LLMs on Direct and Interactive PL/SQL Development from Natural Language

- 设计直接与交互式双模式评测框架,模拟真实开发流程
- 涵盖3998个可执行任务,覆盖9类开发场景,支持PostgreSQL与Oracle
- 引入模拟用户交互机制,评估模型在复杂对话中的表现能力
大型语言模型在将自然语言需求转化为PL/SQL代码方面展现出巨大潜力,但现有研究多集中于从完整自然语言直接生成代码。实际上,PL/SQL开发涉及从零编写、修改、调试、优化等多种场景,常需直接生成或多次交互。然而,当前尚无全面评测多场景、直接与交互式、多方言自然语言到PL/SQL生成的基准。本文提出ProcArena,一个基于执行的评测基准,涵盖直接与交互两种模式。ProcArena包含3998个可在157个数据库上执行的任务,覆盖PostgreSQL和Oracle中的九类开发子场景。通过迭代逻辑增强和场景适配器构建挑战性直接任务,并利用知识融合与需求扰动生成配对的交互任务,同时保留可执行目标。进一步设计受控的求解器-用户模拟协议,使模型可在不暴露隐藏执行反馈的前提下澄清意图并检查数据库环境。对七种语言模型的评估显示,最佳平均得分仅为62.2%(直接模式)和57.8%(交互模式),表明真实自然语言到PL/SQL开发仍具挑战性,尤其在交互场景中。
原文摘要 · Abstract (English)
Large language models (LLMs) have shown strong potential for translating natural-language (NL) requirements into PL/SQL programs, attracting increasing attention from the database community. However, existing NL-to-PL/SQL efforts primarily focus on directly generating PL/SQL from complete NL requirements. In practice, PL/SQL development involves diverse scenarios, such as from-scratch development, code modification, debugging, and optimization, and may require either direct generation or multi-turn interaction. Yet, no comprehensive benchmark evaluates multi-scenario, direct and interactive, and multi-dialect NL-to-PL/SQL development. In this paper, we present ProcArena, an execution-based benchmark covering both Direct and Interactive modes. ProcArena comprises 3,998 executable tasks over 157 databases, spanning nine development subscenarios in PostgreSQL and Oracle. We construct challenging Direct tasks through Iterative Logic Enhancement and scenario-specific adapters, and derive paired Interactive tasks through Knowledge Integration and Requirement Perturbation while preserving executable targets. We further design a controlled Solver-User Simulator protocol that allows models to clarify user intent and inspect the database environment without exposing hidden execution feedback. Evaluating seven language models, we find that the best average scores are only 62.2% and 57.8% in Direct and Interactive, respectively, demonstrating that realistic NL-to-PL/SQL development remains challenging, particularly in interactive settings.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。