System Prompts and Role Setting
System Prompts and Role Setting
What is a System Prompt?
A system prompt sets the context, personality, and constraints for the model before the conversation begins. It's the most powerful tool for controlling model behavior.
Anatomy of an Effective System Prompt
You are a senior Python developer specializing in FastAPI applications.
## Your Role
- Review code for bugs, security issues, and performance problems
- Suggest improvements following Python best practices (PEP 8, type hints)
- Explain your reasoning clearly
## Guidelines
- Always consider edge cases and error handling
- Prefer explicit over implicit
- If you're unsure about something, say so
- Provide code examples when suggesting changes
## Output Format
For each issue found:
1. Location (file/line)
2. Severity (Critical/Warning/Info)
3. Description
4. Suggested fix with code
Key Principles
- Be specific: "You are a financial analyst" is better than "You are helpful"
- Define boundaries: What should the model NOT do?
- Set output format: Markdown, JSON, specific structure
- Include examples: Show the expected interaction pattern
- Prioritize instructions: Put the most important rules first
Common Patterns
- Expert persona: "You are a [domain] expert with [N] years of experience"
- Constraint-based: "Always respond in JSON. Never include personal opinions."
- Process-oriented: "First analyze the input, then identify issues, then suggest solutions"
🌼 Daisy+ in Action: Role-Based System Prompts
Each Daisy+ digital employee has a carefully crafted system prompt that defines their role, permissions, and personality. DaisyBot's system prompt instructs it to be helpful but honest, to reference actual ERP data, and to escalate to human team members when uncertain. Different agents have different system prompts — an accounting agent is precise and formal, while a customer support agent is warm and conversational.
Rating
0
0
There are no comments for now.
Join this Course
to be the first to leave a comment.