We ❤️ Open Source

A community education resource

6 min read

What is prompt engineering?

Learn these 3 prompt styles that unlock better AI results, and when to use each one.

Prompt engineering sounds technical, but it’s really just the skill of giving AI the right instructions. Whether you’re trying to write an email, summarize a document, or brainstorm a marketing idea, how you ask matters. Most people treat AI like a search engine. That’s a mistake. You’re not searching—you’re scripting a collaborator. If you want better results, you need better prompts.

Why it matters

Think of AI as a smart but literal intern. If you ask it for “a list of project ideas,” it’ll give you vague responses. But if you specify the audience, format, tone, and context, you get something useful.

For professionals using tools like ChatGPT, Claude, or Gemini, prompt engineering turns AI from a novelty into a real productivity tool.

Types of prompting: Zero-shot, few-shot, and many-shot

Prompting isn’t one-size-fits-all. Depending on your task, you’ll use one of two strategies. One is “no example” for things that AI is already good at. But when you want to guide the output, you need to provide an example to guide the tool.

Prompt typeWhat it isWhen to use
Zero-shotOne instruction, no examplesFast tasks, simple formats, well-trained models
Few-shotInstruction + 1–3 examplesStyle mimicry, short creative tasks, custom formatting
Many-shotInstruction + 4+ examplesComplex workflows, multi-step reasoning, specialized writing

Zero-shot prompting: Simple and fast

Zero-shot prompting is the fastest way to get started. You write one clear instruction and expect the model to handle it without examples.

Prompt vs. output example (zero-Shot)

PromptOutput
“Write a summary of this blog post: [insert content]”“This blog post explains how remote work policies are evolving, especially in hybrid workplaces…”

Works great for summaries, translations, and basic outlines. But zero-shot prompting can be hit-or-miss when the task involves nuance or formatting.

Few-shot prompting: Add a little context

Few-shot prompting adds a couple of examples. It teaches the AI how you want things done—what tone, structure, or style to follow.

Prompt vs. output example (few-shot)

PromptOutput
Create a social post like the ones below:
Example 1: 📢 Big news in HR today…
Example 2: “🔍 Curious how hybrid work is evolving?”
Now write one about a new hiring tool.
“🚀 New AI hiring tools are changing how teams recruit. Learn how they cut bias and save time.”

Few-shot is ideal for marketing copy, customer responses, or internal comms—anywhere consistency matters.

Many-shot prompting: Train it like a template

Many-shot prompting works like a lightweight training set. You’re not just asking for a task—you’re creating a pattern for the AI to follow.

Use it for reports, emails, or structured outputs that need depth or precision.

Prompt vs. output example (many-shot)

PromptOutput
Given the following examples, write a fourth.

Example 1
Industry: Retail
Challenge: Shrinking margins
Solution: Dynamic pricing

Example 2
Industry: Healthcare
Challenge: Staffing shortages
Solution: AI-driven scheduling

Example 3
Industry: Logistics
Challenge: Delayed shipments
Solution: Predictive analytics

Your turn: Industry: Education
Industry: Education
Challenge: Student engagement
Solution: Personalized learning paths via adaptive AI platforms

Many-shot works best when structure is critical—like product feature tables, case study drafts, or sales briefs.

How I manage my prompts

I don’t rely on memory. I keep my best prompts in Notion, organized by function: Writing, summarizing, outreach, ideation. Why? Because prompts evolve. You write one, tweak it, reuse it. That’s how they get better.

Keeping prompts versioned and organized helps you scale your own AI playbook. Think of it like a knowledge base, but for your brain–machine interface.

Tools that help prompt engineering

Here are a few tools that help me stay productive:

AIPRM

AIPRM is a browser extension for ChatGPT that gives you pre-built prompts for SEO, writing, marketing, and more. Helpful if you’re stuck or just want to explore new approaches. Though this one is pretty expensive for the paid version. 

AIPRM example

Prompt Forge

Prompt Forge from PromptDen is a prompt library with editing and remixing features. You can fork and fine-tune prompts from other users. Think of it like GitHub, but for prompts.

Prompt Forge from PromptDen example

Notion + ChatGPT integration

While Notion isn’t a prompt manager by design, it becomes powerful when you store and test prompts there. I use it as my scratchpad for iterating, testing, and refining.

Notion and ChatGPT Integration example

When to use which prompt strategy

Use caseRecommended strategyWhy
Summarizing a news articleZero-shotThe model’s already good at it
Writing social copy in a set toneFew-shotYou need tone/voice consistency
Building a structured FAQ documentMany-shotRepetition with varied content requires strong formatting
Drafting customer support repliesFew-shotTone and accuracy are critical
Creating sales enablement contentMany-shotRequires repeated structure and deep personalization

Common mistakes to avoid

  1. Vagueness: “Write a report” is too broad. Instead: “Write a 300-word internal report on Q1 sales trends using a business tone.”
  2. No context: If the model doesn’t know who the audience is, it won’t tailor the tone.
  3. No iteration: The first output is rarely the best. Save your prompts, revise, and re-test.
  4. Overloading the prompt: Don’t stack five tasks in one prompt. Break it into parts.

How to start prompt engineering without overthinking it

Prompt engineering isn’t coding. You don’t need to be technical. You just need to know what good output looks like—and how to reverse-engineer it.

Start here:

  1. Pick one AI task you do weekly (emails, summaries, ideas).
  2. Write the instruction clearly, like you’re briefing a freelancer or a new employee.
  3. Add an example or two.
  4. Save that prompt and reuse it.
  5. Refine based on output quality.

Once you’ve got 5–10 solid prompts, you’ll realize you’re not “using AI”—you’re managing it.

Final thought

Prompt engineering isn’t about tricking the model. It’s about being intentional. The AI can do a lot, but it needs you to steer. A vague prompt leads to vague results. A structured prompt—with examples and purpose—turns AI into a serious productivity tool.

So start small. Write one better prompt. Save it. Then do it again. That’s how prompt engineering works.If you want more prompting tips, I send out a newsletter called The Artificially Intelligent Enterprise twice a week. On Tuesday’s there’s an AI lesson and on Friday I include a detailed prompt of the week at the end of that newsletter, subscribe and you can get more examples you can use and adapt for your needs.

More from We Love Open Source

About the Author

CEO and Co-Founder, Peripety Labs

Read Mark Hinkle's Full Bio

The opinions expressed on this website are those of each author, not of the author's employer or All Things Open/We Love Open Source.

Want to contribute your open source content?

Contribute to We ❤️ Open Source

Help educate our community by contributing a blog post, tutorial, or how-to.

This year we're hosting two world-class events!

Check out the AllThingsOpen.ai summary and join us for All Things Open 2025, October 12-14.

Open Source Meetups

We host some of the most active open source meetups in the U.S. Get more info and RSVP to an upcoming event.