What is an instruction dataset?
An instruction dataset is a collection of examples, each consisting of a natural language instruction, an optional input and the expected output. It is used in supervised fine-tuning to teach a pre-trained language model to follow instructions.
Reinforcement learning from human feedback instead relies on separate preference data ranking model outputs; alignment often applies demonstrations first and rankings after.
- Topic
- Infrastructure and runtime
- Also known as
- Instruction tuning data, SFT dataset
- Origin
- 2021 and 2022 instruction tuning studies
How an instruction dataset works
- Existing task datasets are rewritten with natural language instruction templates; a 2021 study combined over 60 tasks this way.
- Experts write task definitions; a 2022 benchmark collected 1,616 tasks across 76 task types with expert-written instructions.
- Human labellers write demonstrations of the desired model behaviour for prompts.
- A model can also generate examples: in the self-instruct method it produces instructions, inputs and outputs, then invalid or similar ones are filtered out.
In more detail
Self-generated instructions
The 2023 method is an iterative bootstrapping process that starts from 175 manually written seed tasks. At each step 8 instructions from the pool are shown as examples and the model generates new ones; a new instruction joins the pool only if its ROUGE-L similarity with every existing instruction is below 0.7. After filtering it produced over 52,000 instructions and over 82,000 instances. The result is a form of synthetic data.
Commonly confused terms
| Term | How it differs |
|---|---|
| Instruction tuning | Instruction tuning is the process of fine-tuning a language model on a collection of tasks described via instructions. The instruction dataset is its input; data limited in quantity, diversity and creativity restricts how well the tuned model generalises. |
Why an instruction dataset matters for on-premises AI
Instruction tuning substantially improves zero-shot performance on unseen tasks. A 2023 study noted that human-written instruction data is often limited in quantity, diversity and creativity; it reported a 33% absolute improvement over the base model using about 52,000 model-generated instructions. Another study from the same year showed that a model fine-tuned on only 1,000 carefully curated examples performed strongly.
A bank has staff write example instructions and responses from common agent tasks for its in-house assistant. From this seed set it generates more examples with an in-house model, removes similar and faulty ones, masks personal data and fine-tunes on the remaining set.
Common questions
How large should an instruction dataset be?
There is no fixed number. One study combined over 60 tasks, while in another 1,000 carefully curated examples gave strong results; quality and diversity matter as much as size.
Are model-generated instructions reliable?
Partly. In the 2023 study most generated instructions were meaningful but the instances contained more noise. Even so, the model tuned on this data beat models tuned on existing public instruction datasets by a large margin in human evaluation.
Related terms
- Instruction tuning
- Supervised fine-tuning (SFT)
- AI synthetic data
- Reinforcement learning from human feedback (RLHF)
- Training data curation
Sources
- Finetuned Language Models Are Zero-Shot Learners, arXiv, 2021
- Super-NaturalInstructions: Generalization via Declarative Instructions on 1600+ NLP Tasks, EMNLP, 2022
- Self-Instruct: Aligning Language Models with Self-Generated Instructions, ACL, 2023
- Training language models to follow instructions with human feedback, arXiv, 2022
In the glossary: Glossary, E to L