Skip to content

[Bug]: Prompt optimzer fails with Prompt template must have a placeholder named 'target' #1648

Open
@visuman

Description

@visuman

File Name

gemini/prompts/prompt_optimizer/vertex_ai_prompt_optimizer_sdk_long_prompt_optimization.ipynb

What happened?

I was using this notebook to run the prompt optimizer.
But the vertex AI job is failing with the following error

Relevant log output

{"Error": "Error: the validation for the template failed: Prompt template must have a placeholder named 'target' See gs://<buket_name>/optimization/optimization_jobs/auto-prompt-design-job-j8qe48uy/error.json for more details.", "Stack trace": "Traceback (most recent call last):\n  File \"/optimize_main.par/google3/cloud/ml/research/llm/instruction_optimization/optimize_main.py\", line 248, in _parse_and_validate_template\n    raise app.UsageError(\nabsl.app.UsageError: Prompt template must have a placeholder named 'target'\n"}

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions