Tutorials

How to Write Better System Prompts for AI Assistants

Design system prompts that keep assistants consistent, useful, and less likely to drift off task.

Robson PereiraMay 27, 20268 min read
System prompt design for a private AI assistant.

How to Write Better System Prompts for AI Assistants

System prompts define the assistant's job, tone, and boundaries. If they are vague, the assistant will feel inconsistent. If they are overcomplicated, the assistant will follow too many rules and none of them well.

Define the assistant's role

Start with a clear identity and purpose. Say what the assistant is for, what it should optimise for, and what it should never do without user approval.

If your assistant is tied to a workflow, read Build Your Own AI Assistant with n8n so the prompt matches the automation around it.

Set output rules

Ask for a specific structure such as summary, recommendation, risks, and next steps. If the assistant should be concise, say so. If it should ask clarifying questions, state the conditions under which it should stop and ask.

Keep the style stable

Tone matters, but consistency matters more. A prompt that forces the assistant to sound clever often makes it less reliable.

Test and refine

Run the same prompt against several examples and keep a note of where the model drifts. Revisions should make the assistant easier to use, not just longer.

See Prompt Tuning for Local LLMs Without Overcomplicating Things for a lighter-weight approach to prompt improvement.

Conclusion

The best system prompts are boring in the right way. They reduce ambiguity, improve consistency, and leave less room for the model to guess what you meant.

Related articles