New AI tools could help doctors choose the right amount of pain medicine for each patient after surgery. This could make care safer and more personal.