Birthday Card Message Generator Methodology
How the Birthday Card Message Generator scores 141 templates against tone, relationship, and age — then returns 5 varied messages using a seeded shuffle so you do not get the same five twice.
Reviewed by Baljeet Aulakh · Last reviewed April 19, 2026
How We Rank Messages
Each of the 141 templates in the library gets scored against your inputs — tone weighs heaviest, then relationship, then age-group closeness. The top candidates (anything within 3 points of the best score) get a seeded Mulberry32 shuffle so you see variety across repeated generations, and we return 5 messages.
Scoring formula
ageGroup = baby | toddler | child | tween | teen | adult // mapped from age score = 0 + 10 if t.tone === tone // primary signal + 5 if t.relationship === relationship // secondary + 1 if t.relationship === 'general' // generic fallback bonus + 3 if t.ageGroup === ageGroup + 1 if |ageIdx - templateAgeIdx| === 1 // adjacent age group topCandidates = scored.filter(s.score ≥ best − 3) seed = age*31 + tone.len*17 + rel.len*7 + nameLen*13 shuffled = seededShuffle(topCandidates, seed) picks = shuffled.slice(0, 5).replace(/\[Name\]/, name)
Signal Weights
Tone is the strongest signal (10 points) because a funny card feels wrong when the person writing it wanted sweet — and vice versa. Relationship is next (5 points) because "To my sister" and "To my coworker" should rarely share a template. Age (3 points + 1 adjacent bonus) fine-tunes between adjacent age groups when nothing else distinguishes two candidates.
| Signal | Max Points | Why This Weight |
|---|---|---|
| Tone match | 10 | A tone mismatch is the most visible failure in a card message. |
| Relationship match | 5 | Generic messages exist (general tag), but a parent-to-child card reads very differently from a coworker card. |
| Age group match | 3 | Baby / toddler / child / tween / teen / adult — enough granularity for age-appropriate phrasing. |
| Adjacent age group | 1 | A tween template still works for a child or teen — adjacent bonus prevents over-penalizing ±1 age bracket. |
Seeded Shuffle (Mulberry32)
We use a deterministic Mulberry32-style shuffle so identical inputs always produce the same output — which helps users who regenerate, lose the tab, and come back expecting the same set. Changing any of age, tone, relationship, or the recipient name produces a different seed and therefore different picks.
Name Substitution
Templates use [Name]as the substitution token (matches the Hallmark convention most users recognize). The final message replaces every occurrence; if no recipient name is supplied, we fall back to "the birthday person" so the output never looks unfinished.
Sources
- Party Genius AI internal message library (
MESSAGE_TEMPLATES, 141 entries tagged by tone × relationship × age group). - Age-group thresholds derived from child-development literature and Hallmark category conventions (toddler ≤ 3, child ≤ 8, tween ≤ 12, teen ≤ 17).
- Mulberry32 shuffle — a fast, deterministic PRNG commonly used for reproducible client-side randomization.
Edge Cases & Limitations
Narrow tone + relationship + age combinations may return fewer than 5 strong matches. When that happens, we pad the result from adjacent scores so you always get 5 picks — but the later picks will feel weaker. The fix is to relax one input.
Templates are English, US-idiom heavy. UK/AU and other regional spellings are not currently represented — a roadmap item.
The seeded shuffle is deterministic, which means identical inputs never yield fresh output. Change any field (including recipient name) to resample.
Back to the Card Message Generator
Pick a tone, a relationship, and an age. Get 5 card messages, personalized and ready to copy.
Open Card Message Generator