AIF-C01 notes
Essentials of prompt engineering

Understanding Prompts

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

Four elements of a prompt

ElementPurposeInventory example
InstructionsThe task to perform"Determine which orders can be fulfilled and which items need restocking"
ContextExternal information to guide the model"This is essential for inventory management in retail"
Input dataWhat to respond toThe list of orders and inventory
Output indicatorThe type or format of output"Fulfillment status:"

The scenario's first prompt had only instructions. It lacked context, input data, and an output indicator.

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.

On this page