Why prompt engineering matters
An LLM is not a program that runs deterministically — it is a system that reacts to context. The same question yields radically different answers depending on how you phrase it, what role you assign the model, and how much relevant context you provide.
It's not magic. It's technique. And just like with all technology: you don't need to understand the transformer architecture to become good — but you do need to understand the patterns.
1. Role prompting — give the model an identity
Basic technique. Tell the model who it is and who it is talking to. This sets the tone, expertise level, and focus.
Weak: "Summarize this agreement."
Strong: "You are a corporate lawyer with 15 years of experience in Swedish\ncommercial contracts. Your client is a CEO at a medium-sized\ntransforming company who does not have a legal background.
Summarize this agreement focusing on: (1) the three most important\nrisk clauses, (2) what is unusual compared to\nstandard agreements, (3) what she should ask the counterparty about."
2. Chain-of-thought — force the model to think step by step
Large language models make fewer mistakes when they "reason" step by step before answering. Activate this explicitly, especially for complex tasks.
Weak: "What price should we set for the new service?"
Strong: "Analyze our pricing decision step by step:
1. Identify the cost floor based on the cost data below
2. Analyze market positioning against the three competitors I mentioned
3. Assess customer willingness to pay based on the segment description
4. Present three pricing strategies (penetration / value / premium)
with pros and cons for each
5. Give your recommendation with justification
Cost data: [insert]
Competitors: [insert]
Customer segments: [insert]"
3. Few-shot examples — show, don't tell
Instead of explaining what you want: provide 2–3 examples of input and desired output. The model learns the pattern and applies it.
Classify these customer reviews as POSITIVE / NEUTRAL / NEGATIVE.
Example:
Review: "Fast delivery and great quality!"
Classification: POSITIVE
Review: "The product is okay but nothing more."
Classification: NEUTRAL
Review: "The packaging was damaged and no response from customer service."
Classification: NEGATIVE
Classify now:
Review: "Quite okay, but I expected more for the price."
Classification:
4. Output formatting — specify exactly what you expect
AI models follow formatting instructions very well. Specify how the response should be structured — JSON, markdown table, numbered list, bulleted list with exactly N points.
Analyze this monthly report and return the result as JSON:
{
"topline_summary": "3 sentences",
"key_metrics": [{"metric": "...", "value": "...", "trend": "up|down|stable"}],
"risks": ["risk 1", "risk 2"],
"recommended_actions": [{"action": "...", "priority": "high|medium|low"}]
}
Report: [insert report]
5. Context compression — provide the right amount of background
More context is not always better. Irrelevant context distracts the model. Good rule of thumb: add context that directly affects the answer — remove anything that is just "nice to have".
Weak (too little context):
"Write an offer to the customer."
Weak (too much context):
"We founded the company in 2018 in Gothenburg. We have 12 employees.
Our CEO's name is Anna. Our product is called... [200 words of company history]
Write an offer to the customer."
Right amount:
"Write a follow-up offer to an existing customer.
Context:
- Customer: manufacturing company, 50 employees, focus on sustainability
- Existing relationship: 2 years, satisfied but buys ad hoc, no annual contract
- Our service now: AI automation of the procurement process
- Price range: 75,000–150,000 SEK/year depending on scope
- Goal: book a meeting, not close the deal in the email"
6. Negative instructions — what you don't want
Explicitly state what you want to avoid. Models are prone to adding things you didn't ask for — introductions, summaries, disclaimers. Remove them in the instruction.
"Write a LinkedIn post about our product launch.
Do NOT write:
- Opening phrases like 'Exciting news!' or 'Happy to share...'
- Closings like 'Contact us for more information'
- Excessive emojis (max 2 total)
- Passive voice
- Cliches like 'in the fast-changing business landscape'
Write:
- Direct, active voice
- A concrete figure or insight in the first sentence
- Max 150 words
- End with a question to the reader"
Telling it what you don't want is just as important as telling it what you do want.
Prompt engineering in practice
7. Self-criticism loops — let the model review itself
The first answer is rarely the best one. A simple technique: ask the model to critique its own response and improve it. It works surprisingly well for catching logical errors and weak phrasing.
Step 1:
"Write a response to this customer complaint: [insert complaint]"
Step 2 (after the response):
"Now review the response you just wrote. Identify:
1. Sentences that sound standardized or robotic
2. Promises or commitments that are vague
3. What the customer is still wondering after reading the response
Then, write an improved version that addresses these flaws."
8. Temperature control via instructions
You cannot change an LLM's temperature via the API when using a chat interface — but you can control the level of creativity through the prompt.
More conservative (lower "temperature"):
"Answer this legal question based solely on established
Swedish labor law. Do not speculate. If you are unsure, state it explicitly."
More creative:
"Brainstorm 15 unusual marketing ideas for our\nB2B product. Challenge conventional assumptions. Include at least
3 ideas that seem a bit crazy at first glance."
9. Persona charging — use a reference point
Instead of describing the desired tone with adjectives — refer to a concrete reference point. The model has been trained on vast amounts of text and understands connotations much more nuanced through concrete examples.
Weak: "Write in a friendly, professional and credible way."
Strong: "Write in the tone of an experienced accountant explaining
to a curious beginner — just like a good teacher: direct,
without unnecessary jargon, with a concrete example for every abstract concept."
Or for marketing:
"Write in the tone of Patagonia's sustainability communication — concrete,
fact-based, without greenwashing, with a hint of pride but no
arrogance."
10. Decomposition — break down complex tasks
A long, complex prompt often yields worse results than breaking the task into sequential steps. Each step builds on the previous one and gives the model a chance to "focus".
Instead of ONE long prompt about "writing a business plan":
Prompt 1: "Analyze these market data and identify the three
strongest market trends for our industry in 2026."
Prompt 2: "Based on the three trends you identified, describe
our most important competitive position. What are we uniquely good at?"
Prompt 3: "With those trends and our competitive advantage as a basis,
formulate three strategic goals for the next 12 months.
Each goal must be SMART."
Prompt 4: "Now, write a coherent business plan section that
integrates all of our analysis above."
The three most common mistakes
- Vague instructions. "Write well" is not an instruction. "Write for a CFO who needs to approve an investment, maximum 200 words, with the ROI in the first sentence" is an instruction.
- Do not specify output format. If you need JSON — ask for JSON. If you need a table — say so. Otherwise, the model will guess.
- Accept the first answer. Always ask for one follow-up: "Is this the best you can do?" or "What are the three weakest parts of what you just wrote?" This almost always results in a better second response.
A good prompt engineer is not someone who can "trick" AI. It is someone who thinks clearly enough to formulate exactly what they actually want.
Daniel Merthen
Want ready-made prompts to start from? Check out Polaris Prompt Library — a growing library of business-tailored prompts for Swedish contexts.