GPT-WritingPrompts
收藏资源简介:
GPT-WritingPrompts数据集是由多伦多大学和达尔豪斯大学的研究团队创建,旨在比较人类与GPT-3.5在短故事创作中的角色描写差异。该数据集包含206,226条由GPT-3.5生成的短故事,以及相应的Reddit用户创作的故事,均基于相同的写作提示。数据集的创建过程涉及使用GPT-3.5模型生成故事,并确保与人类创作的故事在长度上相当。GPT-WritingPrompts数据集主要用于研究机器与人类在叙事特征上的差异,特别是在情感、描述性和性别偏见等方面的表现,以解决机器生成文本中的偏见问题。
GPT-WritingPrompts Dataset was developed by a research team from the University of Toronto and Dalhousie University, with the goal of comparing the differences in character portrayal between humans and GPT-3.5 in short story creation. This dataset contains 206,226 short stories generated by GPT-3.5, as well as corresponding stories created by Reddit users, all based on identical writing prompts. The dataset construction process involved using the GPT-3.5 model to generate stories, and ensuring that the length of these machine-generated stories is comparable to that of human-written works. The GPT-WritingPrompts dataset is primarily utilized to study the disparities in narrative characteristics between machine-generated and human-written texts, especially their performance in aspects such as emotion, descriptiveness and gender bias, so as to address the problem of bias in machine-generated text.
GPT-WritingPrompts 数据集概述
数据集下载
下载 GPT-WritingPrompts 数据集 并存储在 data/ 子文件夹中。
数据文件
故事和提示
data/human_wp_stories.json:包含从 WritingPrompts 数据集中提取的人类编写的故事。data/gpt_wp_stories.json:包含 GPT-3.5 生成的故事。
视角信息和处理后的故事
data/human_info.csv.gzip和data/gpt_info.csv.gzip:包含视角信息和主角替换后的故事。
故事评分
outputs/文件夹:包含每个维度的故事评分。
词典
lexicon_data文件夹:包含用于推断每个维度词级评分的词典。- VAD:使用 NRC-VAD 词典,保留高评分 (>=0.67) 和低评分 (<=0.33) 的词汇。
- Empath 词典:包含与角色相关的各种刻板印象词汇。
- Power:使用 Empath 词典中的
powerful和weak词汇。 - Appearance 和 Intellect:使用种子词及其反义词。
代码
数据预处理
- 格式化故事数据:使用
data_parsing/save_stories.py将原始训练集格式化为 JSON 文件。 - 生成 GPT-3.5 故事:使用
generate_story/generate_story.py生成 500 字的故事。 - 推断视角:使用 AllenNLP 的 SpanBERT 模型推断故事的视角,代码在
data_parsing/pov_utils.py。 - 替换主角标记:使用
data_parsing/process_stories.py替换主角相关标记。
主要方法
- 提取属性:使用 SpaCy 和 COMeT 提取主角属性,代码在
story_analysis/attr_score_funcs.py。 - 评分属性:使用词典对属性进行评分,代码在
story_analysis/attr_score_funcs.py。
分析
使用 outputs-results-analysis.ipynb 笔记本进行数据分析和可视化。

- 1The GPT-WritingPrompts Dataset: A Comparative Analysis of Character Portrayal in Short Stories多伦多大学计算机科学系, 达尔豪斯大学计算机科学学院, 向量研究所 · 2024年



