What is prompt engineering?
Prompt engineering is the systematic approach to designing AI instructions that are clear, specific, and optimized for the intended task. Unlike casual AI interactions, business automation requires prompts that are robust, modular, and capable of handling dynamic information while maintaining consistent quality across different scenarios.
Where to use prompts in Cassidy
Prompts serve different purposes depending on where you implement them in Cassidy:
System instructions for Assistants: These are foundational prompts that prime your Assistant for its role and define consistent behavior across all interactions. Think of these as the Assistant's permanent memory and personality that it always remembers. For example, you might configure a customer support Assistant with instructions on tone, response format, and escalation procedures. Configure these in your Assistant settings under Editing and fine-tuning an Assistant.
Chat messages: These work together with your Assistant's system instructions to handle specific requests. While your Assistant already knows how to respond to support tickets from its system instructions, your chat message provides the specific context it needs. Example: "Here's the customer ticket: [ticket description]. The customer has been with us for 2 years and this is their first technical issue."
Workflow action prompts: These are prompts embedded in automated Workflow actions like Generate Text or Generate Text with Cassidy Assistant that process dynamic data and can reference variables from previous steps. Similar to chat messages, these provide the specific context (like ticket details from a form submission) while leveraging any underlying Assistant instructions for consistent behavior.
Core principles of effective prompts
Clarity and specificity: Every instruction should be unambiguous and actionable. Avoid vague language that could lead to inconsistent outputs.
Structured organization: Well-organized prompts follow a logical flow that guides the AI through the reasoning process step by step.
Dynamic context support: Business prompts must accommodate changing information while maintaining output quality and format consistency.
Robust instruction following: Prompts should include explicit formatting requirements and constraints to ensure reliable automation.
Essential prompt structure
Every effective business prompt should follow this seven-section structure:
Role and Objective - Define the AI's role and primary goal
Instructions - Provide detailed, step-by-step guidance for completing the task
Reasoning Steps - Break down the thought process the AI should follow
Output Format - Specify exactly how the response should be structured
Examples - Provide complete examples that demonstrate expected input-output relationships
Context - Include all information and data references the AI needs
Final Instructions - End with explicit step-by-step thinking instructions
1. Role and Objective
Define the AI's role and primary goal. This section establishes context and sets expectations for the task at hand.
# Role and Objective
You are a customer support specialist at a SaaS company. Your objective is to analyze customer feedback and categorize issues by priority level and department for efficient routing.
2. Instructions
Provide detailed, step-by-step guidance for completing the task. Use clear formatting with numbered or lettered sub-points for complex requirements.
# Instructions
- Analyze the customer feedback provided in the context section
- Categorize each issue using the following priority levels:
a. Critical: System outages, security breaches, data loss
b. High: Feature failures affecting multiple users
c. Medium: Minor bugs or usability issues
d. Low: Feature requests or general inquiries
- Assign each issue to the appropriate department: Engineering, Product, or Support
- Format your response as a structured list with priority and department clearly marked
3. Reasoning Steps
Break down the thought process the AI should follow. This ensures consistent logic and helps with complex decision-making tasks.
# Reasoning Steps
1. Read through all customer feedback carefully
2. Identify the core issue or request in each piece of feedback
3. Assess the impact level based on user count and business criticality
4. Determine which team is best equipped to address the issue
5. Format the results according to the specified output structure
4. Output Format
Specify exactly how the response should be structured, including formatting requirements and constraints.
# Output Format
- Return a numbered list of issues with the following format for each:
**Issue [number]**: [Brief description]
- Priority: [Critical/High/Medium/Low]
- Department: [Engineering/Product/Support]
- Details: [Additional context if needed]
- Do not include any introductory or closing text
- Use markdown formatting as specified above
5. Examples
Provide at least one complete example that demonstrates the expected input-output relationship. This enables few-shot learning and clarifies expectations.
# Examples
**Issue 1**: Login system completely down for all users
- Priority: Critical
- Department: Engineering
- Details: Affects entire user base, immediate attention required
**Issue 2**: Export feature missing from reports dashboard
- Priority: Medium
- Department: Product
- Details: Workaround available, but impacts user workflow efficiency
6. Context
Include all information and data that the prompt will reference. This is where you provide the specific context the AI needs to complete the task, which can change depending on the situation.
Note: The "Context" section in your prompt structure is specifically for when you're writing standalone prompts (like in Workflow actions). However, when using Assistants that are already primed with system instructions, you often provide context directly in your chat message or Workflow prompt rather than in a separate context section. For example, if your Assistant is already configured to handle customer support, your chat message might simply be: "Here's today's customer email: [email content]" rather than using a formal context dump.
Depending on where you're using the prompt, you can reference dynamic information in different ways:
In Workflows: Reference variables from previous steps or triggers
In Chat: Reference Knowledge Base items using the "#" key as described in Referencing knowledge base items
In Assistant instructions: Reference Knowledge Base items directly in instructions using Configuring Advanced Model Settings
# Context
Customer feedback: {feedback_data}
Company priority matrix: {priority_guidelines}
Department responsibilities: {dept_responsibilities}
7. Final Instructions
End with explicit step-by-step thinking instructions and any final formatting reminders.
# Final instructions and prompt to think step by step
Think step by step: First, read through all feedback items. Then, assess each issue's impact and urgency. Next, match issues to appropriate departments based on their expertise. Finally, format your response exactly as specified above. Only return the numbered list of categorized issues, nothing else.
Formatting best practices
Different AI models have their own preferred formatting for structure and hierarchy. OpenAI models work exceptionally well with markdown formatting (like the examples throughout this article), while Claude responds better to XML tags like <instructions>
and <examples>
. However, regardless of the specific formatting syntax you choose, the seven-section structure outlined in this guide is the most important element for creating effective prompts.
The key is consistency—once you choose a formatting approach, use it throughout your entire prompt to maintain clarity and help the AI understand the hierarchy of information.
Sample prompts for different use cases
Customer Support Email Generator
# Role and Objective
You are a customer service representative at a SaaS company. Your objective is to generate professional, helpful email responses to customer inquiries based on the inquiry type and company policies.
# Instructions
- Read the customer inquiry carefully and identify the main issue or request
- Determine the appropriate response type: technical support, billing question, feature request, or general inquiry
- Use a professional, empathetic tone that reflects the company's brand voice
- Include relevant troubleshooting steps or next actions when applicable
- Reference company policies or knowledge base articles when appropriate
# Reasoning Steps
1. Analyze the customer's inquiry to understand their specific problem or question
2. Identify the urgency level and emotional tone of the inquiry
3. Select the most appropriate response approach based on the issue type
4. Craft a response that addresses their concern while maintaining professionalism
5. Include clear next steps or follow-up actions
# Output Format
- Subject line that clearly addresses the customer's inquiry
- Professional email body with proper greeting and closing
- Clear, actionable next steps when applicable
- Do not include email signatures, headers, or placeholder text
- Keep responses concise but comprehensive
# Examples
**Customer Inquiry**: "I can't log into my account and I have an important presentation tomorrow. This is really frustrating!"
**Response**:
Subject: Quick Resolution for Your Login Issue
Hello [Customer Name],
I understand how frustrating this must be, especially with your important presentation tomorrow. I'm here to help you get back into your account quickly.
Let's try these steps first:
1. Clear your browser cache and cookies
2. Try logging in using an incognito/private browser window
3. Ensure you're using the correct email address associated with your account
If these steps don't resolve the issue, I can reset your password immediately or set up a quick call to troubleshoot together.
Please let me know if you need immediate assistance, and I'll prioritize your case.
Best regards,
[Your Name]
# Context
Customer inquiry: {customer_message}
Customer account details: {account_info}
Company policies: {policy_guidelines}
Previous interaction history: {interaction_history}
# Final instructions and prompt to think step by step
Think step by step: First, carefully read and understand the customer's inquiry and emotional state. Then, determine the most appropriate response type and tone. Next, craft a helpful response that addresses their specific concern. Finally, ensure your response follows the exact format specified above. Only return the email response, nothing else.
Lead Qualification Analyzer
# Role and Objective
You are a sales operations analyst. Your objective is to analyze incoming leads and score them based on qualification criteria to help the sales team prioritize their outreach efforts.
# Instructions
- Evaluate each lead against the company's qualification criteria
- Assign a lead score from 1-100 based on the scoring matrix provided
- Categorize leads as Hot (80-100), Warm (60-79), or Cold (below 60)
- Identify the primary pain point or business need expressed by the lead
- Recommend the most appropriate next action for the sales team
# Reasoning Steps
1. Review all available lead information including company size, industry, and expressed needs
2. Apply the scoring matrix to calculate the numerical lead score
3. Assess the lead's timeline and budget indicators
4. Determine the lead's decision-making authority level
5. Recommend prioritization and next steps based on the overall assessment
# Output Format
**Lead Score**: [Number]/100
**Category**: [Hot/Warm/Cold]
**Primary Need**: [Brief description]
**Key Insights**:
- [Insight 1]
- [Insight 2]
- [Insight 3]
**Recommended Action**: [Specific next step]
**Priority Level**: [High/Medium/Low]
# Examples
**Lead Information**: TechCorp Inc., 500 employees, manufacturing industry, inquired about automation solutions, mentioned 6-month timeline, CEO submitted the form
**Lead Score**: 85/100
**Category**: Hot
**Primary Need**: Manufacturing process automation to reduce operational costs
**Key Insights**:
- Large company size indicates substantial budget potential
- CEO involvement suggests high decision-making authority
- Specific timeline shows active buying intent
**Recommended Action**: Schedule discovery call within 24 hours with senior sales rep
**Priority Level**: High
# Context
Lead information: {lead_data}
Company scoring matrix: {scoring_criteria}
Industry benchmarks: {industry_data}
Sales team capacity: {team_availability}
# Final instructions and prompt to think step by step
Think step by step: First, thoroughly review all lead information and apply the scoring matrix systematically. Then, analyze the lead's expressed needs and buying signals. Next, determine the appropriate category and priority level. Finally, recommend specific next actions based on the lead's profile and sales team capacity. Only return the formatted lead analysis, nothing else.
Content Performance Report
# Role and Objective
You are a content marketing analyst. Your objective is to analyze content performance data and create actionable insights that help the marketing team optimize their content strategy.
# Instructions
- Review performance metrics for all content pieces in the specified time period
- Identify top-performing content by engagement, traffic, and conversion metrics
- Analyze trends and patterns in content performance
- Provide specific recommendations for content optimization and future strategy
- Highlight any concerning performance drops that need immediate attention
# Reasoning Steps
1. Analyze quantitative metrics including views, engagement rates, and conversions
2. Identify patterns in high-performing vs. low-performing content
3. Assess content performance against established benchmarks and goals
4. Determine which content types and topics resonate most with the audience
5. Formulate actionable recommendations based on the data insights
# Output Format
## Executive Summary
[2-3 sentence overview of key findings]
## Top Performers
1. **[Content Title]** - [Key metric and insight]
2. **[Content Title]** - [Key metric and insight]
3. **[Content Title]** - [Key metric and insight]
## Key Insights
- [Insight about content type/topic performance]
- [Insight about audience engagement patterns]
- [Insight about conversion performance]
## Recommendations
1. **[Action Item]**: [Specific recommendation with rationale]
2. **[Action Item]**: [Specific recommendation with rationale]
3. **[Action Item]**: [Specific recommendation with rationale]
## Areas of Concern
- [Any performance issues requiring immediate attention]
# Examples
## Executive Summary
Blog content showed 23% increase in engagement this quarter, with how-to guides significantly outperforming thought leadership pieces. Video content continues to drive highest conversion rates.
## Top Performers
1. **"Complete Guide to Email Marketing"** - 15,000 views, 8.2% conversion rate
2. **"Product Demo Video Series"** - 12,500 views, 12% conversion rate
3. **"Industry Trends Webinar"** - 8,000 attendees, 6.5% conversion rate
## Key Insights
- Tutorial content generates 3x more engagement than opinion pieces
- Video content has 40% higher conversion rates than text-based content
- Wednesday and Thursday posts receive 25% more engagement
## Recommendations
1. **Increase Tutorial Content**: Develop 2 additional how-to guides monthly based on customer support tickets
2. **Expand Video Strategy**: Convert top-performing blog posts into video format
3. **Optimize Publishing Schedule**: Shift 60% of content publishing to mid-week slots
## Areas of Concern
- Social media engagement dropped 15% month-over-month, requiring immediate strategy review
# Context
Performance data: {analytics_data}
Content inventory: {content_list}
Benchmark metrics: {performance_benchmarks}
Team goals: {quarterly_objectives}
# Final instructions and prompt to think step by step
Think step by step: First, analyze all performance metrics to identify patterns and trends. Then, compare performance against benchmarks and goals. Next, determine which insights are most actionable for the marketing team. Finally, format your analysis exactly as specified above, focusing on clear, actionable recommendations. Only return the formatted report, nothing else.
The power of examples
Examples serve as training data for the AI, demonstrating exactly what you expect. Effective examples should include complete input-output pairs that show the full transformation from raw input to desired output, demonstrate how to handle different scenarios, and match your specified output format exactly.
Advanced considerations
Chain-of-thought reasoning: Always include explicit instructions for the AI to "think step by step" in your final instructions section.
Constraint specification: Use precise language like "Only return the [output type], nothing else" to control exactly what the AI produces.
Error handling: Consider including instructions for handling missing data, ambiguous inputs, or edge cases that might occur in real-world scenarios.
By following this structured approach and adapting the formatting to your chosen AI model, you can create robust prompts that reliably automate business processes and deliver consistent, high-quality results. Remember that effective prompt engineering is iterative—test your prompts with various inputs and refine them based on the results to achieve optimal performance.