# Prompt Engineering

Part of the Artificial Intelligence Merit Badge Digital Resource Guide: [Introduction & Overview](https://merit-badge.university/merit-badges/artificial-intelligence/guide/index.md)

*6. Developing AI Skills*

> **6c.** Explain the importance of prompt engineering when using AI to create better output.

You have learned five methods of communicating with AI. Now it is time to learn how to communicate **well**. This is called **prompt engineering** — the skill of crafting your input to an AI system so that you get the best possible output. It is one of the most practical skills you will learn in this merit badge, and you will use it every time you interact with an AI chatbot or generative AI tool.

![Over-the-shoulder view of a Scout typing a detailed prompt into a chatbot interface on a computer. The screen shows a well-structured prompt with clear formatting. Home desk setting.](https://ik.imagekit.io/doulacoop/tr:w-800/mbu-assets/merit-badges/artificial-intelligence/guide/prompt-engineering-screen?v=ebb210f5)

---

## Why Prompts Matter So Much

An AI does not read your mind. It can only work with what you give it. A vague, unclear prompt produces a vague, unclear response. A specific, well-structured prompt produces a focused, useful response. The AI has not changed — only your instructions have.

Think of it this way: if you asked a friend to "draw something cool," you would get a very different result than if you said "draw a red-tailed hawk perched on a pine branch in a watercolor style." Both are valid requests, but one gives the person (or the AI) far more to work with.

> **Did You Know?**
>
> "Prompt engineer" is now an actual job title at many technology companies. Some prompt engineering positions pay over $100,000 per year. Companies have realized that the difference between a mediocre AI output and an excellent one often comes down to how the prompt was written — not the AI model itself.

---

## The Five Principles of Good Prompt Engineering

### 1. Be Specific

Tell the AI exactly what you want. Include details about the topic, scope, length, format, and audience.

| Weak Prompt            | Strong Prompt                                                                                                                                                       |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| "Tell me about space." | "Explain three differences between rocky planets and gas giants in our solar system. Use simple language appropriate for a 7th grader."                             |
| "Write a story."       | "Write a 300-word adventure story about a Scout who gets lost during a hiking trip in the Appalachian Mountains and uses orienteering skills to find the way back." |

### 2. Provide Context

Give the AI background information so it understands the situation. Context helps the AI tailor its response to your specific needs.

| Without Context          | With Context                                                                                                                                                                                                                                               |
| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| "Help me with my essay." | "I am writing a 5-paragraph persuasive essay for my 8th grade English class arguing that schools should start later in the morning. I have my thesis and first body paragraph done. Can you help me outline the remaining body paragraphs and conclusion?" |

### 3. Set the Format

Tell the AI how you want the output structured. Do you want a list? A table? A step-by-step guide? Bullet points? A paragraph? If you do not specify, the AI will guess — and it may guess wrong.

**Example:** "Create a comparison table with three columns: Feature, Narrow AI, and General AI. Include at least five rows covering different characteristics."

### 4. Use Examples

Showing the AI an example of what you want is often more effective than describing it. This technique is sometimes called **few-shot prompting** — you give the AI a few examples, and it follows the pattern.

**Example:** "I need to write vocabulary flashcards. Here is my format:

- **Word:** Photosynthesis
- **Definition:** The process plants use to convert sunlight into energy
- **Example sentence:** During photosynthesis, leaves absorb carbon dioxide and release oxygen.

Now create flashcards in this same format for these words: mitosis, osmosis, symbiosis."

### 5. Iterate and Refine

Your first prompt rarely produces the perfect result — and that is completely normal. Prompt engineering is an **iterative process**. You send a prompt, evaluate the response, and then adjust your prompt to get closer to what you want.

**Iteration example:**

1. First prompt: "Write about the American Revolution" → Too broad
2. Second prompt: "Write about the causes of the American Revolution for a school report" → Better, but too long
3. Third prompt: "Write a 200-word summary of three main causes of the American Revolution, written for an 8th grade audience" → Just right

> **Tip**
>
> Think of prompt engineering like giving directions to someone who is new in town. "Go to the store" is not very helpful. "Turn left on Oak Street, drive two blocks, and the grocery store is on the right side — it has a blue sign" will get them exactly where they need to go. The more precise your directions, the better the result.

---

## Common Prompt Techniques

Beyond the five principles, here are some specific techniques that can dramatically improve your results:

### Role Assignment

Tell the AI to adopt a specific role or perspective. This shapes the tone, vocabulary, and depth of the response.

**Example:** "You are an experienced marine biologist explaining coral reef ecosystems to a group of middle school students on a field trip. Explain why coral reefs are important and what threatens them."

### Chain-of-Thought Prompting

Ask the AI to show its reasoning step by step. This often produces more accurate and complete answers, especially for math, logic, and analysis tasks.

**Example:** "Solve this problem step by step, showing your work at each stage: If a Scout troop of 12 members needs to raise $3,600 for summer camp, and they have already earned $1,200 from a car wash, how much does each Scout need to raise from popcorn sales?"

### Constraints

Set clear boundaries on what the AI should and should not include.

**Example:** "Explain quantum computing in exactly 100 words. Do not use any technical jargon. Do not use analogies involving cats."

---

## Why This Matters

Prompt engineering is important for several reasons:

1. **Efficiency** — Good prompts save time. Instead of going back and forth five times, a well-crafted prompt can get you what you need on the first or second try.
2. **Accuracy** — Specific prompts lead to more accurate, relevant responses with fewer errors and hallucinations.
3. **Critical thinking** — Writing a good prompt forces you to think clearly about what you actually need. This is a valuable skill far beyond AI.
4. **Equity** — Anyone can learn prompt engineering. You do not need to know how to code or understand the math behind AI. This makes AI more accessible to everyone.

> **Safety First!**
>
> No matter how good your prompt is, always verify the AI's output. Prompt engineering improves the quality of responses, but it does not guarantee accuracy. AI can still produce errors, outdated information, or biased content. Use AI-generated content as a starting point, not a final answer.

---

## Preparing for Your Discussion

When you explain prompt engineering to your counselor, aim to cover:

**Discussion Preparation** — Be ready to explain:

- [ ] What prompt engineering is and why it matters
- [ ] At least three of the five principles (specificity, context, format, examples, iteration)
- [ ] A real example showing the difference between a weak and strong prompt
- [ ] Why iteration is a normal part of the process
- [ ] Why you should still verify AI output even after writing a great prompt

[IBM — What Is Prompt Engineering?](https://www.ibm.com/think/topics/prompt-engineering): IBM's comprehensive guide to prompt engineering concepts, techniques, and best practices.

[Prompt Engineering Guide](https://www.promptingguide.ai/): A detailed, community-maintained resource covering prompt engineering techniques from beginner to advanced.

---

- Previous: [Communicating with AI](https://merit-badge.university/merit-badges/artificial-intelligence/guide/req6b/index.md)
- Next: [Writing Clear Instructions](https://merit-badge.university/merit-badges/artificial-intelligence/guide/req6d/index.md)
