Skip to content

AI prompts as part of the documentation

Prompts need documenting because they hold business rules. Record the goal, each version with its reason, test examples and who owns the rule in the business.

First published Updated 3 min readDeutsche Fassung

Prompts need documenting because they hold business decisions: which sources count, which categories apply and which output is good enough. If only the wording survives, nobody remembers why those rules were chosen. So record the goal of the prompt, every version with the reason for the change, test examples and who owns the business rule.

I am COO and Chief AI Officer at SUMAX in Dortmund, Germany, and since 2023 I have been moving the company onto AI together with the team. To me, process knowledge belongs in one place, not in individual heads and spreadsheets. Prompts are process knowledge, even when they look like a few technical lines.

The hidden business rule in a prompt

An example: a prompt is supposed to assign every customer inquiry to a topic. The sentence sounds finished, but it leaves three business decisions open. Which topics are on the list? What happens when an inquiry raises more than one issue? At what point does an assignment count as uncertain, so the inquiry goes to a person?

The list of categories is the actual business rule. The business side decides on it, and the technical side implements it. The documented version therefore records three things: the list of topics, a rule for inquiries with more than one issue and the threshold at which an inquiry goes to a person. Test examples come on top, including the edge cases from daily work. Only the business side can supply them, because only they know which inquiries actually come in.

Without that, a small edit to the text can change the workflow without anyone noticing. If the test examples run again after every change, a drift shows up before it surfaces in daily work.

The sentence sounds finished, but it leaves three business decisions open.

Comparison using a prompt that is supposed to assign every customer inquiry to a topic. With only the sentence in the prompt, three questions stay open: which topics exist, what happens with more than one issue and when an assignment counts as uncertain; nobody notices an edit to the text. The documented version sets the list of topics, a rule for more than one issue and the handover to a person, and test examples reveal a drift after every change.

Record the goal next to the wording

A system prompt is a business rule written as text. So next to the wording, record what task it is meant to solve and how to recognize a usable result. Examples of output that fits and output that doesn't make the intent concrete.

If you know the goal, you can judge a change without knowing prompt engineering. That lets the business side have a say without understanding every technical detail. Without a recorded goal, every change is guesswork.

Make changes traceable

Changing a prompt means changing a rule. Every change therefore comes with a version, a date, a reason and a test result. A language model doesn't necessarily return the same output for the same prompt, and hallucinations happen. That is why test examples check the result, because the wording alone doesn't show it. A version without a test example is incomplete.

The model in use belongs in the record too. Between our applications and the AI models sits our own layer, which lets us switch the model. For the prompts, every switch is a change to the business logic, and all test examples run again afterward. If a result differs, the business side decides whether the prompt or the test example gets adjusted.

Our rule is that no AI result goes out unchecked. Test examples make that check repeatable with every change.

Keep the knowledge open to the team

Prompts belong in one central place that everyone involved can find. In Word files, Excel sheets and folders, versions and ownership get lost. Git handles versions well but is usually too technical for business teams. A prompt management tool or your own central layer solves both. Which product you pick matters less than having that one place.

Our own layer shows how far a change reaches. Tens of thousands of AI calls run through it every month, and each one is booked with its cost. A prompt changed there affects every call that uses it.

Most of the upkeep falls on the business side, because it supplies the business rules and the test examples. A prompt library pays off once several people handle the same tasks with AI. For a prompt someone writes once for themselves and then throws away, it doesn't.

A template for the documentation

For every prompt that sits inside a workflow, eight fields are enough:

  • purpose
  • input
  • expected output
  • categories and business rules
  • version with date and reason for the change
  • test examples, including edge cases
  • who owns the business rule
  • model in use

The template works for any other prompt collection in the company as well. The most important field is the test examples, because only with them can you judge a change at all.

Further reading

    ↑ ↓ select · Enter open · Esc close