promptdojo_

The training and prediction loop

Training means learning a pattern from labeled examples. Prediction means applying the learned pattern to a new case. In a real tool, the model may be much larger than a dictionary of rules, but the receipt is the same: model version, input, prediction, confidence or evidence, and review note.

This lesson keeps the code tiny so the workflow is visible. You can inspect how a small ticket router learns from examples, predicts a route, and leaves a receipt a teammate can question.

The builder habit is to never return a naked prediction when a small receipt would make the decision safer.