Personalizing Advertising SMS with GigaChat: Prompt Simplification, Rule Checks and an A/B Test

Anastasia Shmalko24 Apr 2025

Problem

Sber's content personalization team writes advertising SMS for corporate clients. One text goes to everyone, so it ignores the reader's tone and values. Asking an LLM to "personalize" a standard SMS by gender only changed the salutation endings. A long prompt with about 30 editorial rules and personalization instructions was mostly ignored, so rules were broken and personalization was weak.

Example from the article: a deposit SMS in three versions: a standard text, an informal "you" text for a woman aged 20–30, and a respectful text stressing reliability for a man aged 40–65.

Solution in brief

Generate a plain SMS first, then adapt it to the chosen parameters. Keep editorial rules out of the prompt and enforce them with code checks, an LLM check and a regeneration loop. Describe personalization as lists of concrete words per segment, taken from editors' reference SMS.

Questions this case answers
  • How to generate short messages adapted to a recipient's segment with an LLM when a long instruction prompt gets partly ignored
  • How to enforce a house style on LLM output without putting every style rule into the prompt
  • How to make an LLM write marketing messages tailored to a customer's gender, generation or industry rather than a generic text with different salutations?
  • How to make LLM-written messages follow a long list of editorial rules?

Tools and methods

  • GigaChat (Pro, then Max) — generates and adapts SMS texts, and runs the complex rule checks
  • PyMorphy — morphological checks of formal rules, such as no adverbial participles
  • Regeneration loop — a text that fails a check is generated again
  • Term sets per parameter — specific words and expressions for a generation, industry and so on
  • A/B test — control gets the human-written SMS, target groups get personalized texts
Continue reading — it's free

Google or a one-time email code. No password.