# Prompt Engineering

> You write a prompt, test it and fix it. You stop when the answers are good.

**Field:** Artificial Intelligence  
**Category:** Working with AI  
**Also known as:** Prompt Design, Prompt Writing

## Think of it like

Think of it like you cook a dish, taste it, and fix it. You do this till it is just right.

## Definition

Prompt engineering is the work of writing and testing prompts until a model gives good answers every time. You try a prompt, read what comes back, and change the wording, the examples or the format. Then you test it again on many inputs, not just one. Small changes can make a big difference. It is how teams get steady results from a model without training it.

## Example

Emma's app writes product blurbs. Her first prompt makes them too long, so she adds a 40-word limit and two good samples. She tests it on 50 products before she ships it.

## Why it matters

It is the cheapest and fastest way to make a model better at a job. It needs no new training.

## Common mistake

Testing a prompt on one or two inputs. A prompt that works once can still fail on the next hundred.

## Three principles

- **Try, read, change.** A loop, not one shot.
- **Test many inputs.** Not just one.
- **No training needed.** Only the words change.

## Related terms

- [Prompt (AI)](https://learn.benibix.com/term/ai/prompt)
- [Context Engineering](https://learn.benibix.com/term/ai/context-engineering)
- [Few-Shot Prompting](https://learn.benibix.com/term/ai/few-shot-prompting)
- [System Prompt](https://learn.benibix.com/term/ai/system-prompt)
- [Iterative Prompting](https://learn.benibix.com/term/ai/iterative-prompting)
- [Meta-Prompting](https://learn.benibix.com/term/ai/meta-prompting)
- [DSPy](https://learn.benibix.com/term/development/dspy)

## Told apart from

- [Prompt Engineering vs Context Engineering](https://learn.benibix.com/compare/prompt-engineering-vs-context-engineering): People often think context engineering is a new name for prompt engineering. Prompt engineering is about the words in one prompt. That is the task, the examples and the format. Context engineering is about all that goes in the window each time. That takes in files, search results, tool output and the chat so far. In agents, most of that text was never typed by a person.

## Taught in

- [Prompt Engineering Basics](https://learn.benibix.com/learn/ai-working-with-ai/prompt-engineering-basics): Prompt Engineering, 1/16

![A loop of four steps: write the prompt, run it on many inputs, read the answers, change the prompt. An exit leads out once the answers hold up.](https://learn.benibix.com/diagrams/pr-prompt-loop.svg)

---

Source: https://learn.benibix.com/term/ai/prompt-engineering
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-18
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
