AIF-C01

Introduction to Prompt Engineering

Prompt structure, techniques, risks and Bedrock Prompt Management.

  • 3 lessons
  • Module quiz

Prompt engineering is the practice of writing and refining the input given to a foundation model so that it produces better, safer and more consistent output. It is the cheapest and fastest way to improve results, because it changes no model weights.

Techniques such as clear instructions, context, examples (few-shot prompting) and step-by-step reasoning improve output, and inference parameters such as temperature control how predictable it is. Prompts also carry risks, such as prompt injection and jailbreaking, which must be managed.

What the exam expects

Questions test the techniques by name, choosing the right one for a scenario, the effect of temperature and other parameters, and recognizing prompt injection and jailbreak attempts and how Amazon Bedrock Guardrails help.

How this module is organised

Writing Effective Prompts with Prompt Engineering Techniques explains how prompts are built. Defending Against Prompt Attacks and Managing Prompts explains threats and how prompts are managed, and Using Prompt Patterns for Reliable, Structured Output explains how to obtain consistent results.

  1. Writing Effective Prompts with Prompt Engineering Techniques Lesson 1
  2. Defending Against Prompt Attacks and Managing Prompts Lesson 2
  3. Using Prompt Patterns for Reliable, Structured Output Lesson 3
  4. Practise and review
  5. Checkpoint Practice activities across the module
  6. Test your knowledge 11 questions