Advanced Prompting Techniques

    ~8 min · ChatGPT, Gemini

    Chain-of-thought

    When you ask AI to think step by step, you get much more accurate answers. Instead of 'guessing' the result, the model breaks the problem into smaller parts and solves them sequentially.

    Without CoT

    “How much will I pay for 3 products with a 20% discount and 21% VAT?”

    With CoT

    “Think step by step: I have 3 products at $50 each. First calculate the total, then apply a 20% discount, and finally add 21% VAT.”

    Role-play

    When you tell AI who to be, it adapts its style, vocabulary, and depth. Try specifying a profession, years of experience, or target audience.

    Example 1

    “You are an experienced employment lawyer. Explain my rights when my employer wants to terminate my contract.”

    Example 2

    “You are a fitness trainer with 10 years of experience. Create a weekly workout plan for a beginner who wants to lose weight.”

    Few-shot Prompting

    Instead of describing the format, just show 2–3 examples. AI will understand the pattern and apply it to new input.

    Input: Great product, highly recommend!

    Output: Positive


    Input: Total disappointment, money wasted.

    Output: Negative


    Input: Works well, but delivery took too long.

    Output: ?

    Combining Techniques

    You get the best results by combining all techniques — role + context + few-shot + CoT:

    "You are a senior marketing strategist (role). I'm analyzing the performance of 3 ad campaigns (context). Here are examples of my previous campaign evaluations: [example 1], [example 2] (few-shot). Think step by step and for each campaign evaluate ROI, targeting, and recommendations (CoT + format)."

    Try it yourself

    Open ChatGPT and try this prompt: "You are a financial advisor with 15 years of experience. Think step by step and analyze whether I should invest $5,000 in ETF funds or pay off my mortgage at 4.5% interest. Consider inflation, tax benefits, and risk."

    Open ChatGPT

    Key terms

    Chain-of-thought

    A technique where you ask AI to think step by step before giving a final answer.

    Role-play

    Assigning a specific role or persona for AI to adopt when responding.

    Few-shot

    Providing 2–3 examples of desired output directly in the prompt.

    Temperature

    A parameter controlling response creativity — low = precise, high = creative.

    Hallucination

    When AI generates convincing-sounding but factually incorrect information.

    Summary

    • Chain-of-thought forces AI to think step by step — ideal for complex tasks.
    • Role-play changes the style and depth of responses — the more specific the role, the better the output.
    • Few-shot examples show AI the exact format you expect — saving time on revisions.