PromptSource
收藏PromptSource 数据集概述
数据集简介
PromptSource 是一个用于创建、共享和使用自然语言提示的工具包。它包含一个不断增长的提示集合,称为 P3(Public Pool of Prompts)。截至2022年1月20日,P3 包含约2000个英文提示,覆盖170多个英文数据集。
数据集内容
- 提示数量:约2000个英文提示。
- 覆盖数据集:170多个英文数据集。
- 提示格式:提示使用 Jinja 模板语言编写,保存为独立的结构化文件。
数据集使用
-
API 使用:可以通过简单的 API 使用现有的和新建的提示。
-
示例代码: python from datasets import load_dataset from promptsource.templates import DatasetTemplates
dataset = load_dataset("ag_news", split="train") example = dataset[1] ag_news_prompts = DatasetTemplates(ag_news) prompt = ag_news_prompts["classify_question_first"] result = prompt.apply(example) print("INPUT: ", result[0]) print("TARGET: ", result[1])
数据集创建
- 创建工具:提供基于 Web 的 GUI,支持开发者使用模板语言编写提示,并立即查看不同示例的输出。
- 创建模式:
- Sourcing:创建和编写新提示。
- Prompted dataset viewer:查看编写的提示或现有提示在整个数据集上的效果。
- Helicopter view:聚合 P3 当前状态的高级指标。
数据集开发背景
PromptSource 和 P3 最初是作为 BigScience 项目 的一部分开发的,该项目旨在研究大型模型和数据集。PromptSource 和 P3 是论文 Multitask Prompted Training Enables Zero-Shot Task Generalization 的第一步。
数据集引用
如果使用 P3 或 PromptSource,请引用以下文献: bibtex @misc{bach2022promptsource, title={PromptSource: An Integrated Development Environment and Repository for Natural Language Prompts}, author={Stephen H. Bach and Victor Sanh and Zheng-Xin Yong and Albert Webson and Colin Raffel and Nihal V. Nayak and Abheesht Sharma and Taewoon Kim and M Saiful Bari and Thibault Fevry and Zaid Alyafeai and Manan Dey and Andrea Santilli and Zhiqing Sun and Srulik Ben-David and Canwen Xu and Gunjan Chhablani and Han Wang and Jason Alan Fries and Maged S. Al-shaibani and Shanya Sharma and Urmish Thakker and Khalid Almubarak and Xiangru Tang and Xiangru Tang and Mike Tian-Jian Jiang and Alexander M. Rush}, year={2022}, eprint={2202.01279}, archivePrefix={arXiv}, primaryClass={cs.LG} }




