run_data_driven_optimize
Starts an automated prompt optimization job on Vertex AI using a dataset and configurable metrics. Provide a config file in GCS and choose between VAPO or Gemini Nano methods.
Instructions
Starts a data-driven prompt optimization job on Vertex AI.
This method uses a dataset and configurable metrics. The config_gcs_path
must point to a JSON file in Google Cloud Storage.
Args: config_gcs_path: The Google Cloud Storage URI (e.g., "gs://your-bucket/config.json") to a JSON file containing the Prompt Optimizer configuration. This is required. service_account: The service account email to run the job. This is required. prompt_optimizer_method: The method for prompt optimization. Either 'VAPO' or 'OPTIMIZATION_TARGET_GEMINI_NANO'. wait_for_completion: If True, the tool will block until the Vertex AI CustomJob completes. Defaults to False.
Returns: A string indicating the status and details of the optimization job, including a link to the Vertex AI console.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| config_gcs_path | Yes | ||
| service_account | Yes | ||
| wait_for_completion | No | ||
| prompt_optimizer_method | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |