Prompt Engineering Mastery

Course Content

Prompt Engineering Mastery

6 sections · 32 lessons

How do you prompt an LLM to generate content in different writing styles?


What you need to know

"Make it friendly" means different things to different writers. The model picks its own average meaning. To get your style, turn the label into attributes.

Describe style as attributes

AttributeExample setting
AudienceFirst-time buyers on a budget
RegisterCasual, like a helpful shop assistant
Sentence lengthMostly under 15 words
PersonSecond person ("you")
VocabularyEveryday words, no jargon
AvoidExclamation marks, superlatives, emoji

Show, don't only tell

A short style exemplar — a paragraph written in the target voice — carries rhythm and word choice that adjectives cannot. Two different exemplars are better than one, so the model learns the voice rather than copying one text. Label them "for style only; do not copy facts".

Separate content from style

Do it in two steps, or in one prompt with two clear inputs:

  1. Facts — the verified product specs, the clause, the ticket.
  2. Style — a style guide and exemplars.

This stops a "fun" style from inventing fun facts.

Sampling and style

Higher temperature (0.7 to 1.0) gives more varied wording on models that accept it. Several current reasoning models do not accept temperature, so style and variety come from the prompt: exemplars, explicit variety rules ("do not start two descriptions the same way") and the style guide.

A real-life example

An e-commerce company sells the same 1.5 L electric kettle on three storefronts: a premium store, a value store, and a youth-focused app. The first prompt:

Text
Write a product description for a 1.5 L electric kettle in a premium style.

It returns "Experience unparalleled luxury with this exquisite kettle..." — clichéd, and it invents a "Swiss-engineered heating element". The improved prompt:

Text
<facts>1.5 L, 1500 W, stainless steel inner body, auto shut-off, boil-dryprotection, 1-year warranty.</facts><style name="premium">Calm and precise. Sentences of 12 to 18 words. Focus on materials andsafety. No superlatives, no exclamation marks.Example (style only): "A brushed-steel body that stays cool at thehandle, and a lid that opens with one quiet press."</style>Write 50 to 70 words using only <facts>, in the <style> above.

Swapping only the <style> block produces the three voices from the same facts. Across 300 products, invented features fall to zero on the premium store, and the brand team approves 92% of descriptions without edits, up from 60%.

Follow-up questions to expect

  • "Persona or style guide?" — A persona ("an experienced chef") is a shortcut; a style guide with exemplars is more controllable and consistent across thousands of outputs.
  • "How do you check style automatically?" — Rules for measurable parts (length, banned words, exclamation marks) and an LLM judge with a rubric for tone, validated against the brand team's ratings.
  • "Why did all outputs start to sound the same?" — The model over-copies a single example; add a second, different exemplar and a variety rule.