IntermediateLesson 16 of 305 min read

Drafting Replies With Templates and Output Checks

Fill templates from records, check every draft for blanks, banned promises and length, and send failures to a person with the reason.

In this lesson you will

  • Choose between templates and AI drafts
  • Check drafts for blanks, banned words and length
  • Know what simple checks cannot catch
  • Route failed drafts to a person

About 25 minutes

A friendly draft that promised too much

Ravi’s assistant drafts a reply to a customer who is worried about a late order. The draft is warm and clear, and it promises the order will arrive tomorrow and a full refund if it does not. Ravi never agreed to either. The draft sounded good, which is exactly what makes this kind of slip dangerous. Here is the kind of reply an AI step might produce. It is only an illustration.

Hi Ana, great news! We guarantee your order 1043
will arrive tomorrow, and if it does not we will give
you a full refund.

Every business has sentences it must not let a machine say on its behalf: promises about dates, money, guarantees and refunds. The answer is not to avoid drafting. It is to check every draft before it reaches a customer, with simple rules that do not depend on how clever the writer was.

Two ways to write a reply

  • A template with blanks. The wording is fixed and written by you. A program fills in the customer’s name, order number and status from a record. Very predictable, but stiff.
  • An AI draft. A model writes the wording, perhaps using your notes. Flexible and friendly, but it can slip, as the example showed.

Many shops use a template for anything involving promises, and an AI draft for friendly messages around it. Whichever you use, the checks come next.

Checks for every draft

  1. Placeholders. No blanks left unfilled. A message saying ‘Hi’ followed by the name placeholder in curly brackets is embarrassing.
  2. Banned words. A short list of words your assistant must never use, such as guarantee or refund.
  3. Length. Customers want short answers, and long drafts hide mistakes.
  4. Facts. Anything checkable, such as an order number, matches the record.
  5. A person. Anything that fails goes to a human, with the reason attached.

Run the checks

The program below fills a template from a record, then checks six saved drafts against three rules: no unfilled placeholders, no banned words and at most 25 words. Each failing draft prints its reasons, so you can see which rule fired.

import re

record = {"name": "Sam", "order": "1042", "status": "printing"}
template = "Hi {name}, your order {order} is {status}."
print("template filled:", template.format(**record))

banned = ["guarantee", "definitely", "100%", "refund"]
limit = 25   # most words allowed in a reply
drafts = [
    "Hi Sam, your order 1042 is printing and should ship soon.",
    "Hi Ana, we guarantee your order 1043 will arrive tomorrow.",
    "Hi {name}, your order {order} is ready.",
    "Hi Lee, thank you for getting in touch about your order. We have looked at everything you sent us, we have checked the proof, and we are now getting the files ready for the printer.",
    "Hi Kim, we are checking order 1044 and will update you today.",
    "Hi Raj, thanks for your message. Your order 1045 is with the printer.",
]
passed = 0
for i, d in enumerate(drafts, 1):
    problems = []
    if re.search(r"\{\w+\}", d):
        problems.append("unfilled placeholder")
    hit = [b for b in banned if b in d.lower()]
    if hit:
        problems.append("banned word: " + hit[0])
    if len(d.split()) > limit:
        problems.append("too long")
    passed += not problems
    print(f"draft {i}: {', '.join(problems) or 'ok'}")
print("passed:", passed, "of", len(drafts))
template filled: Hi Sam, your order 1042 is printing.
draft 1: ok
draft 2: banned word: guarantee
draft 3: unfilled placeholder
draft 4: too long
draft 5: ok
draft 6: ok
passed: 3 of 6

The template produced: Hi Sam, your order 1042 is printing. Only 3 of the 6 drafts passed. Draft 2 failed with ‘banned word: guarantee’, which is the promise problem. Draft 3 failed with ‘unfilled placeholder’, a template that nobody filled in. Draft 4 failed with ‘too long’: it is polite but rambles, and the useful information, that the files are being prepared, is buried. Notice also what the checks cannot see. Draft 5 says ‘will update you today’, which passes every rule but is still a small promise the shop must keep. Checks catch the common slips. They do not replace a person reading anything that matters, and a banned-word list is easy to get around with different wording, so keep adding to it as you learn.

What to do with a failed draft

  • Send it to a person with the failing rule named, not just a red flag.
  • Let the person edit or rewrite it, then send it.
  • Count which rules fail most often. A rule that fires often points to a prompt that needs changing.
  • Never let the workflow quietly delete the offending words and send the rest.
Common mistake: judging a draft by its tone

Trusting a draft because it reads well. Friendly wording is not evidence of accuracy. Check the rules every time, and let a person approve anything involving money or deadlines.

Illustration only, not legal advice

The records, drafts, word list and length limit are made up. The example reply is an illustration only, since real AI wording differs each time. Rules about what a business may promise vary by country and sector, so this lesson is an outline and not legal advice.

Write down five sentences your business must never let a machine say, such as promises about dates or money. Turn them into a banned-word list and a length limit for your own drafts.

Practice for this lesson

Check what you learned

Five quick questions. Pick an answer and you will see straight away whether it is right and why.

Why check every draft even when it reads well?

  1. Checks make drafts longer
  2. Customers prefer slow replies
  3. It is required by every platform
  4. Friendly wording does not prove accuracy

The example draft sounded fine and still promised too much.

What does a template with blanks give you?

  1. Fixed wording that you control
  2. Creative wording
  3. Automatic refunds
  4. Unlimited length

The wording is yours; only the details are filled in.

Why did draft 3 fail?

  1. It was too long
  2. It used a banned word
  3. An unfilled placeholder was left in the text
  4. It had no name

The name and order placeholders were never filled.

What can the checks not catch?

  1. A banned word
  2. An unfilled blank
  3. A very long draft
  4. A small promise phrased in different words

Draft 5 passed every rule but still promised an update.

What should happen to a failed draft?

  1. It is sent anyway
  2. A person reviews it with the reason attached
  3. The banned word is silently removed
  4. It is deleted without notice

A human decides, with the failing rule shown.

Summary

  • Never trust a draft because it reads well.
  • Templates fix the wording; AI drafts flex it.
  • Simple checks catch common slips but not everything.
  • Failed drafts go to a person with the reason.

Next lesson

Lesson 17 shows how to measure an AI step with precision, recall and fresh examples.

Questions

Should I use templates or AI drafts?

Use templates where wording matters, such as anything about money or dates, and AI drafts for friendly messages. Check both.

Is a banned-word list enough?

No. It catches obvious slips only. Keep a person in the loop for anything that matters.

Is the example reply what an AI would write?

It is an illustration. Real replies differ each time, which is why the checks run on every draft.

Progress is saved in this browser.