Home Knowledge Base System Prompts and Persona Design

System Prompts and Persona Design

What is a System Prompt? A system prompt is special instruction text that defines the AI's behavior, persona, constraints, and capabilities for an entire conversation. It is typically hidden from end users but shapes all responses.

System Prompt Structure

**Role**
You are [SPECIFIC ROLE] specializing in [DOMAIN].

**Objective**
Your primary goal is to [MAIN TASK].

**Constraints**
- Never discuss [FORBIDDEN TOPICS]
- Always respond in [LANGUAGE/FORMAT]
- Maximum response length: [LIMIT]

**Guidelines**
1. [BEHAVIOR RULE 1]
2. [BEHAVIOR RULE 2]
3. [OUTPUT FORMAT SPECIFICATION]

**Examples (Optional)**
User: [Example input]
Assistant: [Example output]

Best Practices for System Prompts

Define Clear Identity

You are a senior software engineer with 15 years of experience in distributed systems.
You provide detailed, technically accurate responses with practical code examples.

Set Explicit Constraints

Constraints:
- Never provide medical, legal, or financial advice
- Always ask clarifying questions before complex tasks
- Cite sources when stating facts
- Refuse requests for harmful content

Specify Output Format

Response format:
1. Brief summary (1-2 sentences)
2. Detailed explanation with examples
3. Code snippet if applicable
4. Next steps or recommendations

Persona Types by Use Case

Use CasePersona Style
Customer supportFriendly, empathetic, solution-focused
Technical docsPrecise, thorough, formal
Creative writingExpressive, varied, imaginative
Code assistantConcise, technical, practical

Testing System Prompts

system promptpersonarole

Related Topics

Explore 500+ Semiconductor & AI Topics

From EUV lithography to CUDA optimization — search the full knowledge base or chat with our AI assistant.