Smart Sample Pre-processing