A framework (also called a conceptual framework) is a type of tool that can help organize ideas for ease of use. Frameworks sometimes offer an easy-to-remember mnemonic or initialism to aid users in remembering and applying their components. For example, the four Ws framework for evaluating information resources helps users remember the components: Who, What, Where, When. Prompt frameworks help users of artificial intelligence tools recall components that can help them provide useful information to an LLM in the form of a prompt in order to improve the relevance of the LLMs outputs. Prompt engineering, discussed below, is the process of developing and using a prompt framework tailored for a specific need.
Prompt engineering is the process of crafting effective queries (or prompts) that enable generative artificial intelligence (Gen AI) to produce good results. Prompt engineering expands on a simple question to provide Gen AI with instructions related to context, examples, desired output, and refinements to your query.
OpenAI, the organization behind the GPT (Generative Pre-trained Transformer) group of large language models, provides "strategies and tactics" for getting better results from large language models. This link takes you to it's prompt engineering advice: https://platform.openai.com/docs/guides/prompt-engineering
Additionally, numerous prompt engineering frameworks can help Gen AI users craft prompts. These frameworks may offer users ways to remember key components to include in their queries using acronyms or other mnemonic devices.
Numerous frameworks have emerged to help Gen AI users craft effective prompts. Below is a sampling of frameworks:
Finding a good framework for your query involves considering the type of question being asked and the type of output required. Ultimately, a good fitting framework will prompt you to provide key information and instructions. Adopting one or more frameworks that fit different purposes can equip users with tools to make working with Gen AI less frustrating and more productive. For example, the PICO framework (patient, population, problem; intervention or exposure; comparison intervention or exposure; outcome of interest) may be a good fit for many clinical questions
| Character/Role |
Tell the AI what role to assume or points of view to take to guide the AI to provide a specific type of response. For example: "You are medical school faculty teaching first year medical students about evidence-based medicine. Provide an outline for an introductory lecture that explains and provides examples of EBM." |
| Be clear, concise, explicit | Describe the task in detail. For example: "Create a table of the 5 step EBM process. Use EBM steps as column headers. Use rows to provide explanations" |
| Provide examples | Use examples to give guidance on the output. For example: Match the tone and style of 'For Dummies' texts in the response". Providing examples of what you do not what can also be an effective strategy. |
| Additions/requirements | Review the initial output and provide additional information, such as scope, boundaries, and privacy considerations. For example, you might wish to limit the word count in the response. |
| Appraise/evaluate | Review the output and make adjustments in the description of the task or to provide additional details to further shape the output. It can be helpful to your appraisal to ask the AI to explain its steps and reasoning in its output. |
| Prompt for a prompt | Ask the AI to generate an effective prompt that includes the examples and features you require. Use the prompt it generates |
| Interactive/ask me | Ask the AI to ask you questions that clarify the request and required output. For example, "Provide an outline for an introductory lecture on EBM and ask me which components to break down into sub units." |
| Emotions | Tell the AI the importance of an accurate response. For example, your query might instruct the AI that a specific population will be given the at-home care instructions it produces, so careful consideration of competing advice is required. |
| Prompt the AI to tell you it can't fulfill your request | Tell the AI to return a response of "N/A" if the response you require isn't part of its knowledge base or capabilities. This can help reduce AI "hallucinations" and fabricated results. |