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

  1. Existing task datasets are rewritten with natural language instruction templates; a 2021 study combined over 60 tasks this way.
  2. Experts write task definitions; a 2022 benchmark collected 1,616 tasks across 76 task types with expert-written instructions.
  3. Human labellers write demonstrations of the desired model behaviour for prompts.
  4. 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

TermHow it differs
Instruction tuningInstruction 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.

ON-PREMISES EXAMPLE

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.

Sources

In the glossary: Glossary, E to L

What does this term mean for your infrastructure?

We can work out together in a technical assessment how it maps onto your data, hardware and security requirements.

Request a technical assessment →

This site sets no cookies. Visitor numbers are counted in aggregate using a cookieless method that does not identify anyone. See the Privacy Policy for details.