How a summary reaches the owner
The grouper handed off a handful of themes — each with a name, a count, and a real quote. Now the summary Lambda has to turn that into one short email the owner will actually read, and make sure every number and every quote in it is true. Get this wrong and the summary is worse than no summary: an inflated count, a quote nobody wrote, a wall of text nobody finishes. Four small guardrails sit between the grouped themes and the email that lands.
Key takeaways
- Claude Sonnet 4.6 writes the summary from the grouped themes — never from one cherry-picked answer.
- Counts in the email are checked against the real cluster sizes before anything is sent.
- Every quote is verified to be a verbatim answer that actually exists in the store.
- The voice doc sets the tone and a hard length cap so the email stays a one-page read.
- SES emails the owner; the urgent items from the week are appended at the bottom.
Four guardrails on every summary
Gate 1: draft from the themes, not the answers
The summary Lambda hands Claude Sonnet 4.6 the structured output of the grouper: each theme’s name, its exact count, and its one real quote, plus the overall mood (a simple share of positive, neutral, and negative answers, computed in plain code from the ratings and the urgent flags). Sonnet’s job is narrow: write a short, warm, plain summary of this — a top line on volume and mood, then the themes in order of size, each with its count and quote. The prompt is explicit that it must work only from the supplied themes and may not introduce a topic, a number, or a quote that isn’t in the input. It never gets to rummage through raw answers and surface its own favourite.
Sonnet rather than Haiku here is a deliberate choice. This is the one piece of writing the owner actually reads, and it has to weigh several themes, judge what leads, and strike a tone — the kind of light reasoning the heavier model does noticeably better. Everywhere else, the cheap model is fine; here the extra cents buy a summary worth reading.
Gate 2: check every count against the real sizes
A model writing prose around numbers will, now and then, round “61” to “about 60” or merge two themes and add their counts wrong. So before anything sends, Gate 2 pulls every number out of the draft and compares it against the cluster sizes the grouper recorded. If a count doesn’t match exactly, the draft is rejected and rebuilt — the gate hands the true figures back to Sonnet and asks for the summary again, or, after a couple of tries, drops in the numbers itself. The owner never sees a count the system can’t stand behind.
Gate 3: check every quote is real
The same care goes to the quotes. Each quoted sentence in the draft is looked up against the store to confirm it’s a verbatim answer somebody actually wrote. A quote the model softened, tidied, or invented fails the check and is swapped for the real representative quote the grouper picked in Part 3. This matters more than it sounds: a quote is the one place a summary feels like real customers talking, and a made-up quote — however plausible — quietly turns the whole report into fiction. Every quote that ships is real.
Gate 4: tone, length, and the urgent block
The voice doc holds the tone — how warm, how blunt, how much hedging — and a hard length cap. Gate 4 shapes the verified draft to that voice and trims anything over the cap, because a summary that scrolls is a summary that doesn’t get read. Then it appends a short closing block: the answers that were flagged urgent during the week (from Part 5) and a one-line note on how each was routed, so the owner sees in one place both the slow signal (the themes) and the fast one (the urgents). The finished email goes out through SES outbound, and the whole run — inputs, draft, final — is written to DynamoDB so the summary is reproducible and auditable later.
Why the guardrails exist
None of these gates are exotic. They’re the care a thoughtful analyst would take if they were writing the summary by hand — quote real people, get the numbers right, keep it short, and put the urgent stuff where the boss will see it. Putting them in code as four sequential checks makes honesty a property of the system, not something you’re trusting one model call to remember on a busy Sunday night. The owner can act on the summary precisely because they never have to wonder whether a number or a quote was real.
Next post: the urgent lane — how a single answer that can’t wait until Sunday gets pulled out and sent to a human the minute it lands.
All posts