BYTESIZED32
收藏资源简介:
BYTESIZED32是由亚利桑那大学和微软研究蒙特利尔共同创建的数据集,包含32个以PYTHON代码形式表达的推理任务文本游戏,总计2万行代码。该数据集旨在通过生成文本游戏来测试语言模型在科学和常识推理任务上的能力。每个游戏围绕一个具体的常识任务,如使用洗碗机洗碗或搭建篝火,需要数百行代码来模拟。数据集适用于上下文学习或生成微调模型,并开发了一套自动化指标来评估生成游戏的质量,包括代码技术性、内容完整性、物理世界建模准确性和可赢性。
BYTESIZED32 is a dataset co-created by the University of Arizona and Microsoft Research Montreal. It contains 32 reasoning task-based text games expressed in Python code, with a total of 20,000 lines of code. This dataset is designed to evaluate the performance of language models on scientific and commonsense reasoning tasks through text game generation. Each game centers on a specific commonsense task, such as washing dishes with a dishwasher or building a campfire, and requires hundreds of lines of code for simulation. The dataset is applicable to in-context learning and fine-tuning of language models, and a set of automated metrics has been developed to assess the quality of the generated games, including code technicality, content completeness, physical world modeling accuracy, and winability.
BYTESIZED32
Byte-sized text games for code generation tasks on virtual environments.
数据集描述
BYTESIZED32 数据集包含用于代码生成任务的文本游戏数据。该数据集支持三种消融实验:object、action、distractor。
数据文件
data/action_train.csv、data/distractor_train.csv、data/object_train.csv:描述每个游戏中存在的动作、干扰项和对象。1表示存在,空条目表示不存在。data/action_test.csv:第二列是一个动作,用于寻找具有相同动作的类似提示游戏。data/distractor_test.csv:1表示需要干扰项,0表示不需要。data/object_test.csv:2表示寻找具有该对象的提示游戏,1表示该对象也需要,空条目表示该对象可能不需要。
实验文件生成
通过运行以下命令生成实验文件: bash python scripts/generate_experiment_file.py action python scripts/generate_experiment_file.py distractor python scripts/generate_experiment_file.py object
生成的文件为 experiment_action.csv、experiment_distractor.csv 和 experiment_object.csv。
代码生成
使用生成的实验文件运行代码生成: bash python scripts/run_code_generation.py data/experiment_action.csv --output-folder results/run/ python scripts/run_code_generation.py data/experiment_distractor.csv --output-folder results/run/ python scripts/run_code_generation.py data/experiment_object.csv --output-folder results/run/
生成的游戏、原始LLM提示和响应保存在 results/{datetime}/generated_games/ 文件夹中。
代码反射
使用以下脚本对生成的游戏进行自我反思和改进: bash python scripts/run_code_reflection.py --game-folder results/run/generated_games/ --revision-folder results/run/revised_games/
自动评估
提供自动评估脚本,评估指标包括:
- Technical Validity:生成的游戏是否为有效的Python代码,是否包含预期的类和方法。
- Specification Compliance:生成的游戏是否包含实验文件中指定的动作、对象和干扰项。
- Physical Reality Alignment:生成的游戏是否模拟了物理世界的约束。
- Game Winnability:生成的游戏是否可赢,即是否存在导致胜利状态的动作序列。
评估脚本: bash python scripts/run_code_evaluation.py --game-folder results/run/revised_games/ --results-file results/run/results.json
引用
如果使用该数据集,请引用以下论文:
@article{Wang2023ByteSized32AC, title={ByteSized32: A Corpus and Challenge Task for Generating Task-Specific World Models Expressed as Text Games}, author={Ruoyao Wang and Graham Todd and Xingdi Yuan and Ziang Xiao and Marc-Alexandre C{^o}t{e} and Peter Alexander Jansen}, journal={ArXiv}, year={2023}, volume={abs/2305.14879}, url={https://api.semanticscholar.org/CorpusID:258865971} }




