GinfoCoach.
← All articles
Professional Part 5 of 5 4 min read

Prompting like a professional: templates, testing and safety

How teams build prompts that work every time, not just once. Reusable templates, test sets, one change at a time, and the security risk every professional must know.

A beginner writes a prompt that works once. A professional writes a prompt that works every time, for every input, used by other people, months later. That requires a different mindset: treat your prompt like a small piece of software that you design, test and maintain.

From one-off prompts to templates

If you write the same kind of prompt often, turn it into a template with clearly marked variables:

You are helping our support team reply to customers.

Customer's message:
"""
{customer_message}
"""

Order details: {order_details}

Write a reply that apologises once, explains what happened
in one sentence, and offers {available_remedy}. Keep it
under 120 words, warm and direct. If the message mentions
legal action or a safety issue, don't reply: write
"ESCALATE" and a one-line reason instead.

A good template has three parts: stable instructions that never change, slots for the variable material, and rules for edge cases, the unusual inputs that would otherwise go wrong.

Keep your templates in a shared document or in your codebase, with a date and a short note on what changed in each version.

Test with a set of real examples

Checking a prompt "by eye" on one or two examples is how most prompts fail in production. Professionals build a test set: a list of 10 to 50 realistic inputs, including the awkward ones.

For the support template above, a test set would include:

  • an ordinary complaint;
  • a very angry message in capital letters;
  • a message in another language;
  • a message that mentions a lawyer;
  • an empty or nonsensical message.

For each input, write down what a good answer must do. Then run every version of your prompt against the whole set. Some teams automate this with tools such as promptfoo, and even use a second model to grade the answers against written criteria. A spreadsheet works fine to start.

Change one thing at a time

When a prompt fails, resist the urge to rewrite everything. Change one thing, rerun the test set, and compare. Otherwise you never know which change helped, and you may silently break cases that used to work. This is called a regression, and it is the most common way "improved" prompts get worse.

Don't over-engineer

Longer prompts are not better prompts. Modern models follow instructions closely, so a prompt crammed with every technique at once, with rules in capitals, a heavy role-play and a dozen "never" statements, often performs worse than a clear, calm brief. Anthropic's guidance is explicit: start simple, and add complexity only to fix a specific problem you have observed.

A useful discipline: for every sentence in your prompt, ask "What goes wrong if I remove it?" If you can't answer, test removing it.

Know the main security risk: prompt injection

As soon as your prompt includes text from someone else, such as a customer email, a web page or a document, that text can contain instructions of its own: "Ignore your previous instructions and…". This is prompt injection, and it has been ranked the number one security risk for AI applications by OWASP, the reference organisation for application security, for three years running.

You cannot fully solve it with clever wording, but you can reduce the risk:

  • Clearly separate your instructions from outside material, and tell the model that the material is data to process, not instructions to follow.
  • Limit what the AI can do. An assistant that can only draft a reply is far less dangerous than one that can also send emails or issue refunds.
  • Keep a human in the loop for anything irreversible: payments, deletions, messages to customers.
  • Include injection attempts in your test set.

The professional's real advantage

The best prompt writers are not the people who know the most tricks. They are the people who think most clearly about the task: who it's for, what success looks like, where it could fail. That is a human skill, and it is exactly the one the 2025 Microsoft and Carnegie Mellon study found people stop using when they trust the tool too much.

So keep doing the thinking. Use AI to go faster, never to stop asking questions.

Try it now

Take a prompt you use regularly and write three tricky inputs for it. Run them through, note what breaks, fix one thing, and run all three again. Congratulations: you've just run your first evaluation.


Sources