System Prompts That Work: A Pattern Catalog
Reusable system-prompt patterns for assistants, extractors, classifiers, and tutors — with the reasoning behind each.
AI & PromptsPDF · 15 pages· v1.0
4.4Reusable system-prompt patterns for assistants, extractors, classifiers, and tutors — with the reasoning behind each.
AI & PromptsPDF · 15 pages· v1.0
4.4The system prompt is the most important and most overlooked part of building anything on top of an LLM — it sets the model's role, boundaries, and output contract for every request. This catalog gives you battle-tested system-prompt patterns for the common kinds of LLM features people actually build, with annotations explaining why each line is there. It's for developers and product builders putting models into real applications: a support assistant, a structured-data extractor, a classifier, a tutor, a writing tool, or a coding helper. You'll move past trial-and-error and understand the anatomy of a system prompt that behaves predictably in production. The catalog covers the universal building blocks (role, capabilities, constraints, output format, refusal and uncertainty handling, tone) and then provides full, annotated system prompts for six application types. It explains how to enforce structured output like JSON, how to handle untrusted user input, how to make the model stay in character, and how to test that your system prompt holds up against edge cases and adversarial inputs. After reading, you'll be able to write a system prompt that reliably constrains a model to your use case, returns output your code can parse, and degrades gracefully when asked something out of scope. Delivered as a single Markdown file with copy-ready, commented prompts.
No. The patterns apply to any model that supports a system/instruction message. Where a provider differs (e.g., how strictly it honors a system role), the guide notes the implication.
Yes. There's a dedicated pattern for structured output, including how to phrase the contract and how to validate and recover when the model strays.
The system prompt sets persistent role and rules for the whole conversation; user prompts are individual requests. The guide explains where to put which instruction and why.
It covers practical mitigations: delimiting untrusted input, scope constraints, and refusal patterns. No system prompt is a complete defense, and the guide is honest about that.
Read the full refund policy and trust & safety terms.