Lesson 1

System Prompts

Setting the role

How System Prompt Changes Behavior

🎭 System prompt is a "role" for AI. Same question, but different answers depending on the setting!

Choose a role:
System Prompt

(empty)

What is recursion?
🤖
Recursion is a programming technique where a function calls itself. It is used to solve problems that can be broken down into smaller subproblems of the same type.
Key Insight

System prompt sets the AI's "personality": communication style, answer depth, formatting. It's the first thing the model sees — and it affects ALL subsequent responses.

System Prompt Templates

Ready-to-use templates for different use cases. Click the copy button to use them in your projects.

1. Basic Assistant

You are a helpful assistant. Answer briefly and to the point.

2. Domain Expert

You are a senior {role} with 10+ years of experience.
Respond as an expert: use professional terminology,
provide practical examples, point out potential pitfalls.

3. Structured Output

You are an assistant that always responds in JSON format.

Response format:
{
  "answer": "your answer",
  "confidence": 0.0-1.0,
  "sources": ["source1", "source2"]
}

4. With Constraints

You are a support assistant for company X.

Rules:
- Only answer questions about company products
- Do not discuss competitors
- Create tickets for technical issues
- Always offer to contact a manager for complex cases

5. With Behavior Examples

You are a code reviewer.

Example of good review:
User: "Check this code: x = x + 1"
Assistant: "Can be simplified to x += 1. Also recommend adding a comment about the variable's purpose."

Example of bad review (DON'T DO THIS):
"Code is bad, redo it"

💡 Tip: Combine elements from different templates to create unique system prompts for your specific needs.