Introduction to System prompts and user prompts
System prompts and user prompts are different instruction sources used in conversational AI applications. System-level instructions generally define the assistant's role, behaviour, and constraints, while user prompts communicate the immediate request.
Separating application-level instructions from user input makes prompts easier to maintain and helps developers build consistent AI experiences.
Core concepts and architecture
Understand message roles such as system, developer, user, and assistant, recognising that supported roles and their precedence depend on the model API.
Learn how system instructions establish behavioural expectations, response constraints, domain context, and output requirements.
Study instruction hierarchy, prompt composition, conversation history, and the distinction between trusted application instructions and untrusted user-supplied content.
Practical implementation
Build a chat request containing an application instruction and a separate user message, then inspect how the model responds to the combined context.
Create reusable system prompts for a customer-support assistant, coding assistant, or document-analysis application.
Test conflicting instructions and ensure the application does not allow untrusted user input to override security-sensitive application rules.
Challenges and trade-offs
Prompt roles alone are not a complete security boundary. Models may still be influenced by malicious or conflicting content.
Overly restrictive system prompts can prevent legitimate user requests, while vague instructions may produce inconsistent behaviour.
Application developers must combine prompt design with authorization, tool restrictions, output validation, and monitoring.
Interview preparation
Explain the difference between system, developer, and user messages in conversational AI.
Describe how application instructions and user input are combined and why separating them improves maintainability.
Discuss instruction conflicts, prompt injection, security boundaries, and why authorization must be enforced outside the model.
Key takeaways
- Understand the purpose and main concepts of System prompts and user prompts.
- Understand how System prompts and user prompts works and how its components interact.
- Be prepared to explain practical implementation and real-world use cases.
- Understand common challenges, limitations, and design trade-offs.
- Practise explaining System prompts and user prompts clearly in a technical interview.