Sub topic 10
Testing the Voice and Revising
This chapter assumes you have already written a custom instruction with voice traits, do and don't rules, an example, and guardrails. It also assumes you can start a fresh conversation in your assistant. Here you will check whether the instruction works and improve it in small, measurable steps.
Why a fixed test set matters
An instruction that produces one good reply may fail on the next. If you try a new prompt each time, you can't tell whether a change helped or whether the prompt was just easier. A fixed test set fixes this. You run the same prompts after every revision and compare results against the same checklist.
Pick four to six prompts that cover the work the assistant will really do:
- A routine task, such as a short welcome email.
- An explanation task, such as describing a feature.
- An emotional task, such as replying to an upset customer.
- A boundary task, where the assistant might invent facts, such as asking for a price.
The boundary prompt matters most. It tests your guardrails, which are the rules that stop the assistant from stating things it can't know.
Build the test set and checklist
Turn each rule from your instruction into a yes/no check. A check like "sounds friendly" is too vague to score. A check like "uses contractions" is observable.
Test prompts (run each one in a fresh conversation):
1. Write a two-sentence welcome email for a new user.
2. Explain what an invoice reminder is, in one short paragraph.
3. Reply to a customer who is upset about a late payment notice.
4. How much does the Pro plan cost?
Check each reply against this list:
- Uses "you" and contractions
- Sentences under 25 words
- No banned jargon, at most one exclamation mark
- Does not invent prices or legal claims (prompt 4 should ask for or point to the source)Use a fresh conversation for every prompt. Earlier messages in a chat influence later replies, and that would hide problems in the instruction itself.
The test and revise loop
Follow these steps each round:
- Run every test prompt in a fresh conversation.
- Score each reply against the checklist and record failures.
- Find the pattern behind the failures. Several failures on the same check usually point to one weak rule.
- Change one thing in the instruction.
- Run the full set again and compare.
Change one thing at a time. If you edit three rules together and the results improve, you won't know which edit worked. If results get worse, you won't know which one broke them.
Diagnose before you edit
Match each failure to a likely cause and fix.
| Failure you see | Likely cause | Fix to try |
|---|---|---|
| Replies are stiff and formal | Voice described only with adjectives | Add a before-and-after example |
| Sentences run long | Rule is missing or buried | Move the rule into the Do list with a number |
| Assistant invents a price | No rule for missing information | Add "If you lack information, ask" |
| Output copies your example word for word | Only one example is given | Add a second, different example |
| A rule is ignored | It conflicts with another rule | Remove or reword one of the two |
Language models give different replies each time. Run a test prompt two or three times if a result looks borderline. A rule that passes once and fails twice is not working.
Know when to stop
Stop when the full set passes on repeated runs. Then add one new prompt that you haven't tested, and check that it also passes. If it fails, your instruction may be fitting the test prompts too closely instead of describing the voice. Save the passing instruction as a numbered version, such as v2, so you can return to it.
Exercise
Your instruction passes prompts 1 to 3, but on prompt 4 ("How much does the Pro plan cost?") the assistant states a price you never provided. What single change should you try first, and how do you confirm it worked?
Show answer
Add or strengthen a guardrail, for example "State prices only if they appear in the text I provide. If you lack information, ask a question instead of guessing." Then rerun the whole test set, in fresh conversations and more than once. The fix worked if prompt 4 now asks for or points to the source, and prompts 1 to 3 still pass.
Exercise
You edited the sentence-length rule, added a second example, and removed a jargon ban in one revision. Replies got worse. Why is this hard to fix, and how should you work instead?
Show answer
Three changes were made together, so you can't tell which one caused the drop. Revert to the last passing version and apply the changes one at a time, running the full test set after each.