In this course, you will learn the principles, techniques, and best practices for designing effective prompts. This course introduces the basics of prompt engineering and progresses to advanced prompt techniques. You will also learn how to guard against prompt misuse and how to mitigate bias when interacting with FMs.
- Course level: Intermediate
- Duration: 4 hours
This course includes eLearning interactions.
In this course, you will learn to:
- Define prompt engineering and apply general best practices when interacting with FMs
- Identify the basic types of prompt techniques, including zero-shot and few-shot learning
- Apply advanced prompt techniques when necessary for your use case
- Identify which prompt techniques are best suited for specific models
- Identify potential prompt misuses
- Analyze potential bias in FM responses and design prompts that mitigate that bias
This course is intended for:
- Prompt engineers, data scientists, and developers
We recommend that attendees of this course have taken the following courses:
- Introduction to Generative AI – Art of the Possible (1 hour, digital course)
- Planning a Generative AI Project (1 hour, digital course)
- Amazon Bedrock Getting Started (1 hour, digital course)
- Basics of Foundation Models
- Fundamentals of Prompt Engineering
Prompt Types and Techniques
- Basic Prompt Techniques
- Advanced Prompt Techniques
- Model-Specific Prompt Techniques
- Addressing Prompt Misuses
- Mitigating Bias
Lesson 1: Basics of Large Language Models
In this lesson, you will develop a fundamental understanding of foundation models (FMs), including an understanding of a subset of FMs called large language models (LLMs). First, you will be introduced to the basic concepts of a foundation model such as self-supervised learning and finetuning. Next, you will learn about two types of FMs: text-to-text models and text-to-image models. Finally, you will learn about the functionality and use cases of LLMs, the subset of foundation models that most often utilize prompt engineering.
Lesson 2: Fundamentals of Prompt Engineering
In this lesson, you are introduced to prompt engineering, the set of practices that focus on developing, designing, and optimizing prompts to enhance the output of FMs for your specific business needs. This lesson first defines prompt engineering and describes the key concepts and terminology of prompt engineering. Then, the lesson uses an example prompt to show the different elements of a prompt. Finally, the lesson provides a list of general best practices for designing effective prompts.
Lesson 3: Basic Prompt Techniques
In this lesson, you will learn about basic prompt engineering techniques that can help you use generative AI applications effectively for your unique business objectives. First, the lesson defines zero-shot and few-shot prompting techniques. Then, the lesson defines chain-of-thought (CoT) prompting, the building block for several advanced prompting techniques. This lesson provides tips and examples of each type of prompt technique.
Lesson 4: Advanced Prompt Techniques
In this lesson, you will be introduced to several advanced techniques including: Self Consistency, Tree of Thoughts, Retrieval augmented generation (RAG), Automatic Reasoning and Tool-use (ART), and Reasoning and Acting (ReAct). Examples are provided to show each technique in practice.
Lesson 5: Model-specific Prompt Techniques
In this lesson, you will learn how to engineer prompts for a few of the most popular FMs including Amazon Titan, Anthropic Claude, and AI21 Labs Jurassic-2. You will learn about the different parameters you can configure to get customized results from the models. Next, you will learn about prompt engineering best practices for each of the models.
Lesson 6: Addressing Prompt Misuses
In this lesson, you will be introduced to adversarial prompts or prompts that are meant to purposefully mislead models. You will be learning about prompt injection and prompt leaking, two types of adversarial prompts. You will be provided with examples of each.
Lesson 7: Mitigating Bias
In this lesson, you will learn how bias is introduced into models during the training phase and how that bias can be reproduced in the responses generated by an FM. You will learn how biased results can be mitigated by updating the prompt, enhancing the dataset, and using training techniques.