Cold Email Evaluations
You can use the Cold Email Evaluations endpoint to score the performance of a specific cold email. You can do this to validate the cold-email-1
model or use this to get feedback on your (AI-)writting email.
On this page, we'll dive into the Cold Email Evaluation endpoint and how you can trigger it programmatically.
Run a Cold Email Evaluation
This endpoint allows you to evaluate an email.
Required attributes
- Name
email
- Type
- string
- Description
The email to evaluate, preferably in markdown or plain-text format.
Optional attributes
- Name
context
- Type
- string
- Description
Any context that is was used to write the email. This is mostly applicable when evaluating an AI written email, like when using
cold-email-1
.
- Name
user
- Type
- EvaluationsInput
- Description
More information about the user that's required for some of the evaluations. See the EvaluationsInput type for more information.
- Name
lead
- Type
- EvaluationsInput
- Description
More information about the lead that's required for some of the evaluations. See the EvaluationsInput type for more information.
Returns
- Name
score
- Type
- number
- Description
The overall score of the email
- Name
evaluations
- Type
- EvaluationsArray
- Description
An array containing the results of all of the evaluations that have been run. See the EvaluationsArray type for more information.
Request
curl -X POST https://api.utopianlabs.ai/v1/evaluations/cold-email \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"email": "The email you want to evaluate",
"lead": {
"company_website": "https://example.com"
"company_name": "Example Corp",
"person_job_title": "CEO"
},
"user": {
"company_website": "https://another-example.com"
"company_name": "Another Example Corp",
"person_name": "John Doe"
},
"context": "This lead asked me to contact him in 6 months. It has been 3 months now, is this the right time to contact them again?"
}'
Response
{
"score": 0.6817245,
"evaluations": [
{
"key": "Name of the evaluation function",
"score": 0.5,
"feedback": "Any feedback that can help you improve the email."
}
]
}