Writing a prompt is not typing a question into a chat box. A prompt running in production is a structure that gets versioned and tested like code.
01. Role, Task, Format
A good prompt makes three things clear: the model's role, the job to be done and the expected output format. Writing those three separately produces better results than one long paragraph.
02. Give Examples
Showing a few correct examples beats explaining rules at length. When output format matters, two or three examples end most inconsistency.
03. Structured Output
Ask for a defined set of fields rather than free text. It's essential if the next step has to parse it, and it also reduces the model wandering off topic.
04. Versioning
Prompts belong in the code repository with tracked changes. Editing a production prompt straight from a panel is a silent deployment you can't roll back.
05. An Evaluation Set
After every prompt change, results should be measured on the same set of examples. "It looked better" is not a measurement. Even a small set catches regressions.
06. Edge Cases
Test with empty input, very long input, irrelevant input and hostile input. The inputs causing the most trouble in production are the ones nobody considered during design.