Skip to content
Query Feedz
  • News
  • Business
    • Digital Marketing
      • Marketing & Sales
      • SEO
      • Content Marketing
      • AEO and GEO
    • Startups
      • Founder Stories
      • Funding & VC
      • Product & Growth
    • Money
      • Investing
      • Markets & Economy
      • Saving & Budgeting
  • AI & Technology
    • Technology
      • Consumer Tech
      • CRM
      • Cyber Security
      • Software Engineering
      • WordPress
      • Hardware
    • Artificial IntelligenceAI Glossary
      • LLMs
      • Machine Learning
      • AI Fundamentals
      • Generative AI
      • Deep Learning
    • AI Use Cases
      • Automation
      • Content
      • Customer Support
      • Finance
      • Marketing
      • View All
  • Tools & Software
  • Account
    • Submit Guest Post
    • Submit a tool
    • My listing
  • Contact
QueryFeedz
  • News
  • Business
    • Digital Marketing
      • Marketing & Sales
      • SEO
      • Content Marketing
      • AEO and GEO
    • Startups
      • Founder Stories
      • Funding & VC
      • Product & Growth
    • Money
      • Investing
      • Markets & Economy
      • Saving & Budgeting
  • AI & Technology
    • Technology
      • Consumer Tech
      • CRM
      • Cyber Security
      • Software Engineering
      • WordPress
      • Hardware
    • Artificial IntelligenceAI Glossary
      • LLMs
      • Machine Learning
      • AI Fundamentals
      • Generative AI
      • Deep Learning
    • AI Use Cases
      • Automation
      • Content
      • Customer Support
      • Finance
      • Marketing
      • View All
  • Tools & Software
  • Account
    • Submit Guest Post
    • Submit a tool
    • My listing
  • Contact
QueryFeedz
  1. Home /
  2. AI Glossaries /
  3. LLMs /
  4. What is a System Prompt?
LLMs

What is a System Prompt?

Updated September 21, 2026 Read 3 min

A system prompt is a set of instructions given to an AI model, usually by the developer, that defines its role, rules, tone and boundaries for an entire conversation, separate from the user's individual messages.

Contents 11
  1. 01Key takeaways
  2. 02A system prompt explained in simple terms
  3. 03System prompt vs user prompt
  4. 04What to include in a system prompt
  5. 05A worked example
  6. 06Best practices
  7. 07Security limits
  8. 08Limitations
  9. 09Common Use Cases
  10. 10Frequently Asked Questions
  11. 11Related Terms

A system prompt is a set of instructions, usually written by the developer or organisation, that tells an AI model how to behave throughout a conversation. It defines the assistant’s role, rules, tone, knowledge boundaries and output format. Users typically do not see it, but it shapes every response. System prompts are one of the most important tools for turning a general LLM into a specific product.

Key takeaways

  • System prompts set persistent behaviour; user prompts make individual requests.
  • Models are trained to give system instructions higher priority than user messages.
  • A good system prompt covers role, audience, rules, knowledge sources, format and edge cases.
  • System prompts are not a secure secret store; they can sometimes be revealed.
  • They should be versioned and tested like code.

A system prompt explained in simple terms

When a company hires a receptionist, it gives a briefing: who we are, how to greet visitors, what you can and cannot share, when to call a manager. Visitors never see that briefing, but it shapes every interaction. A system prompt is that briefing for an AI assistant.

System prompt vs user prompt

AspectSystem promptUser prompt
Written byDeveloper or organisationEnd user
ScopeWhole conversationSingle request
PurposeRole, rules, format, boundariesSpecific question or task
PriorityGenerally higherWorks within system rules
VisibilityUsually hiddenVisible

Most chat APIs mark messages by role: system (or developer), user and assistant. Models learn during instruction tuning and preference training to follow this hierarchy.

What to include in a system prompt

  • Role and purpose: who the assistant is and what it is for.
  • Audience: who it serves and their expertise level.
  • Knowledge rules: use only provided documents; say when information is missing.
  • Behaviour rules: what to do, what to avoid, when to escalate to a human.
  • Tone and style: formal or casual, length, language, spelling.
  • Output format: structure, markdown, or structured output such as JSON.
  • Edge cases: off-topic questions, abusive messages, sensitive topics.

A worked example

“You are the support assistant for QueryFeedz, a publishing platform for writers.

Audience: writers and editors with basic technical knowledge.

Rules: Answer only using the help-centre articles provided in the context. If the answer is not in the articles, say you don’t know and offer to connect the user with the support team. Never promise refunds or discuss other customers’ accounts.

Style: friendly, clear, under 120 words, UK English. Use numbered steps for instructions and end with the most relevant article link.”

This prompt sets role, audience, a grounding rule that reduces hallucination, limits, style and format in a few lines.

Best practices

  • Be clear and specific; explain the reason behind important rules.
  • Organise with headings or tags so sections are easy to follow.
  • Put stable content first to benefit from prompt caching.
  • Include a few examples if format matters (few-shot prompting).
  • Test with real and adversarial user messages.
  • Keep it as short as possible while covering what matters; very long prompts can dilute key rules.

Security limits

  • Prompt injection: users, or text inside documents and web pages, can try to override instructions (“ignore previous instructions”).
  • Prompt leakage: users may coax the model into revealing its system prompt, so never put passwords, API keys or confidential data in it.
  • Defence in depth: enforce critical rules in application code, permissions and filters, not only in the prompt.

Limitations

  • Models do not follow system prompts perfectly every time.
  • Conflicting or vague rules produce inconsistent behaviour.
  • Long conversations can weaken adherence.
  • Different models interpret the same system prompt differently.

Common Use Cases

01

Customer support bots

Define role, policies, escalation rules and tone for support assistants.

02

Branded writing tools

Enforce house style, spelling and format across outputs.

03

Internal knowledge assistants

Restrict answers to company documents with citations.

04

Structured data apps

Require JSON output that matches a schema.

05

Education tutors

Set teaching style, level and rules such as guiding rather than giving answers.

06

AI agents

Define goals, tool usage rules and safety limits for agent workflows.

Frequently Asked Questions

Developer-written instructions that define an AI model's role, rules, tone and format for a whole conversation.

A system prompt sets persistent behaviour for the whole conversation. A user prompt is an individual request.

Usually not directly, but it can sometimes be revealed through clever prompting, so never store secrets in it.

Role, audience, knowledge rules, behaviour limits, tone, output format and handling of edge cases.

It helps, but it is not enough alone. Critical rules should also be enforced in code and permissions.

Related Terms

  • Prompt Engineering
  • Instruction Tuning
  • Prompt Injection
  • Structured Output
  • Few-Shot Prompting
  • Large Language Model

Related AI Terms

What is Positional Encoding?Positional encoding is the method transformers use to represent the order of tokens in a sequence, because the…What is Self-Attention?Self-attention is a mechanism where each position in a sequence attends to every other position in the same…What is an Attention Head?An attention head is a single attention unit inside a transformer layer, with its own query, key and…What is Prefix Tuning?Prefix tuning is a parameter-efficient fine-tuning method that learns trainable vectors inserted into the attention keys and values…What is RoPE (Rotary Positional Embedding)?RoPE (rotary positional embedding) encodes a token's position by rotating its query and key vectors by an angle…What is Multi-Head Attention?Multi-head attention runs several attention operations in parallel, each with its own learned projections, so a model can…

Contents

  1. 01Key takeaways
  2. 02A system prompt explained in simple terms
  3. 03System prompt vs user prompt
  4. 04What to include in a system prompt
  5. 05A worked example
  6. 06Best practices
  7. 07Security limits
  8. 08Limitations
  9. 09Common Use Cases
  10. 10Frequently Asked Questions
  11. 11Related Terms

AI Topic

  • LLMs

Related Terms

  • What is Positional Encoding?
  • What is Self-Attention?
  • What is an Attention Head?
  • What is Prefix Tuning?
  • What is RoPE (Rotary Positional Embedding)?
  • What is Multi-Head Attention?

Quick Navigation

  • Common Use Cases
  • Frequently Asked Questions
  • Related Terms
  • Back to top

Details

Updated
September 21, 2026
Read
3 min
  • Forum
  • Submit a tool
  • Submit Guest Post
  • List Your Startup
  • Privacy Policy
  • Editorial Policy
  • Account
  • Contact
  • AI Productivity
  • AI Video
  • AI Coding
  • AI Chatbots
  • Sales
  • AI Business
  • View All Tools

Subscribe our Newsletter

Get weekly exclusive content - No spam.

Copyright © 2026 -  Query Feedz

Manage Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
  • Manage options
  • Manage services
  • Manage {vendor_count} vendors
  • Read more about these purposes
View preferences
  • {title}
  • {title}
  • {title}