# System prompt

> System prompt: The developer's instructions, sent as the first message with the system role. The model gets it in the same sequence as the user's text…

Canonical: https://llmdojo.dev/glossary/system-prompt

Also called system prompts, system message.

The developer's instructions, sent as the first message with the system role. The model gets it in the same sequence as the user's text; it carries more weight only through position and training.

Learn it in the lesson: [System, user and assistant messages](https://llmdojo.dev/learn/prompt-context-engineering/prompt-anatomy/system-and-user) (Prompt and Context Engineering · Anatomy of a Prompt: Roles, Templates and Instruction Hierarchy).

## Interview questions about System prompt

- [A code assistant sends a 2,000-token system prompt and writes long answers. Users complain answers take too long to finish. Will a prefix cache fix it?](https://llmdojo.dev/interview/q/a-code-assistant-sends-a-2-000-token-system-prompt-and-writes)
- [You send a chat API a system message and a user message. What does the model actually receive, and why might the system prompt carry more weight?](https://llmdojo.dev/interview/q/you-send-a-chat-api-a-system-message-and-a-user-message)
- [Design a platform that lets teams evaluate their AI agents and see how changing the system prompt or the model affects quality.](https://llmdojo.dev/interview/q/design-a-platform-that-lets-teams-evaluate-their-ai-agents-and-see)
- [A reviewer says: “The system prompt forbids following instructions in emails, so the forward tool is safe, and our red-team run had zero violations.” Do you accept that?](https://llmdojo.dev/interview/q/a-reviewer-says-the-system-prompt-forbids-following-instructions-in-emails-so)
- [Users ask about events after the model's training cutoff. How should it recognise those questions and say so?](https://llmdojo.dev/interview/q/users-ask-about-events-after-the-model-s-training-cutoff-how-should)
- [Design the routing and scheduling layer in front of an inference fleet that serves many tenants.](https://llmdojo.dev/interview/q/design-the-routing-and-scheduling-layer-in-front-of-an-inference-fleet)
- [What is system-prompt caching, and what does it actually save?](https://llmdojo.dev/interview/q/what-is-system-prompt-caching-and-what-does-it-actually-save)
- [You have two hours to build a working chatbot on the OpenAI API. Walk me through the message schema, session state, context-window strategy, streaming, and handling rate limits and retries.](https://llmdojo.dev/interview/q/you-have-two-hours-to-build-a-working-chatbot-on-the-openai)

## Related
- [Chat template](https://llmdojo.dev/glossary/chat-template)
- [Instruction hierarchy](https://llmdojo.dev/glossary/instruction-hierarchy)
- [Glossary of every term](https://llmdojo.dev/glossary)
