The cavity method proceeds by perturbing a large system with the addition of a non-thermodynamic number of additional constituents and approximating the response of the entire system perturbatively. The application of the resulting approximation, along with an assumption that certain observables are self-averaging, yields a self-consistency equation for the statistics of the added constituents. The added constituents are then considered to be the mean-field variables.