Understanding Prompts
Why prompts matter
The story: Improving how you order at a restaurant is the quickest way to get a better meal. You don't need to retrain the chef or rebuild the kitchen. You just say what you want more clearly, mention you're allergic to peanuts, and point to the dish you had last time.
In AI/AWS terms: Improving prompts is the fastest way to get value from generative AI. Good prompts:
- Improve capability and safety
- Add domain knowledge and tools without changing parameters or fine-tuning
- Turn higher-quality input into higher-quality output
For the exam: Prompt engineering adds knowledge and improves output without changing parameters or fine-tuning.
Four elements of a prompt
The story: A good order to a tailor has four parts: what you want done ("take in this jacket"), why ("it's for a wedding, so it should look sharp"), the thing itself (you hand over the jacket), and how you want it back ("on a hanger, by Friday").
In AI/AWS terms:
| Tailor order | Element | Purpose | Inventory example |
|---|---|---|---|
| What to do | Instructions | The task to perform | "Determine which orders can be fulfilled and which items need restocking" |
| Why | Context | External information to guide the model | "This is essential for inventory management in retail" |
| The jacket | Input data | What to respond to | The list of orders and inventory |
| How to return it | Output indicator | The type or format of output | "Fulfillment status:" |
The scenario's first prompt had only instructions, like saying "fix this" without handing over the jacket. It lacked context, input data, and an output indicator.
For the exam: The four elements are instructions, context, input data, and output indicator.
Negative prompting
The story: Telling the tailor what you don't want: "no shoulder pads, no shiny buttons, nothing like that jacket you made last time."
In AI/AWS terms: Negative prompting tells the model what not to produce, with examples or instructions of undesirable output, such as hate speech, explicit content, or biased language, to steer it away from them.
For the exam: Negative prompting = describing what the model should avoid.