Urine infection UTI

My doctor prescribed me with antibiotics for 3 days because I have a urine infection how can I tell when the Urine infection is gone? The pain has gone and symptoms etc. I just want to know it has gone fully so if I have sex it won’t make it worse.