optimize-prompts
/optimize-prompts
Use this to improve a prompt systematically instead of hand-tweaking it by feel. Trigger on "optimize my prompt", "make this prompt better", "the prompt isn't working well", "auto-tune my prompt", "few-shot example selection", or when prompt quality has plateaued. Optimize against an eval set with a method, and let the numbers pick the winner.
- Author
- ContextJet-ai ↗
- Repository
- awesome-llm-observability ↗
- Licence
- CC0-1.0
- Last repository change
- 26.10.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 5
No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.
CC0-1.0, otwarta.
What it does and when to use it
Use this to improve a prompt systematically instead of hand-tweaking it by feel. Trigger on "optimize my prompt", "make this prompt better", "the prompt isn't working well", "auto-tune my prompt", "few-shot example selection", or when prompt quality has plateaued. Optimize against an eval set with a method, and let the numbers pick the winner.
Triggers from the description
Original author description
Use this to improve a prompt systematically instead of hand-tweaking it by feel. Trigger on "optimize my prompt", "make this prompt better", "the prompt isn't working well", "auto-tune my prompt", "few-shot example selection", or when prompt quality has plateaued. Optimize against an eval set with a method, and let the numbers pick the winner.
How it works
- Prerequisite: you need an eval set
- The levers, cheapest first
- Automate the search (when hand-tuning plateaus)
- Guardrails on optimization
- Verify
- Anti-patterns
- Grounding
SKILL.md preview
--- name: optimize-prompts description: Use this to improve a prompt systematically instead of hand-tweaking it by feel. Trigger on "optimize my prompt", "make this prompt better", "the prompt isn't working well", "auto-tune my prompt", "few-shot example selection", or when prompt quality has plateaued. Optimize against an eval set with a method, and let the numbers pick the winner. license: CC0-1.0 --- # Optimize prompts (with a method, not vibes) Hand-tuning a prompt and eyeballing one output tops out fast and quietly overfits to the last example you looked at. Systematic prompt optimization treats the prompt as something you search over, scored by an eval set. ## Prerequisite: you need an eval set You cannot optimize what you cannot measure. Build an eval set first (`build-eval-dataset`) and wire up scoring (`add-llm-evals`). The optimization loop is: propose a prompt variant, score it on the eval set, keep the winner. Everything below is a smarter way to propose variants. ## The levers, cheapest first 1. **Instructions.** Clarify the task, add constraints, specify the output format. The highest-leverage and cheapest change. 2. **Few-shot examples.** Adding 2-5 good examples often beats a longer instruction. *Which* examples matters a lot; select them from your eval/production data, and measure (more examples is not always better, and they cost input tokens). 3. **Output structure.** Ask for structured output (JSON/enum) when you need reliability; add a short reasoning step before the answer when quality needs it. 4. **Decomposition.** Split one overloaded prompt into a small pipeline of focused steps (each independently evaluable). ## Automate the search (when hand-tuning plateaus) Once you have an eval metric, use an optimizer instead of manual trial-and-error: - **Auto instruction search (APE-style):** have an LLM propose many instruction candidates, score each on the eval set, keep the best. - **Few-shot / demonstration optimization:** algorithmically select which examples to include (this is often a bigger win than instruction wording). - **Frameworks:** [DSPy](https://github.com/stanfordnlp/dspy) compiles and optimizes prompt pipelines against a metric (bootstrap few-shot, MIPRO); [promptfoo](https://github.com/promptfoo/promptfoo) and several eval platforms support prompt experiments/comparison. Let the optimizer + metric pick, not your intuition. ## Guardrails on optimization - **Hold out a test split** so you optimize on one set and validate on another, otherwise you overfit the prompt to your eval examples. - **Change one lever at a time** when doing it by hand, so you know what moved the score. - **Watch cost too:** a prompt that adds 6 few-shot examples for +2% quality may not be worth the token cost. Optimize quality *per token* where cost matters. - **Re-optimize on model change:** a prompt tuned for one model can underperform on another. ## Verify - The chosen prompt beats the baseline on a held-out split, not just the training examples. - You have the scores to show it (a table, not "it feels better"). - Cost/latency did not quietly blow up for a small quality gain. ## Anti-patterns - Tuning against a handful of examples with no held-out validation (overfitting). - Piling on few-shot examples without measuring (token cost balloons, quality may not). - Optimizing prompt wording when the real fix is retrieval or decomposition. - Declaring a winner from one side-by-side output instead of an eval run. ## Grounding Automatic instruction optimization: APE, Zhou et al. 2022 ([arXiv:2211.01910](https://arxiv.org/abs/2211.01910)). Programmatic prompt/pipeline optimization: DSPy, Khattab et al. ([arXiv:2310.03714](https://arxiv.org/abs/2310.03714)); MIPRO, Opsahl-Ong et al. ([arXiv:2406.11695](https://arxiv.org/abs/2406.11695)). All optimization is scored against an eval set (see `build-eval-dataset`).
Versions
The database has no other skills named optimize-prompts.
Database snapshot: 13.11.2026 · package version ec44c94e4618 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100tune-prompt-management
Tune Prompt Management — optimize token usage, A/B test configuration, few-shot example selection, template compression, prompt caching. Use when: tune, optimize prompts. - 100tune-prompt
Systematically optimize prompts for a task — few-shot, chain-of-thought, structured output. Use when asked to "optimize this prompt", "add chain-of-thought", or "improve structured output". - 84optimize-prompt
Optimize prompts for better AI performance. Use when user says "improve this prompt for better results", "optimize this prompt to reduce tokens", "apply prompt engineering best practices to this", "make this prompt more effective", "help me refine this system prompt", or "tune… - 100opik-optimize
Improve a prompt with the Opik Agent Optimizer — resolve the prompt, a dataset, and a metric, pick the algorithm, run a bounded optimization, check the gain on held-out data, and save the winner as a new prompt version with the optimization run link. Runs via the opik-optimizer… - 100opik-optimize
Improve a prompt with the Opik Agent Optimizer — resolve the prompt, a dataset, and a metric, pick the algorithm, run a bounded optimization, check the gain on held-out data, and save the winner as a new prompt version with the optimization run link. Runs via the opik-optimizer… - 100prompt-design
Design production prompts — system prompt architecture, instruction clarity, few-shot selection. Use when asked to "write a system prompt", "design a production prompt", or "pick few-shot examples for this task".