Resources/Model training/Datasets

Concept

What a dataset is

A named, frozen collection of training examples — copied from chats, written by a model or imported — plus any documents to learn from: why it is a snapshot rather than a link, and what that means for corrections, imports and reproducibility.

Chapter 44 min read3 references

What it is

A dataset is a named collection of training examples. In Scalata most examples are chats: the conversation, plus the choice of which assistant replies are targets. A dataset can also hold documents to learn facts from. Everything downstream refers to it: you prepare a dataset, train on the prepared files, and evaluate the model that came out.

Snapshot, not link

When a chat is added to a dataset, its messages are copied in. From then on the dataset and the chat are independent: continuing the chat, editing it or deleting it changes nothing in the dataset.

Adding a chat
chat in Sessions→messages copied→dataset examplefrozen from now on
Later, in the chat
chat continued, edited or deleted✕dataset unchanged
Correcting a reply in the dataset
original replykept+corrected replywhat gets trained→a ready-made preference pair
A dataset copies messages in. What happens to the original chat afterwards does not reach it, while a correction made inside the dataset keeps the original next to it.

This is deliberate. A training run can take hours, an evaluation is read days later, and a model may stay in use for months. If the dataset could change underneath them, you could no longer say what a model was trained on; two runs from “the same” dataset might have seen different data; and deleting a chat could silently remove examples you were relying on.

Corrections inside the dataset

You can correct a reply inside a dataset. The corrected text is what gets trained, and the original is kept beside it. Keeping both is useful beyond record-keeping: the original and the correction form a ready-made preference pair, with the correction preferred. A correction is one of the strongest signals you can give a model, because it is a person saying exactly what was wrong.

One correction, two uses
  1. Original reply: “Go to settings.”
  2. Your correction: “Open Settings → Notifications and switch off ‘Weekly digest’.”
  3. Supervised fine-tuning learns the correction.
  4. Preference tuning can use the pair: correction preferred, original not.

Imported conversations

Conversations exported from other chat apps can be imported too. Importing the same export again adds nothing twice. Duplicates matter more than they seem: a conversation that appears twice counts twice in training, and its copies could land on both sides of the validation split, which would flatter the evaluation.

Other sources of examples

  • Synthetic chats. The Dataset Builder has a capable model plan varied scenarios from a brief and write example conversations. You review them before adding them, and they are marked Synthetic so they can be told apart from real chats.
  • Public datasets. Rows from a Hugging Face dataset can be imported as chats once Scalata has worked out which columns hold the question and the answer. Large imports run in the background.
  • Chat feedback. Thumbs up and down given in chat become examples: a liked answer becomes a reply to learn from, and a liked and a disliked answer to the same question become a preference pair.
  • Documents. Uploaded files, files already in Scalata, public web pages, the plain-text rows of a Hugging Face dataset, or files from a connected data source. Their text is read once; a model can then write question-and-answer examples from it, or open models can train on the text directly (continued pre-training).

Each source has its own trap. Synthetic chats are cleaner than real ones, so mix them with real data where you can, and keep real chats for testing. Imported rows are only as good as their source. Documents teach what's true, not how to answer, so they usually come before, or alongside, chat training.

New versions rather than endless changes

For a substantial change — a new product area, a new batch of chats, a different style — it is usually clearer to create a new dataset than to keep reshaping an old one. Name versions so the difference is obvious (“Support v2 — billing added”), and archive the old one rather than deleting it, so earlier models still point to what they were trained on.

Common mistakes

  • Expecting a fix made in the original chat to reach a dataset created earlier.
  • Deleting an old dataset that trained a model you still use, losing the record of what it learned.
  • Mixing unrelated tasks in one dataset without enough examples of each.
  • Leaving a wrong reply as a target instead of correcting it in the dataset.

References and further reading

External sources open in a new tab.

  1. 01Datasheets for DatasetsGebru et al., 2018 · arXiv · arxiv.orgThe case for recording how every dataset was collected and what it contains.
  2. 02DatasetsHugging Face docs · huggingface.coHow the open-source ecosystem stores, versions and shares training data.
  3. 03Deduplicating Training Data Makes Language Models BetterLee et al., 2021 · arXiv · arxiv.orgWhy duplicate examples are worth removing.

Turn weeks of expert work into minutes

See how Scalata fits your team, your data, and your controls.