Chapter 1 · Practice 3 of 4
Keep prompts in version control and tag every call with the prompt version
Why it matters
A prompt is code. When quality drops, you need to know whether the prompt, the model or the input changed, and that is only possible if prompts have a history.
- Store each prompt in the repository.
- Review changes in pull requests, like any other code.
- Give each version an id.
- Log that id with every model call.
Avoid editing prompts directly in a production dashboard with no history. If non-developers need to tune wording, give them a workflow that still produces a versioned change and runs your evals before it ships.