Prompt Engineering
Best practices for writing effective AI prompts
Effective prompts are the key to reliable AI outputs. This guide covers techniques for writing prompts that produce consistent, high-quality results.
Prompt Structure
The Three-Part Formula
- Context - Who the AI is and the background
- Task - What you want the AI to do
- Format - How the output should be structured
liquid
Context:
You are a sales analyst reviewing customer meetings.
Task:
Identify the key concerns raised by the customer in this meeting.
Format:
List each concern as a bullet point with a brief explanation.
Writing System Messages
Be Specific About Role
❌ Too generic:
text
You are a helpful assistant.
✅ Specific:
text
You are a sales meeting analyst specializing in B2B SaaS deals.
You identify customer needs, objections, and buying signals.
Set Clear Constraints
liquid
You are a meeting summarizer.
Constraints:
- Maximum 3 sentences
- Focus only on business outcomes
- Do not include names of individuals
- Use professional language
Include Examples (Few-Shot)
liquid
You are a sentiment classifier for sales meetings.
Examples:
- "We're excited to move forward" → Positive
- "We need to discuss budget internally" → Neutral
- "This doesn't seem like the right fit" → Negative
Now classify the following:
Writing User Messages
Provide Complete Context
Include all information the AI needs:
liquid
Meeting Details:
- Title: {{ json.meeting.title }}
- Date: {{ json.meeting.startTime | date: "%B %d, %Y" }}
- Duration: {{ json.meeting.durationMinutes }} minutes
- Attendees: {{ json.meeting.attendees | map: "name" | join: ", " }}
Meeting Content:
{{ json.callRecording.transcriptSummary }}
Use Clear Delimiters
Separate sections clearly:
liquid
=== MEETING INFO ===
Title: {{ json.meeting.title }}
Date: {{ json.meeting.startTime }}
=== ATTENDEES ===
{% for attendee in json.meeting.attendees %}
- {{ attendee.name }} ({{ attendee.email }})
{% endfor %}
=== TRANSCRIPT ===
{{ json.callRecording.transcriptSummary }}
=== END OF MEETING DATA ===
Ask Specific Questions
❌ Too broad:
text
What happened in this meeting?
✅ Specific:
text
Based on this meeting:
1. What were the customer's main concerns?
2. Were any decisions made? If so, what?
3. What are the agreed-upon next steps?
Output Formatting
For String Outputs
liquid
Provide a summary in exactly 2-3 sentences.
Do not use bullet points.
Do not include a header or title.
Start directly with the content.
For List Outputs
liquid
Return a list of action items.
Each item should:
- Start with an action verb
- Be a complete sentence
- Be specific and actionable
Example format:
- Send the proposal to the client by Friday
- Schedule a follow-up call for next week
For Boolean Outputs
liquid
Determine if this meeting requires urgent follow-up.
Return true if ANY of these conditions are met:
- Customer expressed dissatisfaction
- A deadline was mentioned within 48 hours
- Competitive threat was discussed
- Budget concerns were raised
Return false otherwise.
For Numeric Outputs
liquid
Rate the overall meeting sentiment from 1 to 10.
Scale:
1-3: Negative (concerns, objections, disengagement)
4-6: Neutral (informational, exploratory)
7-10: Positive (enthusiasm, commitment, progress)
Return only the number, nothing else.
Common Prompt Patterns
Summarization
liquid
System:
You are a meeting summarizer. Create concise, actionable summaries.
User:
Summarize this meeting for a sales manager who wasn't in attendance.
Focus on:
- Key discussion points
- Decisions made
- Next steps
Meeting: {{ json.meeting.title }}
Content: {{ json.callRecording.transcriptSummary }}
Extraction
liquid
System:
You are an information extractor. Extract only explicitly stated information.
Do not infer or assume anything not directly mentioned.
User:
Extract all action items from this meeting.
An action item must have:
- A clear task
- Ideally an owner (if mentioned)
- Ideally a deadline (if mentioned)
Content: {{ json.callRecording.transcriptSummary }}
Classification
liquid
System:
You are a meeting classifier for sales teams.
Categories:
- DISCOVERY: Initial exploration of needs
- DEMO: Product demonstration
- NEGOTIATION: Pricing and terms discussion
- CLOSING: Final decision-making
- CHECK_IN: Existing customer touchpoint
- OTHER: Doesn't fit other categories
User:
Classify this meeting into exactly one category.
Meeting: {{ json.meeting.title }}
Summary: {{ json.callRecording.transcriptSummary }}
Return only the category name in uppercase.
Analysis
liquid
System:
You are a deal analyst specializing in B2B sales.
Identify risks and opportunities in sales conversations.
User:
Analyze this meeting for deal health indicators.
Identify:
1. Positive signals (buying interest, urgency, engagement)
2. Risk factors (objections, competition, delays)
3. Missing information (unknowns that should be clarified)
Meeting: {{ json.meeting.title }}
Content: {{ json.callRecording.transcriptSummary }}
Handling Edge Cases
Missing Data
liquid
{% if json.callRecording %}
Transcript: {{ json.callRecording.transcriptSummary }}
{% else %}
No transcript available. Provide a general template response.
{% endif %}
Variable Quality Input
liquid
System:
Analyze the meeting content below.
If the content is incomplete or unclear, note what information is missing.
Do not make up information that isn't explicitly stated.
No Results Case
liquid
System:
Extract customer objections from this meeting.
If no objections were raised, return "No objections identified."
Do not invent objections that weren't mentioned.
Performance Optimization
Keep Prompts Concise
Every token costs time and money. Remove unnecessary text:
❌ Verbose:
text
I would like you to please summarize the following meeting
transcript for me. The summary should be concise and focus on
the main points that were discussed during the meeting. Please
make sure to include any action items or decisions that were
made. The format should be professional and suitable for
sharing with executives.
✅ Concise:
text
Summarize this meeting in 3 bullet points.
Include: key decisions, action items.
Executive-ready format.
Use Smaller Context When Possible
- Use
transcriptSummaryinstead of fulltranscript - Extract relevant sections before processing
- Remove irrelevant metadata
Match Complexity to Model Tier
| Prompt Complexity | Model Tier |
|---|---|
| Simple extraction | Low |
| Standard analysis | Medium |
| Complex reasoning | High |
Testing Prompts
Test with Diverse Data
Before releasing, test with:
- Normal meetings
- Short meetings
- Long meetings
- Meetings without clear action items
- Meetings with technical discussions
- Meetings with multiple topics
Check Output Consistency
Run the same prompt multiple times:
- Outputs should be consistent
- Format should match specification
- Edge cases should be handled
Validate Output Types
Ensure the AI returns the expected type:
- Strings aren't truncated
- Lists have the expected format
- Numbers are in the expected range
- Booleans are true/false (not "yes"/"no")
Common Mistakes
1. Ambiguous Instructions
❌ Ambiguous:
text
Give me the important parts.
✅ Clear:
text
List the top 3 decisions made, each as a single sentence.
2. Missing Output Format
❌ No format:
text
What are the action items?
✅ With format:
text
List action items as bullet points.
Format: "- [Owner] will [action] by [date]"
If owner/date unknown, omit that part.
3. Too Much Context
❌ Overloaded:
text
Here's the meeting title, date, time, timezone, organizer,
all attendees with their emails, companies, roles, the full
transcript, the summary, the AI insights, the deal details...
✅ Focused:
text
Meeting: {{ json.meeting.title }}
Summary: {{ json.callRecording.transcriptSummary }}
4. Not Handling Edge Cases
❌ Assumes data exists:
text
Summarize the customer's budget: {{ json.budget }}
✅ Handles missing data:
text
{% if json.budget %}
Budget: {{ json.budget }}
{% else %}
Budget: Not discussed
{% endif %}