Introduction to Prompting
Pre-Flight Briefing
The Anatomy of a Prompt
Prompt engineering is a relatively new discipline for developing and optimizing prompts to efficiently use language models (LMs) for a wide variety of applications and research topics.
A well-crafted prompt typically contains up to four key elements:
1. Instruction - a specific task or instruction you want the model to perform.
2. Context - external information or additional context that can steer the model to better responses.
3. Input Data - the input or question that we are interested to find a response for.
4. Output Indicator - the type or format of the output.
Reference Examples
Ineffective (Focusing on what NOT to do)
The following is an agent that recommends movies to a customer. DO NOT ASK FOR INTERESTS. DO NOT ASK FOR PERSONAL INFORMATION.Effective (Being specific and direct)
The agent is responsible to recommend a movie from the top global trending movies. It should refrain from asking users for their preferences...