Basic Prompting Techniques

Prompts are the instructions you give an AI. The quality of your output depends heavily on how you phrase and structure these prompts.


1. Clear & Specific Instructions

  • Why: AI performs better when the task is clearly stated.
  • How: Instead of vague prompts, provide details.
  • Example (ChatGPT):
    • “Write about dogs.”
    • “Write a 150-word blog post about the benefits of owning a Labrador as a family pet, in a friendly tone.”
  • Example (Image AI):
    • “Draw a car.”
    • “A futuristic electric car, glowing neon lights, cyberpunk Tokyo background, ultra-detailed.”

2. Role Prompting

  • Why: Giving AI a “role” helps guide the style and perspective of the response.
  • How: Start your prompt with “Act as…”.
  • Example:
    • “Act as a career coach. Suggest tips for preparing for a property management interview.”
    • “Act as a travel guide. Plan a 3-day trip in Japan for food lovers.”

3. Context + Instruction + Format

  • Why: Adding context improves accuracy.
  • Formula:
    • Context (what it’s about)
    • Instruction (what to do)
    • Format (how to present it)
  • Example:
    • Context: “You are helping a student.”
    • Instruction: “Explain how machine learning works.”
    • Format: “Use simple language and bullet points.”

✅ Prompt:
“Explain how machine learning works to a high school student in 5 simple bullet points.”


4. Examples in Prompts (Few-shot prompting)

  • Why: Showing examples teaches AI the style/structure you want.
  • Example:
    • *“Translate the following sentences to French.
      1. Hello, how are you? → Bonjour, comment ça va ?
      2. I love ice cream → [your turn]”*

This guides the AI to follow the same structure.


5. Step-by-Step Instructions (Chain of Thought prompting)

  • Why: Breaking tasks into steps leads to clearer, more accurate responses.
  • Example:
    • “Explain photosynthesis.”
    • “Explain photosynthesis step by step: 1) light absorption, 2) conversion to energy, 3) glucose production, 4) oxygen release.”

6. Refinement (Iterative prompting)

  • Why: AI works best when you refine results.
  • How: Start broad, then narrow down.
  • Example:
    1. “Write me a poem about the ocean.”
    2. “Make it shorter, in 4 lines.”
    3. “Change the tone to motivational.”

7. Constraints & Styles

  • Why: Helps AI match your exact needs.
  • How: Add word count, tone, perspective, or formatting.
  • Examples:
    • “Write a LinkedIn post in under 100 words, persuasive, with emojis.”
    • “Generate a recipe in the style of Gordon Ramsay.”
    • “Create an image in the style of Van Gogh, pastel colors, night sky.”

🔑 Key Takeaways

  • Be clear (avoid vagueness).
  • Add context, role, and format.
  • Use examples to guide output.
  • Refine results by iterating.
  • Apply constraints (tone, length, style).