Think Build Implement Repeat
London, UK +44 7367 067226
WhatsApp FOLLOW f in X
Python & Django

Treating Prompts as Configuration

Last updated:

Prompts change more often than code

A prompt is adjusted when output quality shifts, when the business changes its terminology, or when a provider updates a model. That happens far more often than the surrounding code changes.

A prompt embedded in a function requires a deployment to change. In configuration, it requires an evaluation run and a configuration update, which is the right level of ceremony.

What good management looks like

  1. Versioned, with a history of what changed and why
  2. Tested against the evaluation set before going live
  3. Rollback in one action to the previous version
  4. Recorded on every output, so results can be explained
  5. Reviewable by someone who understands the business, not only a developer

Test every change

  • Run the full evaluation set before deploying
  • Compare the score against the current version
  • Look at what changed, not just the total
  • Block the change if the score drops beyond normal variation

Prompt changes have side effects. Improving one behaviour frequently degrades another, and only the evaluation set reveals it.

Record the version on every output

When an output is questioned months later, the answer requires knowing which prompt and which model produced it. Recording both costs nothing and is the difference between explaining and guessing.

It is also what lets you correlate a quality change with the change that caused it.

Keep them readable

PracticeWhy
Plain language, not shorthandOthers must be able to change it
Comments on non-obvious instructionsNobody removes them by accident
One prompt per taskTestable independently
Examples in the prompt kept currentThey drift from reality
No hard-coded business rulesThose belong in code

Frequently asked questions

Should prompts be in a database or files?

Either, versioned. Files in version control give you history and review for free; a database gives non-technical editing.

Who should be able to change prompts?

Whoever understands the business requirement, with an evaluation run gating the change. Not only developers.

How often do prompts need changing?

Every few months in a stable system, more often initially. Provider model updates are a common trigger.

What about prompt injection?

Treat all user input as untrusted, keep it clearly separated from instructions, and never let it reach a tool call without validation.

Keep reading

Prompts buried in code?

Moving them to versioned configuration is a small change that makes everything else easier.

Book a free 30-minute call Get a project estimate WhatsApp us

Related services

What we build for problems like this one

Custom Software DevelopmentWeb DevelopmentMachine Learning