define sample according to sample_q_and_a