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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"config_gcs_path": "<config_gcs_path>",
"service_account": "<service_account>",
"prompt_optimizer_method": "<prompt_optimizer_method>"
},
"name": "run_data_driven_optimize"
}
}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 |