nlp:prompting
This is an old revision of the document!
Table of Contents
Prompting and In-Context Learning
Overviews
- Tutorials, Courses, Slides and Guides
- Guides
- Prompt Engineering Guide This one is pretty good
- Slides
- UMass Amherst: Prompt-based learning
- Github: BREX's Prompt Engineering Guide
- Course: learnprompting.org
Prompting Language Models
Zero-shot
Few-shot aka In-Context Learning
- Schick & Schütze 2020 - Few-Shot Text Generation with Natural Language Instructions GenPET, prompting for natural language generation
- Schick & Schütze 2021 - Exploiting Cloze Questions for Few Shot Text Classification and Natural Language Inference Introduces PET, pre-dates GTP-3
Many-Shot In-Context Learning
Prompting with a large context of many shots.
Soft-Prompting, etc
- See Soft-prompting overview on p.3 of Zhao & Schütze 2021
- Prefix-Tuning (aka P-Tuning): Liu et al 2021 - GPT understands, too Zhao 2021 finds this method to be the best.
- Prompt Tuning: Lester et al 2021 - The Power of Scale for Parameter-Efficient Prompt Tuning Can be seen as a “simplification of the recently proposed “prefix tuning” of Li and Liang (2021)”
- Zhao & Schütze 2021 - Discrete and Soft Prompting for Multilingual Models They find that soft prompting with an LSTM like Liu et al 2021 is best, both for English and cross-lingually.
- Vu et al 2022 - SPoT: Better Frozen Model Adaptation through Soft Prompt Transfer - Multi-task, uses a library of learned soft prompts
Prompt tuning can be slower than fine-tuning. See the figure below.

Figure from Su et al 2022. See also figures 6-8 from Ding et al 2022.
Prompt Design / Prompt Engineering
See Prompt Engineering.
Calibration and Scoring
Data-Augmentation Prompting
Chain of Thought Prompting
See also Reasoning Chains.
- Overviews
- Wei et al 2022 - Chain of Thought Prompting Elicits Reasoning in Large Language Models Introduced chain of thought prompting
- Kojima et al 2022 - Large Language Models are Zero-Shot Reasoners Introduced the prompt “Let's think step by step.”
- Wang et al 2022 - Self-Consistency Improves Chain of Thought Reasoning in Language Models Sample multiple chain of thought reasonings, and take the majority vote for the answer
- Yao et al 2022 - ReAct: Synergizing Reasoning and Acting in Language Models - The basis of LangChain
- Tree of Thought and Tree Search
- Yasunaga et al 2023 - Large Language Models as Analogical Reasoners Adds to the prompt “# Instruction: ## Recall relevant exemplars: ## Solve the initial problem:”, which helps more than “Let's think step by step.”
- Chen et al 2024 - Masked Thought: Simply Masking Partial Reasoning Steps Can Improve Mathematical Reasoning Learning of Language Models Masks the CoT to get better results
Cross-lingual Prompting
Miscellaneous Promping Papers
- Scao & Rush 2021 - How Many Data Points is a Prompt Worth? Prompts are very helpful in small data regimes, and are worth 100's of datapoints.
Chained or Tool-based Prompting
For an overview see Tool Learning Papers
- Overviews
- Yao et al 2022 - ReAct: Synergizing Reasoning and Acting in Language Models. This kind of thing is implemented in LangChain
-
- Uses RapidAPI
Prompt Compression
Retrieval-Based Methods (Retrieval-Augmented)
Data Contamination Issues
See also Membership Inference.
- Overviews
- GSM1k: Zhang et al 2024 - A Careful Examination of Large Language Model Performance on Grade School Arithmetic Re-evaluates GSM8K with a new dataset
Dependence on Number of Examples
Comparison to Fine-Tuning
Analysis of In-Context-Learning
Datasets
- Datasets with Prompts for Evaluating Language Models
- PromptSource: github Bach et al 2022 - PromptSource: An Integrated Development Environment and Repository for Natural Language Prompts 2,000 prompts for 170 datasets
- BIG-Bench: github Srivastava et al 2022 - Beyond the Imitation Game: Quantifying and extrapolating the capabilities of language models Growing list of user-submitted tasks. Contains languages other than English
- SuperNatural-Instructuctions: Wang et al 2022 - SUPER-NATURALINSTRUCTIONS: Generalization via Declarative Instructions on 1600+ NLP Tasks 1,600 instructions for 76 tasks across 55 languages
- BIG-Bench-Hard
- LM-Evaluation Harness: github
Software
- LangChain Framework for building applications with prompting (chaining prompts, etc). This paper was the basis for it: Yao et al 2022 - ReAct: Synergizing Reasoning and Acting in Language Models
Talks and Lectures
People
Related Pages
nlp/prompting.1748480339.txt.gz · Last modified: 2025/05/29 00:58 by jmflanig