Basic

What fine-tuning changes

Retrieval changes what a model reads. Fine-tuning changes the model itself: its weights move so that it produces the shape of output you showed it. That difference is the whole decision between the two, and it is why a fine-tuned model can be wrong on facts it never saw.

What you will see

One sentence naming a transformation. That is a tuning job; 'make it better at support' is not.

About 1 min of reading

Try It

State the job in one line.

1

The job

job = 'Turn a raw error log line into a one sentence cause for a support reply.' print(job)

Before you run it, say out loud what it will print. Then open the answer.

What it prints
One sentence naming a transformation. That is a tuning job; 'make it better at support' is not.

Data Flow

Examples move the weights.
1 Collect input and desired output pairs
↓
2 Run the training loop
↓
3 Weights shift toward those outputs
↓
4 Serve the tuned model
Line by line

Read the first example one line at a time. A line that prints shows what appears on screen; the rest set things up quietly.

job = 'Turn a raw error log line into a one sentence cause for a support reply.' sets nothing on screen
print(job) One sentence naming a transformation. That is a tuning job; 'make it better at support' is not.
Why this works
Name the job

Write the one thing the tuned model must do: the format, the tone, the classification, the transformation. If you cannot name it in a sentence, you do not have a tuning job yet.

Keep the base model

A tuned model is a version, not a replacement. Keep the base available so you can compare, and so a bad run can be reverted rather than argued about.

Examples

Shape, not facts

Show a model two hundred examples of your format and it learns the format well. Show it facts and it learns them loosely, and it will rephrase or drop them. Style and structure are what tuning is good at.

Weights move once

A tuned model is a build artifact. It does not update when your documents change, which is why a model tuned on last year's prices answers from last year's weights.

The cost is a run

Tuning takes a training run over your examples, and the result is a model you then serve. That is a different cost shape from retrieval, which pays per question.

Words this lesson uses

Each one is defined here on this site. Open the entry for the full definition and the other words it points at.

Next Lesson
The training set
The training set →