Free JYnapse Knowledge Base · Cheat Sheet

Prompt Engineering Cheat Sheet

How to get reliable, repeatable output from ChatGPT, Claude, Gemini and the rest — the patterns that turn a toy into a tool. Model-agnostic.

For Everyone using AI at work Level Beginner → Intermediate Languages EN · BM · 中文 on request

1 Anatomy of a good prompt

  • Role — who the model should be.
  • Task — the single clear instruction.
  • Context — the facts it needs.
  • Format — how the answer should look.
  • Constraints — length, tone, do's & don'ts.
You are a financial analyst. (role)
Summarise this report for a CEO. (task)
<report>…</report> (context)
Output 5 bullets, plain English. (format)
Under 120 words. (constraint)

2 Be specific, not polite

Vague"Write about our product"
Specific"Write a 60-word LinkedIn post for HR managers about our leave-tracker; friendly, one CTA"

Every ambiguity is a decision the model makes for you. Remove them. "Please" and "thanks" don't change output — details do.

3 Show, don't just tell (few-shot)

Give 2–3 examples of the pattern you want:

Classify sentiment. Examples:
"Love it" → positive
"Waste of money" → negative
"It's okay" → neutral

Now: "Shipping was slow but works" →

Examples beat adjectives. One good example is worth a paragraph of instructions.

4 Structure the output

Return ONLY valid JSON:
{
  "summary": string,
  "risk": "low" | "medium" | "high",
  "actions": string[]
}

Ask for JSON, Markdown tables, or a fixed template when another system (or human) will read it. Say "only" so you don't get chatty preamble.

5 Let it think

  • For reasoning/maths: "Work through it step by step, then give the answer."
  • Ask for the reasoning before the conclusion, not after.
  • For a final-only answer, let it reason silently then "output just the result".

Complex judgement improves markedly when the model isn't forced to answer in the first token.

6 Ground it in your facts

Answer ONLY from the context below.
If the answer isn't there, say
"Not in the provided documents."

Context:
<<paste the source text>>

Question: …

Models invent confident nonsense (hallucinate). Pasting the source and forbidding outside knowledge is the single biggest reliability win.

7 Assign a role & audience

  • Role sets expertise & vocabulary: "You are a Malaysian tax accountant."
  • Audience sets the level: "Explain to a 12-year-old" vs "to a CFO".
  • Tone: "warm and plain" vs "formal and precise".

Same facts, right framing — the difference between unusable and on-brand.

8 Iterate like a pro

  • Start simple; add constraints only where output missed.
  • Wrong result? Tell it what was wrong and ask again — don't restart.
  • "Critique your answer, then improve it" often lifts quality.
  • Keep a prompt library of what works. Prompts are reusable assets.

9 Fix common failures

Too long"Max 100 words."
Made-up factsGround it; "say if unknown"
Ignores a rulePut it first & last; make it a list
Wrong formatGive a filled example
Too genericAdd audience + concrete details
InconsistentLower "temperature"; add examples

10 Use it safely

  • Never paste secrets, passwords or customer PII into public tools.
  • Verify facts, figures, code and legal/medical output — you own the result.
  • Check the tool's data-use terms; use an enterprise tier for sensitive work.
  • Disclose AI use where honesty matters; keep a human in the loop for decisions.

Treat AI as a fast, confident intern: brilliant drafts, always checked.