liveBook · Manning

Cross-validation

As explained in Building LLM Applications with DSPy

Cross-validation is an evaluation technique that repeatedly partitions data into training and validation subsets to produce a more reliable estimate.

Cross-validation estimates model skill by repeatedly splitting one dataset into training and validation sets. Repeating the split reduces sensitivity to which examples happen to land in each set, making the estimate more reliable than a single split. section 4.1.2

The trade-off is cost: repeated evaluation takes more work than a single train-validation-test split. It is more common in traditional machine learning, where evaluations do not incur language-model call costs; use it where the added reliability warrants the expense. section 4.1.2

How Building LLM Applications with DSPy covers it

How deep it goes
Explains repeated training-validation splits, their reliability benefit, and their cost without detailing implementation.
What you can do after
Evaluate model skill using repeated splits and weigh greater reliability against added cost.
How it connects
Connects training sets and validation sets to model evaluation and train-validation-test splits.

Also explained in

Compare how 12 books explain cross-validation →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Building LLM Applications with DSPy. The section links point to the parts of the book it draws on.