system prompt
An instruction set provided to an LLM before the user conversation begins. Sets the model's persona, rules, output format, and constraints.
Syntax
prompt-engineering
{ role: "system", content: "You are a helpful assistant..." }Example
prompt-engineering
// System prompt example:
"You are a senior TypeScript engineer.
Respond only with code and brief explanations.
Always include TypeScript types.
Do not use any libraries unless specified."
// This shapes ALL subsequent responses in the conversation.