Preparing Data for Model Training
A finetuned model works best when the prompts you send match the format of its finetuning data, including small details such as punctuation and spacing.
A Clear Request Can Still Be a Mismatch
It is tempting to assume that once a model has been finetuned, any clearly worded request will work. But a finetuned model learns from examples with a particular arrangement of words, punctuation, and spacing. A prompt can make sense to a person and still differ from the format the model was trained to expect. The practical goal is not just to write a clear request; it is to write one that fits the format used in finetuning.
What do you think happens?
Suppose the finetuning examples use the input pattern burger -->. Which later prompt most closely matches that pattern: burger, Item: burger -->, or burger --> with a trailing space?
Reveal answer
burger --> without an added prefix or trailing space most closely matches the stated pattern.
The other two prompts differ from the training format: one omits the arrow, and the other adds a prefix or a trailing space. Such near-miss prompts can cause issues, even when their meaning seems clear.
What the Training Format Teaches
Finetuning teaches a model from examples, and each example has a shape: an arrangement of words, punctuation, and spacing. That shape becomes part of what the model has learned to expect. When you later send a prompt that follows the same format, you are giving it input that resembles those examples. When you change the format, you are asking it to handle input that differs from what it was trained to expect. A difference does not guarantee failure, but near-miss prompts can cause problems.
Check a Prompt Against Its Training Pattern
Training examples use the pattern burger -->. Decide whether each candidate preserves that pattern.
- 1Compare the words and punctuation
The candidate burger omits the arrow shown in the training pattern.
- 2Check for added text
Item: burger --> adds a prefix that is not part of the stated pattern.
- 3Check spacing too
burger --> with a trailing space adds a formatting difference, even though the visible words and arrow are present.
burger -->, with no added prefix or trailing space, is the closest match to the training pattern. The other variants are near misses that may cause issues.
How Finetuning Can Shorten Prompts
A base model may need a longer prompt to spell out the instructions for a task. After finetuning, the model may have learned the desired behavior from its examples, so a request can often be much shorter. The instructions have not vanished from the model's behavior; rather, the source explains that the full set of instructions no longer needs to be written into every request.
If input token use matters for your task, consider whether finetuning could reduce the instructions you send repeatedly. Measure the actual token use for your own prompts rather than assuming a particular saving: the source gives no token counts or pricing.
Choose a Format by Testing It
There is no single format identified here as best for every task. Different finetuning data formats can affect performance, so treat the format as a choice to test rather than a mere bookkeeping detail. Prepare the examples in more than one format, finetune a model on each version, and compare the results on the task you care about. A format that looks tidy on paper is not necessarily the one that produces the best behavior. After choosing a format, keep later prompts consistent with it.
Common Prompt-Preparation Mistakes
Common mistake Assuming any reasonable wording will work after finetuning.
Why it failsThe model learned from examples with a particular format, and a clear request can still differ from that format.
Do this insteadCompare the prompt's words, punctuation, and spacing with the examples used for finetuning.
Common mistake Ignoring small differences such as a missing arrow or an added prefix.
What it looks likeThe training pattern is burger -->, but the prompt is burger or Item: burger -->.
Why it failsThese are near misses rather than exact matches to the stated pattern, and near misses can cause issues.
Do this insteadKeep the prompt aligned with the training format unless you have tested a different format.
Common mistake Treating an appended space as irrelevant.
What it looks likeThe prompt is burger --> with a trailing space.
Why it failsSpacing is one of the small formatting details that can distinguish a prompt from the training pattern.
Do this insteadCheck spacing as well as words and punctuation.
Common mistake Choosing a data format only because it looks tidy.
Why it failsDifferent formats can affect performance, and appearance alone does not establish which works best for a task.
Do this insteadTest alternatives and compare their results on the task you care about.
Apply the Format-Matching Check
A set of finetuning examples uses the input pattern burger -->. A new prompt is Item: burger --> with a trailing space. Identify two differences from the pattern and explain why the prompt could cause problems.
Hints
- Compare the beginning of the prompt with the training pattern.
- Check the spacing at the end as well as the visible words and punctuation.
A strong answer identifies the added prefix and trailing space. Both make the prompt differ from the stated training pattern, so the prompt is a near miss that may cause issues. The practical response is to match the training format or test the alternative rather than assume the model will treat the formats as interchangeable.
Key Takeaways
- Finetuned models learn from examples with a particular arrangement of words, punctuation, and spacing.
- Prompts that differ by a missing symbol, an added prefix, or extra spacing can be near misses and may cause problems.
- Finetuning can allow shorter prompts by reducing the need to repeat full instructions, which can help manage input token costs.
- Different finetuning data formats can affect performance; test alternatives on the task you care about.
- Once you choose a format, make later prompts resemble that format.