RustEvo2
收藏资源简介:
RustEvo2数据集是由中山大学等多个机构的研究人员构建的,旨在评估大型语言模型(LLM)在Rust编程语言API快速演变环境下的代码生成能力。该数据集包含了588个API变化,涵盖了Rust标准库和第三方包的变更。这些变化被分类为稳定化、签名变更、行为变更和弃用等类别,以反映Rust生态系统中API变化的实际分布。RustEvo2通过自动化合成编程任务来模拟真实世界中的挑战,评估LLM适应Rust API演变的能力。
The RustEvo2 dataset was constructed by researchers from Sun Yat-sen University and multiple other institutions, aiming to evaluate the code generation capabilities of large language models (LLMs) in the context of rapid evolution of Rust programming language APIs. This dataset contains 588 API changes, covering modifications to both Rust's standard library and third-party crates. These changes are categorized into stabilization, signature change, behavioral change, deprecation and other categories to reflect the actual distribution of API changes in the Rust ecosystem. RustEvo2 simulates real-world challenges by automatically synthesizing programming tasks to assess the ability of LLMs to adapt to the evolution of Rust APIs.
RustEvo² 数据集概述
数据集背景
- 数据集来源于论文《RustEvo²: An Evolving Benchmark for API Evolution in LLM-based Rust Code Generation》
- 主要研究LLM-based Rust代码生成中的API演化问题
数据集构成
数据收集阶段
- 数据来源:官方Rust仓库和第三方crates
- 分析内容:变更日志、文档和实现变更
- API变更分类:
- Stabilizations(稳定化)
- Signature Changes(签名变更)
- Behavioral Changes(行为变更)
- Deprecations(弃用)
数据集构建阶段
- 通过LLM-based生成流程将API演化数据转化为自然编程任务
- 包含编程查询、代码解决方案和测试程序
数据集详情
- 总API变更数量:588个
- Rust标准库:380个
- 第三方crates:208个(来自15个crates)
- 版本覆盖范围:1.71.0至1.84.0
- 变更类型分布:
- Stabilizations:31.3%
- Signature Changes:31.5%
- Behavioral Changes:33.2%
- Deprecations:4.1%
任务结构
每个任务包含:
- API变更信息(名称、模块路径、版本详情、文档、源代码)
- 编程查询(描述实际场景)
- 函数签名(指导实现)
- 参考解决方案
- 测试程序
评估结果
模型性能
| 模型 | Pass@1 (%) | API使用准确率 (%) | 覆盖率 (%) |
|---|---|---|---|
| Claude-3.7-Sonnet | 65.3 | 78.2 | 83.6 |
| o1-mini | 57.5 | 70.4 | 85.2 |
| GPT-4o | 55.4 | 68.4 | 77.2 |
| Gemini-1.5-Pro | 55.3 | 62.6 | 60.9 |
| DeepSeek-v3 | 54.8 | 69.7 | 71.0 |
| Gemini-2.0-Flash | 52.6 | 73.5 | 72.5 |
| Llama-3.1-70B | 51.0 | 65.3 | 69.0 |
| Qwen-2.5-72B | 50.9 | 66.7 | 64.7 |
| Claude-3.5-Sonnet | 48.1 | 68.7 | 80.3 |
| Grok-3 | 40.5 | 67.2 | 70.4 |
按变更类型性能
| 变更类型 | 平均Pass@1 (%) |
|---|---|
| Stabilizations | 65.8 |
| Signature Changes | 58.2 |
| Behavioral Changes | 38.0 |
| Deprecations | 40.4 |




