A system prompt is a set of instructions that establishes how an AI should behave before it handles a user’s request. It can define the AI’s role, boundaries, tone, priorities, and response format. The user prompt then supplies the immediate question or task. In practical terms, the system prompt sets the operating rules, while the user prompt says what needs to be done.

Google’s responsible AI guidance also uses “system prompts” to describe prompt templates that add context, instructions, and examples around user input and model output. These elements can guide a model toward safer, higher-quality outcomes, although they do not guarantee a perfect response (Google AI).

This guide is for anyone designing an AI assistant, repeatable workflow, chatbot, content helper, or learning exercise and wondering what instructions belong at the system level.

How system prompts work

Try it in practice Make this section actionable Practice the workflow instead of only comparing tools.

A useful way to understand prompt layers is to separate durable guidance from the request of the moment:

Prompt layerMain purposeExample
System promptSets the role, rules, limits, and default format“You are a study coach. Explain concepts in plain language, ask one question at a time, and never pretend the learner answered correctly.”
User promptGives the current task or input“Help me understand compound interest.”

The system prompt does not need to contain every detail about every future task. Its job is to provide the stable frame. The user can then change the subject or request without redefining the assistant each time.

For example, consider this vague instruction:

Be helpful and answer questions well.

It leaves “helpful” and “well” open to interpretation. It does not identify the audience, desired depth, boundaries, or output structure. A stronger version is:

You are a patient study coach for beginners. Use plain language, define unfamiliar terms, and give one short example. If the question lacks essential context, ask a clarifying question. End with one check-for-understanding question.

The second version gives the model concrete decisions to follow. It defines a role, audience, style, fallback behavior, and response pattern without trying to script every sentence.

The key components of an effective system prompt

Try it in practice Make this section actionable Practice the workflow instead of only comparing tools.

Strong system prompts usually combine a small set of building blocks. Include only the ones that matter for the workflow:

  1. Role and audience: Who is the assistant, and whom is it helping?
  2. Objective: What outcome should it work toward?
  3. Context: What background information is consistently relevant?
  4. Constraints: What should it always do or avoid?
  5. Output format: Should the answer use steps, a table, JSON, short paragraphs, or another structure?
  6. Uncertainty handling: What should happen when information is missing or ambiguous?
  7. Examples: What does a good response look like when wording alone is not enough?

Google’s prompt-design guidance recommends placing critical behavioral constraints, role definitions, and output requirements in the system instruction or at the beginning of the prompt. It also recommends being precise and direct (Google AI).

A reusable template might look like this:

Role: You are [role] helping [audience].
Goal: Help the user [desired outcome].
Rules:
- [important behavior]
- [boundary or restriction]
- [how to handle missing context]
Output: Return [format, length, and tone].
Quality check: Before responding, verify [critical requirement].

This structure is a starting point, not a requirement. Natural-language instructions can work well when they are specific and internally consistent.

How to choose the right system-prompt structure

Try it in practice Make this section actionable Practice the workflow instead of only comparing tools.

Different tasks need different levels of control. Use the lightest structure that makes the desired behavior clear:

Reader intentUseful system-prompt focusRecommended next step
Explore ideasRole, audience, tone, and broad boundariesStart with a short prompt and review several varied outputs
Produce a repeatable formatRequired sections, field names, order, and length limitsCreate test inputs that cover normal and difficult cases
Explain or teachLearner level, teaching method, examples, and checks for understandingTest with both beginner and advanced questions
Handle sensitive or high-stakes topicsScope, refusal or escalation rules, uncertainty handling, and review requirementsAdd human review and evaluate risky edge cases
Transform supplied contentSource boundaries, preservation rules, and output formatTest missing, messy, and contradictory inputs

Examples can clarify patterns that are difficult to describe, but more is not always better. Google notes that models may learn from a few examples, while too many can cause the response to overfit those examples (Google AI). Use examples to demonstrate meaningful distinctions rather than filling the prompt with near-duplicates.

Common mistakes and how to fix them

Try it in practice Make this section actionable Practice the workflow instead of only comparing tools.

Using vague qualities

Try it in practice Make this section actionable Practice the workflow instead of only comparing tools.

“Be professional” may mean different things in a customer-support reply, a technical report, and a lesson for a child. Replace broad adjectives with observable requirements: “Use a calm tone, avoid slang, explain technical terms, and keep the answer under five short paragraphs.”

Combining conflicting rules

Try it in practice Make this section actionable Practice the workflow instead of only comparing tools.

“Be extremely detailed” conflicts with “answer in two sentences.” Decide which requirement matters or state when each applies. For example: “Answer in two sentences by default; provide numbered detail only when the user asks for it.”

Writing an enormous rulebook

Try it in practice Make this section actionable Practice the workflow instead of only comparing tools.

Extra instructions can introduce overlap and contradictions. Group related rules, remove duplicates, and prioritize the few constraints that affect the outcome most.

Treating a system prompt as a guarantee

Try it in practice Make this section actionable Practice the workflow instead of only comparing tools.

A system prompt guides behavior; it is not a security boundary or a substitute for product safeguards and review. Google’s alignment guidance says prompt templates offer less robust control than tuning and can be susceptible to adversarial inputs (Google AI). Design the surrounding workflow with that limitation in mind.

Testing only the happy path

Try it in practice Make this section actionable Practice the workflow instead of only comparing tools.

A prompt that works for one polished example may fail when the input is incomplete, unusually long, ambiguous, or hostile. Test the behavior you care about, not just the wording you hope users will provide.

How to test and improve a system prompt

Try it in practice Make this section actionable Practice the workflow instead of only comparing tools.

Use a small evaluation set that represents the work the assistant will actually face. Include:

  • typical requests;
  • ambiguous requests;
  • missing or contradictory context;
  • requests that should trigger a boundary;
  • several acceptable writing styles or topics;
  • inputs likely to expose formatting failures.

For each test, define pass criteria before looking at the answer. Criteria might include factual fidelity to supplied material, correct format, appropriate tone, acknowledgement of uncertainty, or refusal to perform an out-of-scope task.

Then iterate one variable at a time:

  1. Run the same test set with the current prompt.
  2. Record recurring failure patterns rather than editing after every isolated response.
  3. Change one instruction, example, or ordering choice.
  4. Run the complete set again, including cases that previously passed.
  5. Keep the revision only if it improves the overall results without creating a new recurring failure.

Order can matter, so testing rearranged prompt content is a legitimate experiment (Google AI). For safety-focused evaluation, use cases that were not used to develop the prompt; Google specifically recommends a separate evaluation dataset for measuring prompt-template performance (Google AI).

System-prompt examples for common use cases

Try it in practice Make this section actionable Practice the workflow instead of only comparing tools.

The best system prompt is shaped by the decisions the AI must make repeatedly. These examples show how the same building blocks can serve different goals.

A writing assistant

Try it in practice Make this section actionable Practice the workflow instead of only comparing tools.
You are an editing assistant for busy professionals. Improve clarity and flow
while preserving the writer's meaning, factual statements, and level of certainty.
Do not add new facts. Return the revised text followed by up to three brief notes
explaining the most important changes. If the intended audience is unclear, ask
for it before making a substantial rewrite.

This prompt defines what may change, what must remain intact, and what to do when a crucial input is missing. Compare it with “Make this better,” which gives no standard for improvement and no protection against changing meaning.

A customer-support assistant

Try it in practice Make this section actionable Practice the workflow instead of only comparing tools.
You are a first-line support assistant. Begin by identifying the user's goal.
Use only the product information supplied in the conversation. Give steps in the
order they should be attempted, and ask the user to report the result after each
step. If the supplied information does not answer the question, say what detail
is needed and route the issue for human review. Do not invent account status,
policies, or completed actions.

Here the priority is controlled troubleshooting. The prompt prevents the assistant from claiming access or actions it does not have, and it describes an escalation path instead of forcing an answer.

A learning assistant

Try it in practice Make this section actionable Practice the workflow instead of only comparing tools.
You are a tutor helping an adult beginner learn spreadsheet concepts. Explain one
idea at a time in plain language. Use a small worked example, then ask one question
that checks understanding. Do not move to the next concept until the learner
responds. Correct mistakes directly but respectfully.

The important choice is not merely “friendly tutor.” It is the teaching loop: explain, demonstrate, check, and respond. That behavior can be tested with questions at different difficulty levels and with both correct and incorrect learner replies.

These examples should be adapted, not copied blindly. A writing workflow may require a different definition of preservation; a support workflow needs its actual escalation path; and a tutor needs the right learner level and subject.

Troubleshooting inconsistent results

Try it in practice Make this section actionable Practice the workflow instead of only comparing tools.

When the output misses the mark, diagnose the type of failure before adding more rules.

If the model ignores a requirement: Move the requirement closer to the beginning, state it as an observable action, and remove any conflicting instruction. “Be concise” is difficult to score; “use no more than five bullets” is testable.

If the format varies: Show the exact structure, label required fields, and specify what to return when a field has no value. Test short, long, and incomplete inputs to make sure the structure survives all three.

If answers are too generic: Add the audience, goal, relevant context, and a concrete example of the desired depth. Avoid asking for “more detail” without saying which details matter.

If the assistant makes unsupported additions: Tell it which supplied material it may use, prohibit new facts, and define how it should respond when the material is insufficient. Then test with a question whose answer is deliberately absent.

If instructions work for one task but fail for another: Split the workflow. One overloaded system prompt may be trying to serve incompatible purposes, such as creative brainstorming and strict extraction. Separate prompts make each objective easier to state and evaluate.

If a revision fixes one case but breaks several others: Revert the change and look for the broader pattern. The goal is not to force one preferred answer; it is to improve consistent behavior across representative inputs.

Keep a simple test log with the prompt version, input, result, pass or fail decision, and reason. This turns iteration into a repeatable process and makes it easier to distinguish a durable improvement from a lucky output.

When a system prompt is the right tool

Try it in practice Make this section actionable Practice the workflow instead of only comparing tools.

Use a system prompt when the same behavioral guidance should apply across many requests: a consistent teaching approach, editorial standard, response shape, or escalation rule. Put task-specific material in the user prompt instead. This separation makes the stable instructions easier to maintain and lets users change the immediate task without rewriting the operating rules.

A system prompt is less suitable for information that changes on every request, large bodies of reference material, or controls that must never fail. Variable inputs belong with the current task. Reference material should be supplied through the workflow in a clearly identified context block. Critical permissions, data access, validation, and enforcement should be handled by the surrounding application rather than entrusted to wording alone.

Before adding an instruction, ask three questions: Does this rule apply to most requests? Can its success be observed in the response? Would failure require a safeguard outside the prompt? The answers help keep system prompts focused. They also prevent a common design problem: turning the prompt into a mixture of permanent rules, temporary content, and application logic that becomes difficult to test.

Can one system prompt work across different AI models?

Try it in practice Make this section actionable Practice the workflow instead of only comparing tools.

You can reuse the underlying design—role, objective, constraints, format, and test cases—but treat the exact wording as a portable draft, not a finished universal prompt. When moving to another model or interface, rerun the evaluation set and adjust the instructions based on observed results.

This also applies when a workflow changes. A prompt written for brainstorming may be too loose for structured data, while a strict formatting prompt may make a creative task unnecessarily rigid. Reuse the parts that express durable intent and retest everything that depends on behavior.

Practical next steps

Try it in practice Make this section actionable Practice the workflow instead of only comparing tools.

Start with one real task. Write a short system prompt containing the role, goal, three essential rules, and output format. Create five to ten varied test requests, define what success means, and revise based on patterns across the results. Keep a version history so you can identify which change helped or hurt.

If you want to build your prompting skills through guided learning, explore Coursiv AI lessons.