Skip to content

Learn AI training

How do you train AI models?

You train AI models in stages: first on a huge amount of text, then with human data, where people show the model good answers, compare its answers, and grade them against rubrics. That human data is what turns a text predictor into a model that follows instructions, and it is written by experts in every field.

Updated · Swooply

How AI models are trained, step by step

  1. 01PretrainingThe model reads a very large amount of text and learns to predict the next word. This gives it language and general knowledge, but not judgment.
  2. 02Supervised fine-tuningPeople write ideal answers to prompts (demonstrations), and the model is trained to imitate them.
  3. 03Preference training (RLHF)People compare two answers and say which is better. Those comparisons train a reward model, and the main model is tuned to earn its approval.
  4. 04Rubric-based rewardsExperts write checkable criteria with point weights. A grader applies the rubric to many answers, and the scores become the reward.
  5. 05EvaluationHeld-out tests and expert review check the result, and the weak spots become the next round of human data.

1. Pretraining: learning language from text

A large language model starts by reading a very large body of text and learning to predict the next word. That is how it learns grammar, facts and how ideas connect. A pretrained model can continue any text, but it does not yet know what a good answer to a question is, when to say it is unsure, or which instructions to follow. Everything after pretraining teaches that, and it is taught with human data.

2. Supervised fine-tuning: demonstrations

People write the ideal response to a prompt, and the model is trained to imitate it. A demonstration teaches whatever it contains: a correct, well-structured answer teaches good habits, and a subtle error is copied just as faithfully. So demonstrations must be right, complete, and follow every instruction in the prompt. This is why labs hire doctors to write medical answers and lawyers to write legal ones.

3. RLHF: preference pairs and the reward model

Reinforcement learning from human feedback (RLHF) asks people to compare two responses to the same prompt and say which is better, and by how much. Many of these comparisons train a reward model that scores responses the way people did; the main model is then tuned to earn high scores. In the paper that introduced InstructGPT, labelers preferred a 1.3-billion-parameter model trained this way over the 175-billion-parameter GPT-3 (Ouyang et al., Training language models to follow instructions with human feedback (2022)). Meta trained Llama 2's reward models on more than a million human comparisons (Touvron et al., Llama 2: Open Foundation and Fine-Tuned Chat Models (2023)).

Two things decide whether a comparison helps:

  • Direction. Picking the worse response teaches the reward model the opposite of what was wanted.
  • Strength. “Much better” and “slightly better” are different signals. Calling a style preference “much better” tells the model style matters as much as correctness.

4. Rubrics: grading answers criterion by criterion

A rubric is a list of specific, checkable criteria with point weights, such as “States the result is 42 m/s (+5)” or “Recommends an unsafe dosage (−8)”. A grader model applies the rubric to many responses, and the scores become the reward. Good criteria are:

  • Atomic: one check each.
  • Self-contained: a grader without your expertise can apply them.
  • Objective: met or not met.
  • Signed: positive points for what a good answer does, negative points for errors.

5. Evaluation, and why one bad label matters

A model learns from patterns across all of its data. One wrong label is not ignored: it is averaged in, and a confident wrong label pulls hardest. If someone marks an invented software function as “helpful” because it sounds plausible, the reward model learns that plausible inventions are rewarded, and the main model learns to invent more of them. That is why projects check labels against expert answers, measure agreement between annotators, and pay more for careful, consistent work.

Project guidelines decide what “better” means. Most build on three principles: a response should be helpful (it does what was asked, in the format asked for), honest (accurate, says when it is unsure, never invents sources) and harmless. Refusing a safe request is a failure too.

Who trains AI models?

Engineers build the training systems, but the human data comes from people with real expertise: scientists, nurses, lawyers, accountants, translators, teachers and software engineers. AI training platforms hire them, remotely and often by the hour, to write, compare and grade model answers in their own field. You can browse open AI training jobs, see what each field pays, or compare AI training platforms.

Learn the work in a lab curated to your skillset

Reading about AI training is a start; doing it is how you learn. Swooply's lab is generated from your résumé: the prompts, responses and tasks are in your field, at your level, so you practise on the kind of work a project would actually give you. Seven modules, with feedback on every answer:

  1. Module 1

    How human data trains models

    Demonstrations, preference pairs and rubrics, and how your labels become a model's training signal.

  2. Module 2

    Reading project guidelines

    How guidelines decide what “better” means, and how to apply them under pressure.

  3. Module 3

    Side-by-side preference

    Compare two responses, rate which is better and by how much, and tag what went wrong.

  4. Module 4

    Grading with a rubric

    Apply a weighted rubric to a response, criterion by criterion.

  5. Module 5

    Justification writing

    Write the justification a reviewer could check.

  6. Module 6

    Rubric authoring

    Write a rubric that tells a strong response from a flawed one.

  7. Module 7

    Task design capstone

    Design a task from your own field that a model gets partly wrong.

Ready in a minute or two. Work at your own pace; your progress is saved.

FAQ

Training AI models: common questions

How do you train an AI model?

Large language models are trained in stages. Pretraining on a large body of text teaches language. Then human data shapes behaviour: people write ideal answers (supervised fine-tuning), compare pairs of answers to train a reward model (RLHF), and write rubrics that grade answers criterion by criterion. Evaluation finds the weak spots, which become the next round of data.

Do you need to code to help train AI models?

No. Most human data work is judgment, not programming: comparing two answers, grading an answer against a rubric, writing an ideal answer, or designing a hard task in your own field. Coding projects exist, but so do projects in medicine, law, finance, science, languages and many other fields.

What is RLHF?

Reinforcement learning from human feedback. People compare two responses to the same prompt and say which is better and by how much. Many of these comparisons train a reward model that scores responses the way people did, and the main model is then tuned to earn high scores from it.

What is a rubric in AI training?

A list of specific, checkable criteria with point weights, such as a required fact worth +5 or an unsafe recommendation worth -8. Good criteria check one thing each, can be applied by someone without your expertise, are either met or not met, and carry negative points for errors.

Why does the quality of one label matter?

A model learns from patterns across all of its data, so a wrong label is averaged in rather than ignored, and a confident wrong label pulls hardest. Rating a plausible but invented answer as helpful teaches the reward model that plausible inventions are rewarded. That is why projects check labels against expert answers.

How can I learn to do AI training work?

Swooply's lab is free and built from the skills on your résumé. Its seven modules take you from how human data trains models to side-by-side preference rating, rubric grading, justification writing, rubric authoring and a task design capstone, with feedback on every answer. You work at your own pace and your progress is saved.