
9/26/2024 · Ivan Nardini, George Lee
What this post added
Introduced Vertex AI Prompt Optimizer, a new service in Public Preview that automates prompt engineering for LLMs. It uses an iterative LLM-based optimization algorithm with an optimizer and evaluator model to generate and evaluate candidate prompts, selecting the best instructions and demonstrations based on user-defined metrics. This service is based on Google Research's paper on automatic prompt optimization (APO) methods and aims to save time and effort in prompt engineering, facilitate prompt migration between models, and enhance the quality of GenAI applications. The post details how to use the Vertex AI SDK for Python to prepare prompt templates, upload labeled samples, configure optimization settings, and run optimization jobs.