A hierarchic adaptive mathematical model consisting of a sequence of integral differential equations of increasing complexity is proposed for description of the stress-strain behavior of viscoelastic media. Adaptive identification of the model to the behavior of the real viscoelastic medium occurs at each step in the hierarchy. It is shown that the fundamental criterion of adaptation quality is then the minimum of a linear combination of the absolute value of the sample median and its sample absolute median deviation, both calculated from the mismatch signal between the initial (experimental) data and calculated data obtained by prediction on the basis of the model considered. The criterion for transition of the model to the next step in the hierarchy is comparison of the sample variance of the mismatch signal with a certain threshold. No additional a priori information on the error of the data is used. Numerical experiments are run on model problems, along with certain practical calculations for real viscoelastic media.