
The Problem: Generic Sales Outreach Doesn’t Work
Dear John,
I hope this email finds you well. I wanted to reach out about our security services that might be of interest to YMU Talent Agency.
Our company provides security personnel for events. We have many satisfied customers and would like to schedule a call to discuss how we can help you.
Let me know when you’re available.
Regards,
Sales Rep
Subject: Quick security solution for YMU’s talent events
Hi John,
I noticed YMU’s been expanding its roster of A-list talent lately – congrats on that growth. Having worked event security for talent agencies before, I know how challenging it can be coordinating reliable security teams, especially on short notice.
We’ve built something I think you’ll find interesting – an on-demand security platform that’s already being used by several major talent agencies.
Best,
Ilya
- Researches prospects in real-time using up-to-date web data
- Crafts personalized emails based on prospect-specific insights
- Self-evaluates and improves its output before sending
- Scales to thousands of prospects at a fraction of the usual cost
Multi-Agent Architecture
Our system combines three specialized AI models:- Orchestrator (Claude 3.7): Generates research queries, drafts emails, and refines based on feedback
- Researcher (Perplexity): Gathers real-time web information about prospects and companies
- Evaluator (OpenAI): Reviews email quality, providing scores and improvement suggestions
- Each model handles tasks it excels at
- The system includes built-in quality control
- Cost efficiency through right-sized models and targeted research
Creating the Prompt Templates
What You’ll Create
The Orchestrator template handles three different roles depending on which “mode” is activated:- Research Query Generator: Creates targeted questions for the researcher
- Email Drafter: Uses research findings to write personalized outreach
- Email Refiner: Incorporates evaluator feedback to improve the email
Variables You’ll Need
Variable | Purpose | Example |
---|---|---|
our_offering | Your product/service description | ”Umbrella Corp offers ‘Uber for personal protection’…” |
company_name | Prospect’s company | ”YMU Talent Agency” |
company_industry | Industry sector | ”Elite Talent Management” |
target_person_name | Contact name | ”John Wick” |
target_person_designation | Contact’s role | ”Event Organizer” |
requirement_gathering_mode | Activates research query mode | ”TRUE” or "" (empty) |
research_mode | Activates email drafting mode | ”TRUE” or "" (empty) |
evaluator_mode | Activates email refinement mode | ”TRUE” or "" (empty) |
researcher_output | Data from the researcher | (JSON response from research) |
evaluator_output | Feedback from evaluator | (JSON with score and comments) |
Step-by-Step Setup
- Create template in prompt.new with Claude 3.7 Sonnet
- Add core partials:
Core Agent Instructions Partial
Core Agent Instructions Partial
- Understand the company and target person
- Write research queries to learn more about them
- Use research findings to write the ultimate opener email
- Send to evaluator for improvements
- Write final email based on feedback
SDR Persona Partial
SDR Persona Partial
- You acutely understand the exact requirements your target person and their company has
- You write short, to the point emails that feel like a friend sending a text to you
- At the same time, you understand the importance of coming across as a thorough professional
- You have yourself been on both ends - when you needed private security and when you yourself were a private security professional

- Add product offering:

- Add Prospect Information Section:

- Create Agent-Specific Sections with Conditional Logic:



{{#variable_name}}
syntax lets you use a single template for three different purposes. When you set requirement_gathering_mode
to “TRUE”, only that section appears. When you set it to empty and instead set research_mode
to “TRUE”, the email drafting section appears instead. This keeps your templates DRY (Don’t Repeat Yourself).Complete Template Overview
When finished, your template should have:- Core instruction and persona partials at the top
- Company offering section
- Prospect information section
- Three conditional sections for different modes
Implementing the Workflow
Setup
Generate Research Queries
Example Output
Example Output
Conduct Research
Example Output
Example Output
Draft Initial Email
Example Output
Example Output
Evaluate Email
Example Output
Example Output
Refine Email
Final Email
Final Email
Monitoring and Optimization
Portkey’s trace view provides complete visibility to track performance, cost, latency, and opportunities for improvement.Implementation Checklist
✅ Set up Portkey account and API credentials✅ Create prompt templates for all three agents
✅ Define your company offering and SDR persona
✅ Configure basic prospect information
✅ Implement the five-step workflow
✅ Set up tracing and monitoring
✅ Create a system for batching multiple prospects
Troubleshooting & Best Practices
Issue | Solution |
---|---|
Low research quality | Make research queries more specific |
Generic emails | Ensure research findings are prominently featured |
High token usage | Remove redundant information from prompts |