用自动生成的测试集精准评估AI写代码时的理解与推理能力
PACIFIC: a framework for generating benchmarks to check Precise Automatically Checked Instruction Following In Code
- 通过可控难度生成带明确预期输出的代码指令测试集
- 发现先进模型在逐步推理和指令遵循上仍有显著差距
- 适合评估编程类大模型的核心能力,避免数据污染
基于大语言模型(LLM)的代码助手在代码生成与理解方面展现出强大能力,其关键要求是准确遵循用户指令。我们提出一种名为PACIFIC的框架,可自动生成严格评估序列指令遵循与代码干运行能力的基准测试,同时控制难度。该框架生成的测试变体具有明确预期输出,可通过简单输出对比实现可靠评估。与依赖工具或代理行为的现有方法不同,PACIFIC聚焦于评估模型在不执行代码的前提下逐步推理代码行为的内在能力。此外,该框架通过轻松生成新测试变体,有效缓解训练数据污染问题。我们通过生成涵盖多种难度级别的基准测试套件,评估多个前沿LLM,结果表明PACIFIC能生成日益复杂的测试,有效区分不同模型在指令遵循与干运行方面的表现,即使在先进模型间亦如此。整体而言,该框架为评估LLM在代码任务中的核心能力提供了可扩展、抗污染的方法。
原文摘要 · Abstract (English)
Large Language Model (LLM)-based code assistants have emerged as a powerful application of generative AI, demonstrating impressive capabilities in code generation and comprehension. A key requirement for these systems is their ability to accurately follow user instructions. We present Precise Automatically Checked Instruction Following In Code (PACIFIC), a novel framework designed to automatically generate benchmarks that rigorously assess sequential instruction-following and code dry-running capabilities in LLMs, while allowing control over benchmark difficulty. PACIFIC produces benchmark variants with clearly defined expected outputs, enabling straightforward and reliable evaluation through simple output comparisons. In contrast to existing approaches that often rely on tool usage or agentic behavior, our work isolates and evaluates the LLM's intrinsic ability to reason through code behavior step-by-step without execution (dry running) and to follow instructions. Furthermore, our framework mitigates training data contamination by facilitating effortless generation of novel benchmark variations. We validate our framework by generating a suite of benchmarks spanning a range of difficulty levels and evaluating multiple state-of-the-art LLMs. Our results demonstrate that PACIFIC can produce increasingly challenging benchmarks that effectively differentiate instruction-following and dry running capabilities, even among advanced models. Overall, our framework offers a scalable, contamination-resilient methodology for assessing core competencies of LLMs in code-related tasks.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。