Rejection Sampling in Generative AI Models