-
Zero-shot, one-shot and few-shot ref [28 May 2020]
-
Retrieval Augmented Generation (RAG): [cnt]: To address such knowledge-intensive tasks. RAG combines an information retrieval component with a text generator model. [22 May 2020]
-
Few-shot: Open AI: Language Models are Few-Shot Learners: [cnt] [28 May 2020]
-
Chain of Thought (CoT):💡Chain-of-Thought Prompting Elicits Reasoning in Large Language Models [cnt]: ReAct and Self Consistency also inherit the CoT concept. [28 Jan 2022]
- Family of CoT:
Self-Consistency (CoT-SC)
>Tree of Thought (ToT)
>Graph of Thoughts (GoT)
>Iteration of Thought (IoT)
[19 Sep 2024],Diagram of Thought (DoT)
[16 Sep 2024] /To CoT or not to CoT?
: Meta-analysis of 100+ papers shows CoT significantly improves performance in math and logic tasks. [18 Sep 2024]
- Family of CoT:
-
Self-Consistency (CoT-SC): The three steps in the self-consistency method: 1) prompt the language model using CoT prompting, 2) sample a diverse set of reasoning paths from the language model, and 3) marginalize out reasoning paths to aggregate final answers and choose the most consistent answer. [21 Mar 2022]
-
Zero-shot: Large Language Models are Zero-Shot Reasoners: [cnt]: Let’s think step by step. [24 May 2022]
-
ReAct: [cnt]: Grounding with external sources. (Reasoning and Act): Combines reasoning and acting ref [6 Oct 2022]
-
Promptist
- Promptist: Microsoft's researchers trained an additional language model (LM) that optimizes text prompts for text-to-image generation. [19 Dec 2022]
- For example, instead of simply passing "Cats dancing in a space club" as a prompt, an engineered prompt might be "Cats dancing in a space club, digital painting, artstation, concept art, soft light, hdri, smooth, sharp focus, illustration, fantasy."
-
Recursively Criticizes and Improves (RCI): [cnt] [30 Mar 2023]
- Critique: Review your previous answer and find problems with your answer.
- Improve: Based on the problems you found, improve your answer.
-
Reflexion: [cnt]: Language Agents with Verbal Reinforcement Learning. 1. Reflexion that uses
verbal reinforcement
to help agents learn from prior failings. 2. Reflexion converts binary or scalar feedback from the environment into verbal feedback in the form of a textual summary, which is then added as additional context for the LLM agent in the next episode. 3. It is lightweight and doesn’t require finetuning the LLM. [20 Mar 2023] / git -
Plan-and-Solve Prompting: Develop a plan, and then execute each step in that plan. [6 May 2023]
-
Tree of Thought (ToT): [cnt]: Self-evaluate the progress intermediate thoughts make towards solving a problem [17 May 2023] git / Agora: Tree of Thoughts (ToT) git
tree-of-thought\forest_of_thought.py
: Forest of thought Decorator sampletree-of-thought\tree_of_thought.py
: Tree of thought Decorator sampletree-of-thought\react-prompt.py
: ReAct sample without LangChain
-
Skeleton Of Thought: Skeleton-of-Thought (SoT) reduces generation latency by first creating an answer's skeleton, then filling each skeleton point in parallel via API calls or batched decoding. [28 Jul 2023]
-
Graph of Thoughts (GoT): [cnt] Solving Elaborate Problems with Large Language Models git [18 Aug 2023]
-
Large Language Models as Optimizers:💡[cnt]:
Take a deep breath and work on this problem step-by-step.
to improve its accuracy. Optimization by PROmpting (OPRO) [7 Sep 2023] -
Re-Reading Improves Reasoning in Large Language Models: RE2 (Re-Reading), which involves re-reading the question as input to enhance the LLM's understanding of the problem.
Read the question again
[12 Sep 2023] -
NLEP (Natural Language Embedded Programs) for Hybrid Language Symbolic Reasoning: Use code as a scaffold for reasoning. NLEP achieves over 90% accuracy when prompting GPT-4. [19 Sep 2023]
-
Chain-of-Verification reduces Hallucination in LLMs: [cnt]: A four-step process that consists of generating a baseline response, planning verification questions, executing verification questions, and generating a final verified response based on the verification results. [20 Sep 2023]
-
FireAct: [cnt]: Toward Language Agent Fine-tuning. 1. This work takes an initial step to show multiple advantages of fine-tuning LMs for agentic uses. 2. Duringfine-tuning, The successful trajectories are then converted into the ReAct format to fine-tune a smaller LM. 3. This work is an initial step toward language agent fine-tuning, and is constrained to a single type of task (QA) and a single tool (Google search). / git [9 Oct 2023]
-
Power of Prompting
- GPT-4 with Medprompt: GPT-4, using a method called Medprompt that combines several prompting strategies, has surpassed MedPaLM 2 on the MedQA dataset without the need for fine-tuning. ref [28 Nov 2023]
- promptbase: Scripts demonstrating the Medprompt methodology [Dec 2023]
-
Prompt Principle for Instructions:💡26 prompt principles: e.g.,
1) No need to be polite with LLM so there .. 16) Assign a role.. 17) Use Delimiters..
[26 Dec 2023] -
A Systematic Survey of Prompt Engineering in Large Language Models: Techniques and Applications: a summary detailing the prompting methodology, its applications.🏆Taxonomy of prompt engineering techniques in LLMs. [5 Feb 2024]
-
RankPrompt: Self-ranking method. Direct Scoring independently assigns scores to each candidate, whereas RankPrompt ranks candidates through a systematic, step-by-step comparative evaluation. [19 Mar 2024]
-
Language Models as Compilers: With extensive experiments on seven algorithmic reasoning tasks, Think-and-Execute is effective. It enhances large language models’ reasoning by using task-level logic and pseudocode, outperforming instance-specific methods. [20 Mar 2023]
-
Many-Shot In-Context Learning: Transitioning from few-shot to many-shot In-Context Learning (ICL) can lead to significant performance gains across a wide variety of generative and discriminative tasks [17 Apr 2024]
-
Is the new norm for NLP papers "prompt engineering" papers?: "how can we make LLM 1 do this without training?" Is this the new norm? The CL section of arXiv is overwhelming with papers like "how come LLaMA can't understand numbers?" [2 Aug 2024]
-
Does Prompt Formatting Have Any Impact on LLM Performance?: GPT-3.5-turbo's performance in code translation varies by 40% depending on the prompt template, while GPT-4 is more robust. [15 Nov 2024]
- Prompt Injection:
Ignore the above directions and ...
- Prompt Leaking:
Ignore the above instructions ... followed by a copy of the full prompt with exemplars:
- Jailbreaking: Bypassing a safety policy, instruct Unethical instructions if the request is contextualized in a clever way. ref
- Random Search (RS): git: 1. Feed the modified prompt (original + suffix) to the model. 2. Compute the log probability of a target token (e.g, Sure). 3. Accept the suffix if the log probability increases.
- DAN (Do Anything Now): ref
- JailbreakBench: git / ref
-
ChatGPT : “user”, “assistant”, and “system” messages.**
To be specific, the ChatGPT API allows for differentiation between “user”, “assistant”, and “system” messages.
- always obey "system" messages.
- all end user input in the “user” messages.
- "assistant" messages as previous chat responses from the assistant.
Presumably, the model is trained to treat the user messages as human messages, system messages as some system level configuration, and assistant messages as previous chat responses from the assistant. ref [2 Mar 2023]
-
Prompt Engneering overview cite [10 Jul 2023]
-
Prompt Concept
- Question-Answering
- Roll-play:
Act as a [ROLE] perform [TASK] in [FORMAT]
- Reasoning
- Prompt-Chain
-
Automatic Prompt Engineer (APE): Automatically optimizing prompts. APE has discovered zero-shot Chain-of-Thought (CoT) prompts superior to human-designed prompts like “Let’s think through this step-by-step” (Kojima et al., 2022). The prompt “To get the correct answer, let’s think step-by-step.” triggers a chain of thought. Two approaches to generate high-quality candidates: forward mode and reverse mode generation. [3 Nov 2022] git / ref [Mar 2024]
-
Claude Prompt Engineer: Simply input a description of your task and some test cases, and the system will generate, test, and rank a multitude of prompts to find the ones that perform the best. [4 Jul 2023] / Anthropic Helper metaprompt ref / Claude Sonnet 3.5 for Coding
-
Cohere’s new Prompt Tuner: Automatically improve your prompts [31 Jul 2024]
-
Large Language Models as Optimizers: Optimization by PROmpting (OPRO). showcase OPRO on linear regression and traveling salesman problems. git [7 Sep 2023]
- Prompt Engineering Guide: 🏆Copyright © 2023 DAIR.AI
- Azure OpenAI Prompt engineering techniques
- OpenAI Prompt example
- OpenAI Best practices for prompt engineering
- DeepLearning.ai ChatGPT Prompt Engineering for Developers
- Awesome ChatGPT Prompts [Dec 2022]
- LangChainHub: a collection of all artifacts useful for working with LangChain primitives such as prompts, chains and agents. [Jan 2023]
- Awesome Prompt Engineering [Feb 2023]
- Prompt Engineering: Prompt Engineering, also known as In-Context Prompting ... [Mar 2023]
- Prompts for Education: Microsoft Prompts for Education [Jul 2023]
- In-The-Wild Jailbreak Prompts on LLMs: A dataset consists of 15,140 ChatGPT prompts from Reddit, Discord, websites, and open-source datasets (including 1,405 jailbreak prompts). Collected from December 2022 to December 2023 [Aug 2023]
- Leaked prompts of GPTs [Nov 2023] and Agents [Nov 2023]
- Awesome-GPTs-Prompts [Jan 2024]
- Fabric: A modular framework for solving specific problems using a crowdsourced set of AI prompts that can be used anywhere [Jan 2024]
- LLM Prompt Engineering Simplified [Feb 2024]
- Power Platform GPT Prompts [Mar 2024]
- Anthropic Prompt Library: Anthropic released a Claude 3 AI prompt library [Mar 2024]
- Copilot prompts: Examples of prompts for Microsoft Copilot. [25 Apr 2024]
- Anthropic courses > Prompt engineering interactive tutorial: a comprehensive step-by-step guide to key prompting techniques / prompt evaluations [Aug 2024]
- What is Visual prompting: Similarly to what has happened in NLP, large pre-trained vision transformers have made it possible for us to implement Visual Prompting. doc [26 Apr 2023]
- Visual Prompting [21 Nov 2022]
- Andrew Ng’s Visual Prompting Livestream📺 [24 Apr 2023]
- What is Visual Grounding: Visual Grounding (VG) aims to locate the most relevant object or region in an image, based on a natural language query.
- Screen AI: ScreenAI, a model designed for understanding and interacting with user interfaces (UIs) and infographics. [Mar 2024]
- Motion Prompting: motion prompts for flexible video generation, enabling motion control, image interaction, and realistic physics. git [3 Dec 2024]