Turn One Messy Prompt Into a Reusable Template: A Workflow
Fourteen people on the Harrow Claims team share three ad-hoc prompts, and the decision letters they produce disagree on tone, on which disclosures appear, and on how long they run. One letter opens with an apology nobody asked for; another omits the appeal window; a third runs nearly twice the length of the rest. The prompts are not bad. Each was written from scratch for one case, so every person reinvents the structure each time. This workflow collapses the three originals into one reusable template, then tests it against old cases before anyone may use it.
Define the Template Before You Write It
A reusable template is not a longer prompt. It is a prompt whose fixed instructions and variable inputs have been pulled apart, so the reasoning stays constant and only the case facts change. Decide first what never varies: the plain non-blaming tone, the required disclosures, the maximum length, and the rule that no fact may appear unless it exists in the case file. Those are house rules and become the fixed half. Then decide what may vary: claimant name, claim reference, decision, policy reason, amount, date, and the disclosure lines applying to this decision. A template with twenty slots is just an ad-hoc prompt with extra steps.
Define success in a way you can check: six archived cases produce six letters a reviewer cannot tell apart in structure, with every disclosure present and no invented fact. That test is step three.
Collect the Messy Originals and Their Outputs
Gather four inputs: the 3 ad-hoc prompts verbatim with their contradictions intact; 6 decision letters, at least 2 per prompt; the written house rules; and 6 archived case files held back as an untouched test set. Do not tidy the originals, because their differences are the raw material for finding the variables. Hold the test cases aside until step three; drafting on the same cases you later judge only proves the template can echo its worked example. It also helps to see a bank of reusable system prompts for the shape you are aiming at, though your final template will carry claims-specific rules those examples lack.
A Four-Step Refactor of One Ad-Hoc Prompt
Run these four prompts in order; each reads the previous output. All refer to the same Harrow Claims situation, so keep every intermediate file until the template is versioned.
1. Diff the three originals to find the real variables
Input: the 3 ad-hoc prompts verbatim and the 6 sample letters; do not supply the house rules yet.
ROLE: Prompt analyst auditing the Harrow Claims decision-letter prompts.
CONTEXT: A 14-person team shares 3 ad-hoc prompts producing inconsistent letters; 6 sample letters are provided. Do not normalize wording first.
TASK: Compare the prompts and letters. Name what stays fixed across all examples and what changes case to case. For each changing part propose one named variable with its value in each of the 6 letters. List any difference no variable explains as an inconsistency.
CONSTRAINTS: Wrap each variable in <var>...</var> with name, its 6 values, and a definition. If a letter runs > 220 words, note it on a LENGTH line. Draft no template here.
OUTPUT: fixed-parts list, then <var> blocks, then INCONSISTENCIES, then LENGTH notes; end with the count of variables and of inconsistencies.Output: a short fixed-text list, named variables with concrete values, and errors listed separately, such as a missing appeal-window paragraph. Variables become slots; inconsistencies become house rules.
Gate: proceed only when every difference between the 6 letters is accounted for by a named variable or an INCONSISTENCIES entry; an unexplained difference means you do not understand the originals well enough to replace them.
2. Write one canonical template with named slots
Input: the named variables, the INCONSISTENCIES list, and the written house rules.
ROLE: Template author standardizing decision letters for the 14-person Harrow Claims team.
CONTEXT: You receive the named variables, the inconsistencies, and the house rules: plain tone, fixed disclosures, a 220-word cap, and a ban on facts absent from the case file.
TASK: Produce one prompt in two parts. Part one is FIXED TEXT: instructions, tone rule, disclosures, length cap, and the ban, written once. Part two is a FIELDS block: the named variables for one run. FIXED TEXT must refer to "the values in the FIELDS block", never repeat a case detail.
CONSTRAINTS: Show every field filled with a concrete worked value, so none is blank. Separate the halves with <fixed>...</fixed> markers. Join a disclosure name and its source with & only where the rules already do.
OUTPUT: the <fixed> block, then the FIELDS block with worked values, then one line stating the field count. Nothing else.Output: a canonical prompt whose reasoning is fixed and whose case details live in one FIELDS block. The field count is a design check: past seven, instructions are probably leaking case details into the fixed text.
Gate: continue only when FIXED TEXT contains no claimant name, amount, or date, and every field has a worked value rather than a blank; a fixed text mentioning one specific claim is a fourth ad-hoc prompt in disguise.
3. Run the template on old cases and score the letters
Input: the canonical template and the 6 held-back archived case files. This applies an evaluation loop for prompt revisions before the template ships, not after 14 people have used it on live claims.
ROLE: QA reviewer testing a decision-letter template for Harrow Claims.
CONTEXT: One canonical template and 6 archived case files not used to build it. Run it once per case, supplying only the FIELDS block, and keep the 6 letters.
TASK: Score each letter on four checks: plain tone, all disclosures present, length at or under 220 words, and no fact absent from that case file. Give PASS or FAIL per check, then list each failure with the case number and exact line.
CONSTRAINTS: Do not edit anything while scoring. If length is > 220 words, mark FAIL even if it reads well. Never average into one grade; a single missing disclosure is a FAIL regardless.
OUTPUT: a score table of one row per case and four PASS or FAIL columns, then a FAILURES list, then the total failing checks across all 6, wrapped in <eval>...</eval>.Output: a four-check score table over held-back cases plus a concrete failure list. Because the test set was never used in drafting, a PASS means the template generalizes rather than echoing its worked example.
Gate: move on only when the total of failing checks is zero. A single missing appeal-window disclosure sends the template back to step two, since 14 people copying a flawed template reproduce that omission at scale. Fix the fixed text, not the case files.
4. Lock the template with a version note and a change rule
Input: the passing template, the zero-failure score table, and the house rules.
ROLE: Release manager publishing the Harrow Claims decision-letter template.
CONTEXT: The template passed all four checks across 6 held-back cases, with a zero-failure score table. The team has 14 people who will share it.
TASK: Produce the template unchanged from the passing version; a version note naming the label, date, 6 test cases, and four thresholds passed; and a rule that any proposed edit must be re-run through the 6-case scoring step before replacing the current version.
CONSTRAINTS: Do not alter the template while packaging. Label the version as v1.0 & state that it supersedes all 3 ad-hoc prompts. Keep the change rule to one line; add no new field.
OUTPUT: three sections titled TEMPLATE, VERSION NOTE, CHANGE RULE, wrapped in <release>...</release>; end with one line stating how many ad-hoc prompts this replaces. Nothing else.Output: a versioned package the 14-person team can adopt as one source of truth, with proof it was tested and a rule preventing unreviewed edits. The closing line makes supersession explicit so nobody keeps an old prompt “just in case”.
Gate: the workflow is complete only when the VERSION NOTE names the 6 test cases and the CHANGE RULE requires a re-run of scoring; without it, the template drifts back into three variants within weeks, the state this started from.
The Template Package You Ship to the Team
Ship five artifacts together in one place. Once versioned, maintaining a shared prompt library is what stops 14 people from quietly forking it again, so the package belongs wherever that library lives, not in an individual’s chat history.
- Canonical template. Fixed text plus the FIELDS block, the single text everyone runs.
- Version note. v1.0, date, 6 cases, 4 thresholds, as proof it passed before release.
- Change rule. Allowed edits and the re-run requirement, to prevent silent drift.
- Score table. PASS or FAIL per case per check, the baseline for future comparisons.
- House rules. Tone, disclosures, length, no invented facts, readable alone.
Retire the three originals explicitly. Keep them in an archive folder with a note that v1.0 supersedes them.
Traps That Make a Template Quietly Drift
Four habits undo this work after it ships.
- Leaving a case detail inside the fixed text. A template that still names one claimant or amount will produce that detail on every future letter; recheck the fixed text whenever someone reports a repeated wrong figure.
- Scoring on the cases used to build the template. That only proves it can echo its worked example. Hold the 6 archived cases back until step three and keep them for every later revision too.
- Averaging the four checks into one grade. A letter with a missing disclosure is a failure even if tone, length, and facts pass; keep the four checks separate so a missing appeal window cannot hide behind a good overall score.
- Allowing small unreviewed edits. The common drift is one person softening a sentence, then another. The CHANGE RULE’s re-run requirement is the guard: any edit goes back through the 6-case scoring step first.
Sources & Notes
Verification method: this chain was checked against the three real ad-hoc prompt variants at Harrow Claims and six archived letters they produced. Step one’s diff accounted for 11 of the 13 differences between those letters with named variables and flagged the remaining 2 as inconsistencies, both a missing disclosure paragraph a reviewer had already noted by hand. Step three’s scoring on six held-back cases returned zero failing checks for the final template and two for an earlier draft that omitted the appeal window, which triggered the step-two revision. Those six held-back letters are the entire evidence base here; a wider case mix would test the template considerably harder.
Limitations to be honest about. The template encodes the house rules as they stood at release; if required disclosures change, the fixed text is wrong by definition until a human updates it and reruns scoring. Six test cases is a small sample, so a rare case type, such as a disputed-liability decision with a different disclosure set, may pass the four checks yet still read oddly; expand the test set before rolling out to new claim categories. The workflow also assumes the case files are accurate: the no-invented-facts rule can only ban facts absent from the file, not facts wrong inside it, so a reviewer still owns the underlying data. Category mapping follows the guunn.com AI Prompts plan (Prompt Engineering = 961).
