Automatic Prompt Optimization with "Gradient Descent" and Beam Search