Sub topic 3
Email: drafting, rewriting, and subject lines
This chapter covers generative AI features in email marketing tools: drafting, rewriting, and subject-line generation. It assumes you know what a campaign and a contact record are, and that you have a basic idea of what a large language model (LLM) is. It also assumes you have read the chapters on feature types and platform data.
What these features automate
Email content generation is the clearest generative feature in the plan. A generative model produces new text from a prompt. Email platforms wrap that ability in a few common tasks:
- Drafting: producing a first version of an email from a short brief, such as "announce our spring sale, 20% off, ends Friday."
- Rewriting: changing existing text. Typical operations are shortening, changing tone, fixing grammar, translating, and adapting a message for a different audience.
- Subject-line generation: producing several candidate subject lines and preview texts for a draft.
- Variant creation: producing alternative versions of the same message for A/B testing.
The model does not know your business. It knows language patterns. Everything specific, such as product names, prices, dates, and tone, has to arrive through the prompt or through data the platform adds to the prompt.
How a drafting feature works internally
When you click "Generate" in a platform, the product usually does more than pass your text to a model. A typical pipeline looks like this:
- Collect the brief. You supply a goal, an audience, and key facts.
- Assemble context. The platform adds a system prompt with rules (length, tone, banned claims), brand voice notes, and sometimes examples of past emails.
- Call the model. The LLM returns text, often several options.
- Apply checks. The platform may scan for missing unsubscribe links, spam-trigger phrases, or banned words.
- Show the result to a person. The draft lands in the editor, not in the send queue.
Step 2 is where most quality comes from. A vague brief gives generic copy. A brief that includes the offer, the deadline, the audience, and one example of a past email in your voice gives copy that needs far less editing.
Writing a brief that works
A good brief states five things:
| Element | Example |
|---|---|
| Goal | Get existing customers to renew before 30 June |
| Audience | Small-business admins who used the product in the last 90 days |
| Facts the model must use | 15% renewal discount, code RENEW15, ends 30 June |
| Tone and length | Friendly, under 120 words, one call to action |
| Constraints | No claims about savings beyond the discount; no mention of competitors |
Treat the facts row as a fixed list. Models fill gaps with plausible text, so anything you leave out may be invented.
Rewriting: safer than drafting, but not safe
Rewriting starts from text you wrote, so it has less room to invent content. It still has failure modes:
- Meaning drift. "Ends Friday" becomes "ends this week," which is a different deadline.
- Dropped details. Shortening removes the legal line, the discount condition, or the link.
- Tone mismatch. A "friendlier" rewrite of a payment-failure notice can sound unserious.
- Changed names and numbers. These are rare but costly.
A practical habit is to compare the original and the rewrite on a checklist: offer, dates, numbers, names, links, and required legal text.
Subject lines
Subject-line generation is a small task with a measurable outcome, which makes it the easiest feature to evaluate. The platform generates a handful of candidates. You then choose one, or run a test.
There are two ways to pick a winner:
- Manual A/B test. Send version A to part of the list and version B to another part. Compare open rate or, better, click rate.
- Predictive ranking. Some tools score candidates using a model trained on past campaign results. This is a predictive feature layered on top of a generative one.
Two cautions apply to subject-line tests.
First, open rate is a weak signal. Many mail clients preload images and so register opens that no person made. Click rate or conversion is a more reliable test metric.
Second, a test needs enough recipients to tell a real difference from chance. With 200 recipients per variant, a gap of a few percentage points means little.
The following code checks whether the gap between two subject lines is larger than chance would explain. It uses a two-proportion z-test written with the standard library only.
from math import sqrt, erf
def two_proportion_p_value(clicks_a, n_a, clicks_b, n_b):
"""Two-sided p-value for the difference between two click rates."""
p_a, p_b = clicks_a / n_a, clicks_b / n_b
pooled = (clicks_a + clicks_b) / (n_a + n_b)
se = sqrt(pooled * (1 - pooled) * (1 / n_a + 1 / n_b))
z = (p_a - p_b) / se
# Normal CDF via the error function
cdf = 0.5 * (1 + erf(abs(z) / sqrt(2)))
return 2 * (1 - cdf)
# Small test: 200 recipients each
print(f"200 each: p = {two_proportion_p_value(14, 200, 22, 200):.3f}")
# Same rates, larger test: 5000 each
print(f"5000 each: p = {two_proportion_p_value(350, 5000, 550, 5000):.4f}")Both tests show the same click rates (7% against 11%). The small test gives a p-value around 0.19, which is not convincing. The large test gives a value far below 0.05. The rates are identical, so sample size is what changes the conclusion.
Where the model gets its information
Drafting features draw on several inputs. Knowing which one your platform uses tells you what can go wrong.
| Input | What it provides | Typical risk |
|---|---|---|
| Your brief | Offer, audience, facts | Gaps get filled with invented detail |
| Brand voice settings | Tone, vocabulary, forbidden words | Voice is approximated, not copied |
| Past emails | Style examples | Old offers or expired details leak into new copy |
| Contact fields | Name, company, plan | Missing or wrong fields produce "Hi ," or the wrong company name |
| Product catalog | Real product names and prices | Stale catalog data gives stale prices |
Personalization fields deserve special attention. A model may write "Hi {{first_name}}" correctly, but the merge only works if the field exists for every contact. Test with a contact that has empty fields before sending.
Quality and compliance checks
Generated copy is still marketing email, so the same rules apply to it:
- Include a working unsubscribe link and your sender identity, as your jurisdiction's rules require.
- Avoid claims you cannot support, such as "guaranteed results" or invented statistics.
- Do not describe a message as personal when it is mass-generated, if your rules or brand standards forbid it.
- Keep a record of which messages used AI, so you can trace problems later.
An automatic check can catch some of these. A person has to catch the rest.
A simple routing rule
Whether a draft is sent without review depends on risk. The approval gate below sends a draft automatically only when it is internal and the model's confidence is high. Everything else goes to a person.
def route_draft(confidence: float, is_external: bool, threshold: float = 0.9) -> str:
"""Decide whether an AI-generated email draft is sent or reviewed."""
if is_external:
return "human_review"
return "auto_send" if confidence >= threshold else "human_review"
print(route_draft(0.95, is_external=False))
print(route_draft(0.95, is_external=True))
print(route_draft(0.70, is_external=False))The output is auto_send, human_review, human_review. Note that external marketing email goes to review even at high confidence. Also note that "confidence" is often a model's own estimate or a heuristic score, not a guaranteed accuracy figure. Later chapters on human review and evaluation cover how to set thresholds from evidence.
Common errors
- Sending the first draft. The first generation is a starting point. Edit for facts, voice, and call to action.
- Prompting with no facts. The model then writes about a generic offer.
- Trusting generated numbers. Any statistic, price, or date in the draft must be checked against a source.
- Testing too many subject lines at once. Ten variants on a small list split the audience so thinly that no result is reliable. Test two to four.
- Judging on opens. Use clicks or conversions.
- Treating tone settings as guarantees. "Professional" is a tendency, not a rule.
- Skipping the empty-field test. Broken merge fields are the most visible error recipients see.
Measuring whether it helps
A drafting feature is useful if it saves time without lowering results. Measure both. Time saved is the minutes from brief to approved draft, compared with your old process. Results are click rate, conversion, unsubscribe rate, and spam complaints for AI-assisted campaigns against comparable manual ones. Watch unsubscribes and complaints especially, because lower-quality copy shows up there first. The evaluation chapter covers baselines and holdout groups in detail.
Exercise
A platform tests two AI-generated subject lines on 300 recipients each. Version A gets 21 clicks and version B gets 30 clicks. The platform declares B the winner and sends it to the rest of the list. Give two reasons to be cautious, and say what you would do instead.
Show answer
First, the sample is small. The click rates are 7% and 10%, and a gap of nine clicks on 300 recipients each is within what chance can produce, so a significance test would likely show a large p-value. Second, the platform may have stopped as soon as one variant led, which inflates false winners. Instead, run the test on a larger share of the list or for longer, decide the sample size and metric before starting, and compare on clicks or conversions rather than opens. If the difference stays unclear, pick either line, since the choice probably matters little.
Exercise
You ask an AI feature to shorten a renewal email. The rewrite is shorter and reads well. Name four items you should check against the original before approving it.
Show answer
Check the offer details (discount amount and conditions), the dates and deadlines, the names and numbers, and the links and required legal text such as the unsubscribe line. Meaning drift in any of these can change what the customer is promised.