AISuffer
beginner Engineers Entrepreneurs Product Managers Managers

Prompt Engineering Fundamentals

Core prompt engineering techniques — from zero-shot to chain of thought and beyond.

What Is a Prompt

A prompt is a text instruction you give to an AI model. The quality of your prompt directly affects the quality of the result.

Anatomy of a Good Prompt

A good prompt has 4 elements:

  1. Role — who the model is in this context
  2. Context — background information
  3. Task — what needs to be done
  4. Format — what the response should look like
Role: You are an experienced B2B SaaS marketer.
Context: We're launching an AI tool for customer support automation.
Task: Write 3 headline variants for the landing page.
Format: Each variant on a separate line, under 10 words.

Core Techniques

Zero-shot

A simple question without examples:

Translate "AI agent" and explain the term.

Few-shot

A question with examples:

Turn a technical term into a metaphor:

API → A restaurant menu — you pick a dish, the kitchen makes it
Database → A library — everything's organized, there's a catalog for searching
Kubernetes →

Chain of Thought (CoT)

Step-by-step reasoning:

Should our 5-person startup use microservices?

Think step by step:
1. What are the benefits of microservices?
2. What are the downsides for a small team?
3. What alternatives exist?
4. What do you recommend and why?

System Prompt

Setting behavior for the entire session:

System: You are a Senior Python Developer with 10 years of experience.
Always use type hints. Use Python 3.12+.
Explain decisions briefly. Don't write code unless asked.

Common Mistakes

  1. Too vague: “Write something about AI” → specify topic, format, audience
  2. Too many tasks: one prompt = one task
  3. No constraints: specify length, format, language
  4. Skipping iterations: first response is rarely perfect — refine

Output Formats

Specify the desired format:

  • List: “Respond with a numbered list”
  • Table: “Format: Markdown table with columns…”
  • JSON: “Respond in JSON format: ”
  • Code: “Code only, no explanations”

Practice

The best way to learn is practice. Try these techniques right now in Claude or ChatGPT. More lifehacks in Top 5 Prompt Lifehacks.