NEOCODER
收藏资源简介:
NEOCODER数据集由约翰斯·霍普金斯大学创建,专注于编程问题的创新解决方案。该数据集包含199个最新的Codeforces编程问题,每个问题附有30个通过单元测试的人类解决方案。数据集通过DENIAL PROMPTING方法构建,逐步增加问题解决的约束条件,促使模型产生更具创造性的解决方案。NEOCODER主要用于评估和提升语言模型在复杂编程任务中的创造性解决能力。
The NEOCODER dataset was developed by Johns Hopkins University, with a focus on innovative solutions to programming problems. It comprises 199 recent Codeforces programming problems, each paired with 30 human-authored solutions that pass all unit tests. The dataset is constructed using the DENIAL PROMPTING approach, which gradually amplifies the constraints of problem-solving to enable models to generate more creative solutions. NEOCODER is primarily utilized to evaluate and improve the creative problem-solving abilities of large language models for complex programming tasks.
数据集概述
数据集内容
- NeoCoder 数据集: 包含 199 个问题,每个问题最多有 5 个时间相关的约束。
- 历史人类解决方案: 每个问题有 30 个人类解决方案及其技术检测结果(由 GPT-4 生成)。
- 人工标注的测试用例: 手动标注的测试用例,用于修复从爬取过程中遇到的某些解析问题。
文件结构描述
steps/: 可调用的脚本,对应于拒绝提示和创造性评估的每个步骤。src/: 模型、评估器、数据整理等的源代码。scripts/: 用于扩展实验的 bash 脚本。
数据集准备步骤
- 爬取 CodeForce 问题:
python steps/crawl_codeforce_problem.py --raw-data-dir datasets/CodeForce/raw/CodeForce800spreadsheet.xlsx --save-dir --num-sample --difficulty - 爬取人类解决方案:
python steps/crawl_codeforce_solution.py --crawled-problem-path --save-dir --max-solution-num - 准备测试用例:
python steps/parse_test_case.py --data-path --output-dir - 手动修正测试用例: 提供标注结果在
datasets/CodeForce/NeoCoder/test_cases_annotated.json
数据集生成步骤
- 生成 NeoCoder 数据集:
python steps/generate_dp.py --problem-set-dir --model-name --num-sample --dp-rounds --output-dir - 推理:
python steps/inference_dp.py --dataset-path --model-name {HF_MODEL_NAME, OPENAI_MODEL_NAME} --dp-rounds --batch-size --output-dir - NeoGauge@T 计算:
python steps/creativity_evaluation.py --task correctness --inference-result-path --test-case-path --save-folder --model-family
引用
@misc{lu2024benchmarkinglanguagemodelcreativity, title={Benchmarking Language Model Creativity: A Case Study on Code Generation}, author={Yining Lu and Dixuan Wang and Tianjian Li and Dongwei Jiang and Daniel Khashabi}, year={2024}, eprint={2407.09007}, archivePrefix={arXiv}, primaryClass={cs.CL}, url={https://arxiv.org/abs/2407.09007}, }

- 1Benchmarking Language Model Creativity: A Case Study on Code Generation约翰斯·霍普金斯大学 · 2024年



