Prompting and Prompt Engineering
Overview
In this part, we look into providing instructions to large language models to create outputs that are more in line with our expectations. We start by discussing the concept of prompting, and move to prompt engineering, which is the practice of systematically improving prompts. Then, we look at a few key elements of prompting, including providing clear instructions, providing reference text, and asking models to reason. Finally, we discuss the use of automatic prompting to improve existing prompts.
The chapters in this part are as follows.
- Prompting introduces the term prompting and discusses how the prompt influences large language model outputs.
- Prompt Engineering discusses the practice of systematically refining prompts to achieve desired outputs.
- Clear Instructions discusses the need to provide clear instructions to large language models, including the use of contextualization and persona.
- Providing Reference Text outlines how the outputs of large language models can be constrained to given input text, and how large language models can be given examples of output formatting.
- Asking Models to Reason provides an example of chain-of-thought prompting, a technique where large language models are provided some information of how to determine the answer.
- Automatic Prompting discusses the use of tools for automatically creating and improving prompts.