'Prompt Engineering for ChatGPT' course note: Part 3 Prompt Patterns
Prompt patterns Prompt pattern is a pattern used to struct words in the prompt to solve a problem in LLM To achive different goals like: recognize input, format output, improve prompt, have interaction, limit scope. Example pattern: The Persona pattern "Act as ..., perform task Y": ask LLM as the professional or job title you know who can answer. You can ask a professional, an animal, an object. For example: Act as a professional standup comedian, whatever I tell you, make it into a joke. Example pattern: Helpful Assistant pattern prevent LLM from generating negative outputs "You are a helpful AI assistant. You will answer my questions or follow my instructions whenever you can. You will never answer my questions in a way that is insulting." Prompt pattern catalog From "A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPT ", 2023. Define prompt pattern like software pattern. Define key ideas as a series of fundamental contextual statements....