I'm looking for a metric that would quantify how far a sample is out of domain from an already trained model. I was thinking of training an unsupervised ml model to make a cluster with all the samples that have been used to train the model, and the distance of another sample from the centroid of this cluster could act as an out of domain evaluator. However, this solution seems a little simplistic and DIY to me. Would you have any better ideas? Have any models already been developed for this? Thanks in advance. Continue reading...