We propose a recursive algorithm for dividing a presumably mixed production batch of semiconductor devices into homogeneous groups (clusters) with the use of data of non-destructive testing, based on the maximization of the silhouette criterion in the sequential solving of the k-Means clustering problems. Based on the silhouette criterion, we formulate the concept of homogeneity of a production batch. The application of the developed algorithm to the problem of formation of homogeneous production batches of integrated circuits for space industry is illustrated with a computational example.