Move through the deck with (i) the arrow keys, (ii) a presentation clicker, or (iii) the buttons at the bottom left. The gear at the bottom right opens the slide settings.
| Term | Standard meaning | Paper airplane example |
|---|---|---|
| Data | recorded facts or measurements | the class flight notebook |
| Feature | an input value supplied to a model | wing width before the flight |
| Target | the value a model should learn to predict | measured flight distance |
| Model | a function that maps inputs to an output | a function that predicts distance from wing width |
Illustrative classroom investigation.
| Airplane | Wing width, feature | Flight distance, target |
|---|---|---|
| A | 10 cm | 4.0 m |
| B | 12 cm | 5.0 m |
| C | 14 cm | 6.0 m |
| Example | one case that a model can use | one airplane flight |
| Row | one example written across a table | airplane B and both measurements |
| Dataset | a collection of examples | the complete flight notebook |
Illustrative measurements.
| Term | Standard meaning | Child friendly metaphor |
|---|---|---|
| Target | the output that the task asks the model to predict | the answer space on a worksheet |
| Prediction | the output calculated by the model | the model writes its guess in the answer space |
| Ground truth | the trusted answer used for comparison | the teacher checks the official tape measure |
| Label | a named category used as a target | short, medium, or long flight |
For a 13 cm wing, the model predicts 5.5 m. The measured ground truth is 4.9 m.
| Term | Standard meaning | One time metaphor |
|---|---|---|
| Model | a function that calculates an output from inputs | a prediction machine with adjustable settings |
| Parameter | a value learned from training data | a setting adjusted through practice |
| Weight | a parameter that controls an input's influence | a louder clue receives more attention |
| Bias | a parameter added before an output or activation | a starting adjustment before using the clues |
| Hyperparameter | a choice that controls the training process | the practice plan, including batch size and learning rate |
| Term | What it measures | Paper airplane example |
|---|---|---|
| Error | a difference between a prediction and ground truth | the predicted distance missed the measured distance |
| Residual | ground truth minus a numerical prediction | 4.9 m minus 5.5 m |
| Loss function | a function that gives prediction mistakes a numerical score | a practice score used to guide an update |
| Metric | a named measurement used to evaluate performance | average distance error on reserved flights |
| Dataset part | Purpose | School metaphor |
|---|---|---|
| Training set | examples used to learn model parameters | practice questions with feedback |
| Validation set | reserved examples used to choose model settings | a practice quiz used to choose a study plan |
| Test set | reserved examples used after model choices are fixed | a sealed quiz opened for the final check |
Separation matters because repeatedly studying the final quiz would hide whether the student can answer new questions.
| Stage | What happens | Do parameters change? | School metaphor |
|---|---|---|---|
| Training | examples provide predictions, ground truth, loss scores, and updates | yes | practice with feedback |
| Inference | learned parameters calculate a prediction for a new input | no | answering a new question |
Chat example: an assistant usually performs inference while writing a response. A separate training process changes its stored parameters.
A small model receives eight training examples. It studies two examples at a time.
After each pair, the model measures loss and adjusts its parameters once.
four updates
Illustrative count. Concepts adapted from Mehmet Kerem Turkcan, CS3 RET Week 2 Day 4: Deep Learning Concepts, 2024.
Backpropagation finds how each parameter affected the loss. An optimizer uses that information to choose a small update.
Batch size 2
The model reads two examples, measures their loss together, and then updates its parameters once.
Suppose the training set has eight examples.
| Batch size | Examples in each batch | Iterations in one epoch |
|---|---|---|
| 1 | eight groups of one | 8 |
| 2 | four groups of two | 4 |
| 4 | two groups of four | 2 |
| 8 | one group of eight | 1 |
With batch size 2, two epochs contain eight updates: four updates in each epoch.
Illustrative count.
| Training pattern | Training examples | New examples | Study metaphor |
|---|---|---|---|
| Underfitting | many mistakes | many mistakes | the student learned too little of the material |
| Useful fit | few mistakes | few mistakes | the student can solve familiar questions and new versions |
| Overfitting | very few mistakes | more mistakes | the student memorized the answer key |
During recall practice, students answer from memory before checking the answer.
Illustrative study.
| Study design | What researchers do | What the design supports |
|---|---|---|
| Observational study | record choices and outcomes as they occur | description and association |
| Randomized experiment | assign students by chance, then measure outcomes | a causal explanation when procedures and assumptions are sound |
Researchers plan the question, sample, assignment, measurements, and analysis before collecting the data.
A linear model uses a straight line to summarize an average relationship and calculate predictions.
Slope says how much the prediction changes when the feature rises by one unit.
Intercept is the prediction when the feature equals zero.
The scores stay in their rows. Advance to place the same two group labels into new rows.
| Student | Score, fixed | Observed group | Shuffled group |
|---|---|---|---|
| Ana | 9 | practice | comparison |
| Bo | 7 | practice | practice |
| Cy | 5 | comparison | comparison |
| Dee | 3 | comparison | practice |
Observed gap: 8 minus 4 equals 4. Shuffled gap: 5 minus 7 equals negative 2.
Illustrative exact permutation test.
A p value asks how often the null model produces a result at least as unusual as the observed result.
| Question | Quantity or evidence |
|---|---|
| How unusual are these data under the null model? | p value |
| How large is the estimated difference? | effect size |
| How uncertain is the estimate? | confidence interval |
| Does the study support a causal explanation? | study design and assumptions |
American Statistical Association statement on statistical significance and p values, 2016.
Suppose a study estimates a 6 point average gain from recall practice.
The effect size, 6 points, describes the estimated difference. The confidence interval, 2 to 10 points, describes uncertainty under the procedure and assumptions.
Recipe metaphor: a written method lets another research team repeat the study and check whether the result appears again.
American Statistical Association, 2016; National Academies of Sciences, Engineering, and Medicine, 2019.
A door opens when exactly one of two switches is on.
| Switch A | Switch B | Ground truth |
|---|---|---|
| off | off | closed |
| on | off | open |
| off | on | open |
| on | on | closed |
Like two spotters, the hidden units identify A on and B off, or B on and A off. The output layer predicts open when either hidden unit is active.
The ReLU activation function keeps positive scores and replaces negative scores with zero. That step lets hidden units respond to different input regions.
| A | B | Hidden unit 1 A on, B off | Hidden unit 2 B on, A off | Door |
|---|---|---|---|---|
| off | off | 0 | 0 | closed |
| on | off | 1 | 0 | open |
| off | on | 0 | 1 | open |
| on | on | 0 | 0 | closed |
Illustrative XOR features.
Repeated iterations can produce hidden features such as the two XOR hidden units.
| Check | Question | Report card metaphor |
|---|---|---|
| Accuracy | What fraction of reserved examples were correct? | the fraction of answers marked correct |
| Calibration | Do predicted probabilities match observed frequencies? | claims of 70 percent should succeed about 70 times in 100 similar cases |
| Error analysis | Which examples and groups produce mistakes? | review the questions that caused trouble |
A test set stays reserved until the model choices are fixed. Its results describe that named set and scoring procedure.
Preparation: these topics require comfort with algebra and calculations that contain several steps.
Earlier flights averaged (i) 4 m at 10 cm, (ii) 5 m at 12 cm, and (iii) 6 m at 14 cm.
For a 13 cm wing, (i) predict the distance, (ii) assign the label clears when the prediction is at least 5 m, (iii) describe the evidence required for an uncertainty statement, and (iv) explain the answer.
| Words in the answer | Statistical operation |
|---|---|
| 5.5 m | regression predicts a number |
| the label clears | classification assigns a label |
| repeated flights and assumptions | uncertainty requires a stated meaning and evidence |
| the complete sentence | next token generation writes the response |
Illustrative assistant response. After isolating each operation, check it with a small example and use that example for teaching.
The illustrative numerical claim is 5.5 m for a 13 cm wing.
In regression, software fits a line to measured pairs so that the fitted line can predict a number.
Illustrative input and requested output.
| Wing width | Average distance |
|---|---|
| 10 cm | 4 m |
| 12 cm | 5 m |
| 14 cm | 6 m |
Illustrative measurements. The slope is 0.5 m of predicted distance per additional centimetre of wing width.
The intercept completes the equation after the slope has been calculated.
The fitted line summarizes association in these measurements. Evidence for a causal claim requires a separate study design.
Illustrative measurements and fitted equation.
The slope says that predicted distance increases by 0.5 m when wing width increases by 1 cm.
The line supplies one predicted distance for every width in its range.
Suppose the measured flight distance is 4.9 m.
The residual is negative because the measured flight landed 0.6 m below the prediction.
Illustrative measured flight. The 13 cm width lies between measured widths, so the prediction is an interpolation.
Mean squared error is a loss function that squares each residual and averages the squared values.
| Candidate equation | Squared errors (\text{m}^2) | Mean squared error (\text{m}^2) |
|---|---|---|
| 0.4(\text{width}) | 0, 0.04, 0.16 | 0.067 |
| 0.5(\text{width})-1 | 0, 0, 0 | 0 |
| 0.6(\text{width})-2 | 0, 0.04, 0.16 | 0.067 |
The middle equation has mean squared error 0, the smallest value in the table, so it fits these three averages best.
Illustrative measurements. Squaring prevents positive and negative residuals from cancelling.
A sample is the set of flights measured by one class. Two classes can repeat the same designs and obtain different measurements.
| Wing width | Class A distance | Class B distance |
|---|---|---|
| 10 cm | 4.0 m | 4.4 m |
| 12 cm | 5.0 m | 4.8 m |
| 14 cm | 6.0 m | 5.6 m |
Sampling variability is the change in an estimate across samples produced by the same measurement process.
Illustrative class measurements.
The interval ranges from 0.35 to 0.65 m of predicted distance per additional centimetre of wing width.
Illustrative regression interval. The assumptions are (i) independent flights, (ii) an approximately linear average relationship, (iii) similar residual spread at each width, and (iv) the stated large sample normal approximation. Software calculates the supplied standard error from the fitted sample.
A confidence interval procedure produces a new interval from each fresh sample.
If the assumptions hold, about 95 percent of intervals from many repeated samples would contain the fixed population slope.
The population slope is fixed. The interval endpoints change from sample to sample.
Illustrative repetition. NIST and SEMATECH guidance, accessed 2026, describes confidence intervals for regression parameters.
Under this null model, each measured distance can be paired with any fixed width without changing its probability. Statisticians call this exchangeability.
The alternative hypothesis states that width has a positive association with distance.
Illustrative null model and assignments.
| Distance order | Fitted slope | At least +0.50? |
|---|---|---|
| 4, 5, 6 | +0.50 | yes |
| 4, 6, 5 | +0.25 | no |
| 5, 4, 6 | +0.25 | no |
| 5, 6, 4 | -0.25 | no |
| 6, 4, 5 | -0.25 | no |
| 6, 5, 4 | -0.50 | no |
Exact illustrative permutation reference set.
The observed assignment has slope +0.50.
One of the six equally likely assignments has a positive slope at least as large as the observed slope.
Exact illustrative permutation test.
p=1/6 means that the null model has a one in six chance of being true.
The calculation counts shuffled data patterns under the stated null model. A probability for the hypothesis requires a probability model for hypotheses and prior information.
The observed slope, 0.50 m per cm, reports the estimated magnitude. Future clearance requires a predictive model and evidence from new flights.
Illustrative p value. American Statistical Association statement on statistical significance and p values, 2016.
The 5 m threshold is the decision boundary because it assigns different labels to predicted distances on its two sides.
Illustrative threshold. Changing it can change false positives and false negatives.
After a logistic classifier calculates a weighted score, z, it applies the sigmoid function, \sigma. The sigmoid function produces a value between 0 and 1.
The constant e is approximately 2.718. The resulting value is the probability that this model assigns to clearance.
Illustrative sigmoid calculation.
If you answered about 70 cases, you were correct. Calibration compares predicted probabilities with observed frequencies among similar reserved cases.
With only ten cases, ordinary variation can move the observed count far from seven. Calibration needs many relevant cases.
Illustrative calibration counts. Guo et al., On Calibration of Modern Neural Networks, ICML 2017.
A door opens when exactly one of two switches is on.
| Switch A | Switch B | Door |
|---|---|---|
| off | off | closed |
| on | off | open |
| off | on | open |
| on | on | closed |
When the switches are plotted as two coordinates, the open cases occupy opposite corners. No single linear decision boundary separates both open cases from both closed cases.
Illustrative switch example. This pattern is called exclusive OR, commonly written XOR.
The ReLU function keeps positive numbers and replaces negative numbers with 0. Use the input with switch A on and switch B off.
Illustrative XOR weights and calculation.
Write off as 0 and on as 1. The ReLU function keeps positive values and replaces negative values with 0.
| A | B | h_1 | h_2 | output y |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0, closed |
| 1 | 0 | 1 | 0 | 1, open |
| 0 | 1 | 0 | 1 | 1, open |
| 1 | 1 | 0 | 0 | 0, closed |
Illustrative XOR weights and calculations.
ReLU, pronounced ree loo, is the activation function \max(0,\text{score}). Negative scores become 0; positive scores remain unchanged.
The weights determine how strongly each input contributes. The bias shifts the score before the activation function is applied.
Illustrative ReLU calculation.
Place two switch examples in the rows of an input matrix, X. Place the weights for two hidden units in the columns of W.
The first row of X is the example (A,B)=(1,0). The second row is (1,1).
The first column of W calculates A-B. The second column calculates B-A.
Illustrative matrix setup for the XOR examples.
Calculate each input row with both weight columns.
Apply ReLU to each entry, replacing the negative entry with 0.
Illustrative matrix calculation. Each row contains the two hidden unit outputs for one example. Each column contains one hidden unit output for both examples.
The airplane flies.
The airplane ?
Given the visible context, the model calculates one score for each possible next token.
| Possible token | Illustrative score |
|---|---|
| flies | 1.35 |
| lands | 0.59 |
| is | 0 |
Softmax uses the total, 6.66, as the denominator for every token.
Illustrative softmax calculation. The constant e is approximately 2.718.
Illustrative softmax calculation. Each probability is one exponentiated score divided by the same total.
| Token | Probability |
|---|---|
| flies | 0.58 |
| lands | 0.27 |
| is | 0.15 |
The symbol \sum means add all listed values. The largest probability is 0.58. The argmax operation selects the entry with the largest value, which is flies.
Sampling draws a token from the full probability distribution.
Illustrative probabilities. After the generation program appends the selected token, the model calculates another distribution from the longer context.
| Question | One linear classifier | Neural network |
|---|---|---|
| What enters? | features chosen before fitting | inputs followed by learned hidden features |
| What boundary is possible? | one straight line or flat plane | a boundary composed from several learned features |
| What can the final layer be? | a linear score with sigmoid or softmax | the same kind of linear score after hidden layers |
| How are parameters learned? | reduce a chosen loss | reduce a chosen loss through all layers |
The XOR calculation showed hidden units constructing features that support a nonlinear decision boundary.
| Quantity | Question it answers | Evidence needed for interpretation |
|---|---|---|
| 95 percent confidence interval | How variable is an estimation procedure across samples? | repeated samples represented by a sampling model |
| p value | How unusual are these data under a stated null model? | a stated null model and sampling plan |
| 73 percent prediction | What probability does this fitted model assign to this outcome? | reserved cases for checking calibration |
| 74 percent accuracy | What fraction of a particular evaluation set was correct? | a named evaluation set and item count |
Illustrative prediction and accuracy values.
During training, the model calculates predictions from examples. The loss function compares predictions with targets. The optimizer changes parameters.
During inference, the model calculates an output for a new input. The learned parameters remain fixed.
Training can require many passes through the training data. A chat response is usually inference.
A long conversation trains the model while it responds.
During an ordinary chat response, the stored parameters remain fixed. A separate training process calculates gradients and updates those parameters.
| ID | Wing width | Measured distance | ID | Wing width | Measured distance |
|---|---|---|---|---|---|
| A | 10 cm | 4.0 m | E | 10 cm | 4.2 m |
| B | 14 cm | 6.0 m | F | 14 cm | 5.8 m |
| C | 11 cm | 4.5 m | G | 11 cm | 4.6 m |
| D | 13 cm | 5.5 m | H | 13 cm | 5.4 m |
Each row contains (i) wing width as the input and (ii) measured flight distance as the target.
Illustrative training data.
After these two calculations, use u for prepared width and v for prepared distance.
The illustrative model predicts \hat v=wu. Add 5 m to \hat v to recover predicted distance.
Illustrative centering and scaling.
The weight w is an adjustable model parameter. Each value of w produces a different prediction, and the optimizer changes w during training.
Training software usually initializes network weights with small random values so different units can learn different features. It commonly initializes biases at or near zero.
Illustrative scalar initialization. A recorded random seed can reproduce the initial draw in a larger network.
Illustrative forward pass and loss calculation. After the forward pass uses the fixed current parameters to calculate a prediction, the loss compares that prediction with the recorded target.
| Example | u | target v | prediction at w=0 | squared loss |
|---|---|---|---|---|
| A | -1 | -1 | 0 | 1 |
| B | +1 | +1 | 0 | 1 |
Batch size is the number of examples used to calculate one update. Here, the batch size is 2.
A laundry load provides a capacity analogy: the dataset is the full pile, and one batch is the group processed together for one update.
Illustrative batch and loss calculation.
Try the same batch with nearby settings of the weight.
| Weight w | Prediction for A | Prediction for B | Batch loss |
|---|---|---|---|
| -0.1 | +0.1 | -0.1 | 1.21 |
| 0 | 0 | 0 | 1.00 |
| +0.1 | -0.1 | +0.1 | 0.81 |
The gradient gives the local slope of loss with respect to each parameter. Because this finite difference estimate is -2, a small increase in w decreases the loss near w=0.
Illustrative finite difference calculation. Backpropagation computes exact derivatives efficiently. The gradient of the loss surface gives the direction of steepest local increase with respect to every parameter.
Illustrative small change calculation.
Subtract the old squared loss from the new squared loss:
For flight A, \hat v-v=1 and \Delta\hat v=-0.1.
Illustrative continuation of the flight A calculation. As the size of a change approaches zero, its square approaches zero more quickly. For a tiny change, the term proportional to the change therefore gives a close approximation.
At w=0, flight A has the loss change coefficient 2(0-(-1))(-1)=-2.
Flight B also has the coefficient 2(0-1)(1)=-2.
Illustrative backward pass.
A partial derivative is a local slope with respect to one quantity while the other quantities remain fixed.
Backpropagation traverses the calculation in reverse and applies this chain rule at each step.
Partial derivatives express the local slopes used by backpropagation.
Use an illustrative learning rate of r=0.2. The estimated loss slope is g=-2.
The learning rate controls the step length along the gradient direction. Individual updates can vary, so training is assessed across many updates.
Illustrative neural update.
The basic gradient descent optimizer used here applies the same update formula to every neural weight and bias.
| Symbol | Meaning |
|---|---|
| q | one weight or bias |
| g_q | local slope of loss with respect to that parameter |
| r | learning rate |
Other optimizers combine gradients using different update formulas.
One iteration is one completed parameter update. One update contains (i) a forward pass, (ii) a loss calculation, (iii) a backward pass, and (iv) an optimizer step.
Illustrative parameter update loop.
| Training examples | Batch size | Examples in successive batches | Iterations in one epoch |
|---|---|---|---|
| 8 | 1 | eight groups of 1 | 8 |
| 8 | 2 | 2, 2, 2, 2 | 4 |
| 8 | 8 | 8 | 1 |
| 10 | 4 | 4, 4, then 2 | 3 |
One iteration is one parameter update. One epoch is one complete pass through the training dataset.
Before another epoch, the program usually shuffles the examples and forms new batches. The updated parameters persist.
Illustrative batch counts. An epoch counts all training examples encountered in one pass. An iteration counts one parameter update.
initialize model parameters for each epoch: shuffle training examples for each batch: predictions = model(batch.inputs) loss = compare(predictions, batch.targets) gradients = backward(loss) optimizer.step(gradients) clear old gradients
Within one iteration, (i) model(...) runs the forward pass; (ii) backward(loss) stores gradients; (iii) optimizer.step(...) updates the parameters; and (iv) gradient clearing prepares the next iteration. The outer loop counts epochs.
| Kind | Examples | What determines it? |
|---|---|---|
| Parameters | weights and biases | the optimizer during training |
| Hyperparameters | learning rate, batch size, number of epochs | the practitioner or tuning procedure |
| Random state | initial random values, shuffle order, random augmentation draws | a seeded pseudorandom generator |
A recorded seed helps reproduce random choices. Hardware and software differences can create small numerical differences.
In this illustrative example, suppose one scan enters training and software extracts a text copy for the test set. This extraction process is optical character recognition, or OCR.
Leakage occurs when information unavailable in the intended future use influences training or model selection.
A random row split can place related (i) rows, (ii) people, (iii) documents, or (iv) time periods in different partitions. Group related records before assigning partitions.
| Partition | Use | Influence on model choices |
|---|---|---|
| Training | calculate updates to parameters | direct |
| Validation | compare settings and choose a checkpoint | indirect |
| Test | estimate final performance after choices are fixed | reserved until all choices are fixed |
A validation pass uses a forward pass and a score. Parameters remain fixed during that pass. Repeated choices based on validation results use information from that set.
Keep the test set unused until all model choices are fixed. Keep related items in the same partition, including (i) flights from the same airplane, (ii) pages from the same document, and (iii) nearly duplicate questions.
| Epoch | Training loss | Validation loss |
|---|---|---|
| 0 | 1.00 | 1.05 |
| 1 | 0.62 | 0.68 |
| 2 | 0.38 | 0.46 |
| 3 | 0.24 | 0.39 |
| 4 | 0.15 | 0.44 |
| 5 | 0.09 | 0.56 |
Illustrative loss values. Epoch 3 has the lowest validation loss, 0.39. After epoch 3, training loss falls and validation loss rises.
In this illustrative run, overfitting begins after epoch 3 because validation loss rises from 0.39 to 0.56 and training loss decreases during the same epochs.
| Pattern | Training result | Validation result | Classroom analogy |
|---|---|---|---|
| Underfitting | poor | poor | the student has not learned the material |
| Useful fit | good | good | the student can solve familiar and new versions |
| Overfitting | excellent | worsening | the student memorized exact questions and struggles with variants |
Illustrative training run.
After epoch 4 fails to improve on the saved validation loss, this illustrative procedure stops training and keeps the epoch 3 checkpoint. A separate test set provides the final estimate.
| ID | Record | Relation and first concern |
|---|---|---|
| D2.source | original community cookbook page containing Bake for 20 minutes | collected source; permission and handling |
| D2.scan | image derived from D2.source | transformed record; layout and legibility |
| D2.ocr.raw | OCR text from D2.scan: Bake for 2O minutes. | transformed record; recognition error |
| D2.ocr.reviewed | reviewed text reading Bake for 20 minutes | corrected record; preserve the source link |
Illustrative records. Each derived record keeps the ID of the record from which it was produced.
| ID | Record | First decision |
|---|---|---|
| D1 | HTML cooking lesson | review permission and page extraction |
| D4 | mirror copy of D1 | mark as an exact duplicate |
| D5 | copy of D1 with a changed footer | mark as a duplicate with a changed footer |
| D6 | question written for final evaluation | reserve D6 for evaluation |
Illustrative records. A large corpus requires automated checks together with sampled human audits.
| Dataset role | Question for one concrete record |
|---|---|
| Pretraining | Which recorded sequence supplies the next token targets? |
| Supervised fine tuning | Which prompt is paired with which approved response? |
| Preference | Which response better satisfies the stated rubric? |
| Evaluation | Which reserved prompt and scoring rule measure the fixed model? |
D2 supplies concrete records for (i) pretraining, (ii) supervised fine tuning, and (iii) preference learning. D6 supplies the reserved evaluation record.
Before extracting text, record why the source is in scope.
For this project, a public page enters review for (i) permission, (ii) privacy, (iii) attribution, and (iv) suitability before extraction.
| Record ID | D2.scan |
|---|---|
| Input record | D2.source |
| Original creator | community cooking club |
| Digitized by | archive volunteer |
| Rights basis | written permission |
| Checksum | 9f3a |
| Partition | unassigned |
Illustrative D2.scan record. A checksum is a compact fingerprint for detecting a changed or duplicate file.
| Output record | D2.ocr.reviewed |
|---|---|
| Input record | D2.ocr.raw |
| Operation | correct 2O to 20 |
| Reviewer | reviewer 17 |
| Status | approved |
| Release version | OCR workflow 1.1 |
The pipeline appends this illustrative entry after a reviewer checks D2.ocr.raw.
After each transformation, the pipeline appends an entry to the provenance record.
Bake for 20 minutes.
Illustrative reconstruction of D2.scan.
| Stage | Text |
|---|---|
| raw OCR | Bake for 2O minutes. |
| reviewed | Bake for 20 minutes. |
Optical character recognition, or OCR, converts pixels into proposed characters. Here, the digit zero became the letter O.
The pipeline (i) detects layout, (ii) recognizes characters, (iii) reviews risky regions, (iv) stores corrected text, and (v) preserves the source link.
The single error changes 20 into 2O, so the team adds a targeted check for (i) numbers, (ii) times, (iii) temperatures, (iv) ingredient amounts, (v) names, and (vi) units.
The correction record stores (i) the raw OCR, (ii) corrected text, (iii) reason, (iv) reviewer, (v) date, and (vi) dataset version.
A high exact line accuracy can coexist with a consequential instruction error.
Illustrative audit. Sampling should cover (i) relevant languages, (ii) years, (iii) layouts, (iv) scan qualities, and (v) source types.
| Extracted region | Action and reason |
|---|---|
| lesson heading and sentence | keep with document boundaries |
| navigation and cookie footer | remove as repeated boilerplate |
| teacher phone number | quarantine for privacy review |
Illustrative HTML record and phone number. The pipeline applies (i) deterministic filters, (ii) heuristic procedures, and (iii) statistical classifiers, and it records a reason code for each decision. Sampled audits estimate the resulting errors.
| Record | Text | Decision |
|---|---|---|
| D1 | Let the loaf cool before slicing. | keep canonical copy |
| D4 | Let the loaf cool before slicing. | exact duplicate |
| D5 | Let the loaf cool before slicing. Copyright 2026. | duplicate with a small edit |
Exact deduplication compares identical normalized text or checksums. Deduplication for similar text uses fingerprints that tolerate small edits. D6 remains reserved for evaluation.
Illustrative duplicate records.
Lee et al., Deduplicating Training Data Makes Language Models Better, ACL 2022; Kandpal et al., ICML 2022.
| Illustrative mixture of 100 tokens | Chosen share |
|---|---|
| classroom lessons | 50 |
| school newspapers | 30 |
| general reference pages | 20 |
A mixture is a design decision, so chosen shares can differ from the raw collection. A shard is a manageable file portion used by the training system.
For next token training, the training program shifts each token sequence to construct its targets.
| Input context | Target token |
|---|---|
| Bake | for |
| Bake for | 20 |
| Bake for 20 | minutes |
With self supervision, the training program constructs each target from sequence order.
This illustrative tokenizer treats each displayed word or number as one token. A deployed tokenizer may split text differently.
Cover one token in a complete sentence. Ask learners to predict it before revealing the recorded training target.
Self supervision describes how the training program forms targets from sequence order. People (i) create, (ii) select, (iii) transform, (iv) document, and (v) govern the dataset.
| System work | Purpose |
|---|---|
| tokenization and sharding | prepare stored examples for training |
| storage and data delivery | supply each requested batch |
| compute and optimization | run forward passes, backward passes, and parameter updates |
| monitoring and incident response | detect failures and recover training jobs |
Penedo et al. (2024) report 15 trillion tokens in FineWeb. Soldaini et al. (2024) document an open Dolma corpus of 3 trillion tokens. Provenance and evaluation remain necessary at this scale.
OCR read the cooking time 20 as 2O in a scanned recipe. Explain why a reviewer should correct it. Use two sentences for grade 9.
The digit zero and the letter O can look alike in a scan. A reviewer checks the page and restores the cooking time to 20 minutes.
Supervised fine tuning, or SFT, updates the model toward approved responses to recorded prompts.
Illustrative prompt and approved response derived from D2.ocr.reviewed.
| Stored field | Illustrative value |
|---|---|
| source | D2 corrected text |
| rubric | (i) accuracy, (ii) directness, (iii) grade 9 language |
| origin | written by a person |
| review | independent approval |
| version | SFT OCR 1.2 |
Because a response may be (i) written by a person, (ii) edited from a model draft, or (iii) synthesized and verified, the record stores its origin.
The source ID preserves the path back to D2.ocr.reviewed. The review field records whether another reviewer approved the example.
Additional costs include (i) paid onboarding, (ii) qualification, (iii) repeated labels for an audit subset, (iv) review, (v) adjudication, (vi) management and tools, (vii) breaks and benefits, and (viii) worker support.
Illustrative timing and pay.
Ouyang et al. (2022) document (i) labeler screening, (ii) onboarding, (iii) detailed instructions, and (iv) agreement measurements.
Ouyang et al. (2022) report agreement checks. Fairwork (2023) and the International Labour Organization (2024) discuss conditions in digital labor.
OCR read the cooking time 20 as 2O in a scanned recipe. Explain why a reviewer should correct it. Answer for a grade 9 reader in exactly two sentences.
| Candidate | Response | Judgment |
|---|---|---|
| A | The letter O and the digit zero can look alike in a scan. A reviewer checks the page and restores the cooking time to 20 minutes. | chosen for the rubric |
| B | Optical character recognition can exhibit glyph substitution when the source image has limited contrast. Human verification resolves the ambiguous character class. | accurate content with a reading level above grade 9 |
Illustrative responses. Candidate A better satisfies the stated grade 9 rubric for this prompt.
| Stored field | Illustrative value |
|---|---|
| prompt and candidates | D2 prompt, response A, response B |
| judgment | A chosen; tie and unsure available |
| rubric reason | accurate, direct, grade 9 language |
| rater record | science teacher; independently reviewed |
| dataset version | preference science 1.2 |
The rubric asks for (i) factual accuracy, (ii) two sentences, (iii) grade 9 language, and (iv) a direct answer.
The preference label records which response better satisfies this rubric for this prompt.
In this illustrative reward model, one learnable parameter, q, equals the difference between the two candidate scores. A full reward model calculates both scores from many weights.
| Illustrative calculation | Value |
|---|---|
| score for chosen A | 0.4 |
| score for candidate B | 0.1 |
| illustrative parameter | q=0.4-0.1=0.3 |
| predicted preference | \sigma(q)=\sigma(0.3)\approx0.57 |
The sigmoid function converts the score difference into a 57 percent predicted preference for A. The recorded judgment says that A was chosen.
Illustrative scores. Ouyang et al., InstructGPT, 2022.
The correction supplies the direction for updating the illustrative parameter q.
Illustrative correction. Tutor note: for pairwise logistic log loss, this correction equals the derivative of loss with respect to q.
This illustrative reward model has one parameter, q_{\text{old}}=0.3. Use an illustrative learning rate of 0.2 for the update.
After the optimizer updates q, another forward calculation gives a predicted preference of about 60 percent for A.
Training software uses repeated comparisons across many batches and optimizer updates to train a reward model. A full reward model updates the weights that produce both candidate scores.
Illustrative reward parameter update.
Reinforcement learning from human feedback, or RLHF, uses the trained reward model to score new responses.
Proximal policy optimization, or PPO, uses those scores to update the language model. In InstructGPT, a probability penalty at each token discourages the updated language model from assigning token probabilities that differ greatly from the SFT reference model.
The InstructGPT study, Ouyang et al. (2022), documents separate datasets for (i) SFT demonstrations, (ii) reward model comparisons, and (iii) PPO prompts.
For the D2 prompt, candidate A is chosen and candidate B is rejected. DPO updates the language model from this stored pair.
| Concept | Stored record | Role in the pipeline |
|---|---|---|
| Direct preference optimization, or DPO | (i) prompt, (ii) chosen response, (iii) rejected response | use stored preference pairs as the training records |
| Synthetic SFT data | (i) prompt or response drafted by a model, (ii) provenance, (iii) filters, (iv) review | expand task coverage before supervised fine tuning |
Because generation can repeat model errors or evaluation questions, synthetic records pass through (i) deduplication, (ii) verification, and (iii) targeted human review.
DPO is a training objective for preference records. Synthetic generation is a possible origin for SFT records.
Rafailov et al., DPO, NeurIPS 2023; Wang et al., Self-Instruct, ACL 2023.
| Prompt ID | Evaluation 0042 |
|---|---|
| Source record | D6 |
| Author | teacher A |
| Reviewer | teacher B |
| Access | private |
| Rubric | version 3 |
| Failure category | causal claim |
| Test version | frozen 1.0 |
The prompt and rubric stay private during model choices. Freezing version 1.0 of the evaluation set prevents silent question changes.
| Check | Illustrative method | Result for D6 |
|---|---|---|
| exact text | hash of normalized text | 0 training matches |
| similar text | fingerprint built from sequences of five tokens, with human review at similarity 0.85 or higher | 0 records above threshold |
| source group | compare parent source IDs | 0 shared source groups |
The checks for (i) exact text, (ii) similar text, and (iii) shared source groups answer different contamination questions. The record stores (i) the method, (ii) the threshold, (iii) the result, and (iv) the review status.
Illustrative checks. Contamination checks compare evaluation records with the indexes for every training release.
Report (i) the numerator, (ii) the denominator, (iii) the dataset version, (iv) the scoring rule, and (v) results by relevant topic or group.
Illustrative evaluation result.
For this illustrative calculation, define the population as grade 9 science questions that satisfy evaluation specification 1.0.
Additional evaluation sets are needed for (i) other tasks, (ii) other populations, and (iii) other deployment conditions.
Illustrative interval. NIST and SEMATECH guidance, accessed 2026, describes the Wilson score method for a population proportion.
Data lineage records the source and every transformation through evaluation. Gebru et al. (2021) and Bender and Friedman (2018) provide documentation frameworks for datasets.
| Decision | What it can change | Record for accountability |
|---|---|---|
| source inclusion | represented languages and knowledge | source list, rights basis, exclusions |
| filter selection | retained dialects, formats, and topics | filter version, audit rates, error analysis |
| annotator recruitment | norms used to define a good response | expertise, pay, and agreement |
| selection metric | emphasized and omitted failure modes | rubric, evaluation groups, uncertainty, limitations |
Data work combines (i) technical decisions, (ii) legal decisions, (iii) economic decisions, and (iv) social decisions. Training records and curation choices influence the patterns learned by the model.
In this illustrative grayscale image, 0 represents black. The value 1 represents white. Values between 0 and 1 represent gray.
| 0 | 1 |
| 1 | 0.5 |
Illustrative two by two grayscale patch.
An image encoder is the part of a vision model that represents an image with numerical features. Here, it multiplies the patch vector by a learned weight matrix.
The four rows match the four pixel values. The two columns produce two output values. This matrix is illustrative.
The result, a vector with two values, is a patch embedding. Practical image encoders commonly calculate patch embeddings from larger patches and use a larger embedding dimension, which is the number of columns in W. The optimizer updates the entries of W during training.
Illustrative patch embedding calculation.
Illustrative assistant response.
Unless attributed to a study, numerical classroom examples are illustrative.