# Prompt optimization

Concept · [Building with AI](https://ecosystem.samcarlton.com/ai)

Also called: prompt optimizer, prompt tuning, prompt iteration, optimizing prompts

Improving a [prompt](https://ecosystem.samcarlton.com/prompt) through repeated [testing](https://ecosystem.samcarlton.com/testing): change it, run it against a set of examples, measure results and keep the better version. Some tools automate the loop.

**For example:** A team [rewrites](https://ecosystem.samcarlton.com/technical-debt) its support [prompt](https://ecosystem.samcarlton.com/prompt) five times and keeps the version that passes the most of its 50 test questions.

## Connects to (5)

- [Prompt](https://ecosystem.samcarlton.com/prompt): The instructions or question you give an AI tool in everyday words.
- [Evals](https://ecosystem.samcarlton.com/evals): Tests that check whether the outputs of a model or an AI product meet the criteria its builders set.
- [Few-shot prompting](https://ecosystem.samcarlton.com/few-shot-prompting): Including a few worked examples in a prompt so the model copies the pattern.
- [System prompt](https://ecosystem.samcarlton.com/system-prompt): Standing instructions that the builder of an AI product gives the model before any user types.
- [Gemini Prompt Optimizer](https://ecosystem.samcarlton.com/gemini-prompt-optimizer): A Google Cloud tool that rewrites a prompt's instructions and tests the versions against examples to find one that scores better.

Map view: https://ecosystem.samcarlton.com/prompt-optimization
