GoogleCloudPlatform / GoogleCloudPlatform/generative-ai
[Bug]: Prompt optimzer fails with Prompt template must have a placeholder named 'target'
- Dominant language
- Jupyter Notebook
- Stars
- 17.7k
- Forks
- 4.5k
- Avg merge
- 12h 38m
- Merged PRs (30d)
- 42
Description
### 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
```json
{"Error": "Error: the validation for the template failed: Prompt template must have a placeholder named 'target' See gs:///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
- [x] I agree to follow this project's Code of Conduct
Contributor guide
Assessment
This issue has not been assessed yet.