A fine-tuned model can only be as good as the data it learns from. Preparing that data means curating it, labeling it, making sure it represents the real job, getting the size right, and governing who can see and use it. This lesson covers each step, plus reinforcement learning from human feedback (RLHF), a way of training models on human judgments rather than fixed answers.
Curation and quality
Data curation means choosing, cleaning and checking examples before training. That includes removing duplicates, fixing errors, cutting irrelevant or outdated material, and making the examples consistent. A model learns from mistakes just as faithfully as from good examples, so a wrong answer in the training set teaches the model to be wrong. AWS's guidance for continued pre-training calls data quality the most important factor in whether training succeeds.
Labeling and format
Supervised fine-tuning needs labeled examples: inputs paired with the outputs you want. In Amazon Bedrock, they go into JSON Lines files, one example per line, typically a prompt and its ideal completion, stored in Amazon S3. The labels must be accurate and consistent. If two reviewers would write very different ideal answers to the same prompt, the model gets mixed signals. A separate validation set, held back from training, lets you check the model on examples it hasn't seen.
Size and representativeness
More data isn't automatically better, and each model sets minimum and maximum dataset sizes for customization. What matters most is that the examples are representative: they should look like the real requests the model will face, across every type of user, topic and edge case. If a support dataset only contains billing questions, the model will be weak on technical ones. Under-representing some groups of people can also build bias into the model.
Governance
Training data is often sensitive, so it needs the same care as any important business data. Teams should know where each dataset came from and whether they have the right to use it. They should restrict access with least-privilege permissions, encrypt it, and remove personal information the model doesn't need. AWS's security guidance warns that a model trained on personal data can leak it later. It suggests tools like Amazon Macie to find sensitive data in Amazon S3, and customer managed keys in AWS KMS to encrypt training data and the resulting custom model.
Reinforcement learning from human feedback
RLHF uses human judgment to make a model's answers more helpful, accurate and safe. People write good example answers, and then rank several model responses to the same prompt from best to worst. Those rankings train a separate reward model that predicts what humans would prefer. The language model is then trained to produce answers the reward model scores highly. RLHF handles qualities that are hard to define with rules, such as tone and helpfulness, but it needs a lot of careful human effort.
On the exam
Expect scenarios where a fine-tuned model behaves badly and you must find the data cause. Wrong answers mean poor curation or labels. Weakness on certain topics or groups means data that isn't representative. Leaked personal details point to missing governance. When the goal is answers people prefer, especially on tone or helpfulness, the clue is human ranking, which means RLHF.