All articles

Dataset for fine tuning LLM: what it needs to contain

In short. A dataset for fine tuning LLM is a set of examples: what the model receives and what it should answer. The TRL documentation distinguishes formats, standard and conversational, and task types: language modelling, prompt with completion, preference. Most owners do not have examples, they have raw material: documents, mail, recordings. We turn it into a clean set from 390 € and process it on the machine where the data lives.

A desk in Nice: neat stacks of papers and letters beside a small wooden box of finished cards, a brass magnifying glass, a pencil and a cup of coffee, morning light from the window
A heap of material becomes a set of examples once it has been sorted, cleaned and labelled.

Business owners often want a model that knows their vocabulary, formats and judgement calls. That takes examples, not just a folder of documents. This guide explains what a fine-tuning dataset is in plain words, which formats exist according to the TRL documentation, how to get examples from raw material, what to do about personal data, how to split a set into training and test parts and what our work includes.

What is a fine-tuning dataset in plain words?

It is a set of examples of one task: what the model receives as input and what it should answer. Our catalogue puts it this way: a model trained for your business is only as good as the examples it learns from. Most clients do not have examples. They have raw material: folders of documents, messages, recordings and exports. The job is to turn that into a clean set.

Which formats exist?

The TRL documentation from Hugging Face distinguishes the format and the type of data. The format is how it is written: standard (plain text) or conversational (a list of messages with roles). The type is tied to the task and decides the columns.

Type What a record holds
Language modelling a single text
Prompt only a prompt without an answer
Prompt and completion a prompt and the expected answer
Preference a prompt, a chosen answer and a rejected answer

For a business, a prompt with a completion usually fits best: a customer email and the reply you consider right, a document and the summary you need. Preference is useful when you want to show the model which of two answers is better.

Where do you get examples?

From what you already have: emails with approved replies, completed forms, call transcripts, exports from a system. Then five steps are needed: collect, clean, remove duplicates, label and bring to one form. After that quality is checked on a sample: not the whole set, but a random part that a person reads.

The main rule: take only material whose answer you consider right. If the archive contains replies you are not happy with, the model will learn exactly those.

How many examples do you need?

We do not give a universal figure, because there is none: it depends on the task, on the variety of the material and on how narrow the task is. It is better to start with one narrow task and a small set and check what comes out on your own test examples. How to measure the quality of answers is shown in our guide to LLM as a judge.

What should you do about personal data in the material?

Customer emails and recordings contain personal data, and Article 5 of the GDPR requires collecting it for specified purposes, taking only what is necessary and keeping it no longer than necessary. In practice that means removing names, addresses and numbers from the set if the task does not need them, not copying archives more than necessary and not keeping the set longer than needed. That is why we process the material on the machine where your data lives, or on ours under an agreement. Our service description says the same: everything happens where the data lives.

How do you split a set into training and test examples?

Part of the examples is set aside and not shown to the model during training: the result is checked against them afterwards. Here is a calculation with invented figures, to show the method and not a result we obtained. Suppose that out of 1200 emails, 900 remain after cleaning and removing duplicates, and all of them are labelled. We set aside every fifth example as a test example: 900 ÷ 5 = 180 test and 720 training. The share of every fifth is our rule for the example, not a requirement.

A wooden table in Nice: a deck of cards divided into two stacks, a larger and a smaller one, a brass ruler between them, a pencil and an empty notebook beside them, daylight
Part of the examples is set aside so that the result can be checked honestly.

What does a good record look like, and a bad one?

A good record is simple: a clear input, one answer you consider right and nothing extra. For example, a customer email asking about timing and your reply with a specific date, written in the tone you want to use every time. A bad record looks different: it holds a long chain of forwarded emails instead of one question, a signature and internal notes inside the text, a reply that contradicts another reply to a similar question, or a reply you yourself are unhappy with. The model will repeat both the good and the bad, so such records are better removed before training, not after.

How do you check a set before training?

The check takes half an hour and saves days. Read thirty random records and note how many you would be ready to show as a model example. Look for duplicates: identical records teach the model the same thing too often. Look for contradictions: similar questions with different answers. Check that the text holds no personal data that should not be there. And make sure the test part lies separately and the model has not seen it: otherwise the check shows nothing.

What does our work on a dataset include?

We collect material from your real documents, mail, recordings and exports, clean it, remove duplicates, label and structure it. We check quality on samples. The finished set stays yours and is handed over in standard formats. A clean set of examples from your raw material costs from 390 € per dataset. If you then want to train a model, that is a separate service from 890 €: we pick an open model sized to your computer, train it on your machine and compare the result on your own test examples.

If you are still choosing what to run the model on, read about which GPU you need for a local LLM. For data privacy, see our guide to private AI for business.

When is a dataset not needed?

Sometimes a general model is already close to what you need, and a good instruction and a few examples in the prompt are enough. Before collecting a set, test this on twenty examples of your own: if the result satisfies you, fine-tuning is not needed. A set is also not needed when you have no material whose answers you consider right: first you must decide what a good answer looks like. How to run a model on your own side is covered in our guide to a local LLM for small business.

What should you prepare?

Bring a short list:

  • One narrow task the model must solve.
  • Where the material lives: folders, mail, recordings, exports.
  • Which answers you consider right, and an example of a good and a bad answer.
  • Whether the material holds personal data and which of it is needed.
  • Where the data will be processed: with you or with us under an agreement.
  • How you will check the result: twenty test examples with expected answers.

If there is little material, that is not a verdict: a narrow task often starts with a small but clean set that can be added to later. Describe the task to us and send a few typical examples of the material. We reply in writing within 48 hours.

Questions

What is a fine-tuning dataset?

It is a set of examples of what the model should do: an input and the expected answer. According to the TRL documentation, data comes in a standard or a conversational format, and by task, for example language modelling, a prompt with a completion, or a preference between two answers.

How many examples do you need for fine-tuning?

We do not give a universal figure: it depends on the task. Start with one narrow task, collect a small set and check the result on your own test examples before increasing the volume.

Can you use customer emails and recordings?

Only with Article 5 of the GDPR in mind: data is collected for specified purposes, only what is necessary is taken and it is kept no longer than necessary. That is why we process such material on the machine where your data lives and remove what is not needed.

What does preparing a dataset cost with you?

From 390 € per dataset. We collect, clean, remove duplicates, label and structure the material, check quality on samples and hand over the set in standard formats. The finished set stays yours. Training the model is a separate service from 890 €.

Contact

One person reads this inbox — the same person who builds what you order.

Describe your task

Tell us what you have and what result you need — even a single small task. No brief required: within 48 hours you get a plan and a price in writing, a question, or an honest “not a fit”.

Include the situation, files or links, deadline, language, privacy limits and budget boundary if you have one.

File (optional)
No file chosen

A brief, a photo, a spreadsheet — whatever explains the task faster than words. Up to 8 MB, stored with our hosting provider. Please don't send sensitive personal or medical documents through the site.

Sending creates no order and no payment. We reply within 48 hours. Prefer email? contact@castel.studio

Talk to us

Prefer a call or a messenger? Write or call — the studio's founder answers.

Connect on LinkedIn

Prefer a freelance platform?

Order the same work there, with the platform's secure payment.

A one-person AI studio in Nice. Whoever answers your message is the one who does the work — no account managers in between. Files are processed on our own machine, not in someone else's cloud.

Nice 06100, France · Open in maps →

SIREN 103 115 705

Describe your task