Prompt tuning

LLMs can be few-shot or zero-shot learners when the prompt is designed well. Can we do this systematically?

The performance of LLMs depends on how the prompt is structured. It can be sensitive to the details of the prompt. Therefore, it is important to develop systematical methods to tune the prompt to maximize the performance of these models and this is called prompt tuning or prompt engineering.

See also Working with AI: Two paths to prompting by Ethan Mollick for some useful basic tips. The message is that we don’t have to overthink it. Maybe a lot of prompting is Cargo cult prompting – Cargo cult prompting.

How can we understand the differences between many possible prompts? Gonen2022demystifying test a hypothesis that the prompt that is familiar to the model (low Perplexity) is related to its performance.

Overview and reviews

Lilian Weng‘s review: Prompt engineering

https://github.com/thunlp/PromptPapers lists many papers on prompt tuning.

https://github.com/thunlp/OpenPrompt is an open-source framework for prompt tuning.

Zhou2022large proposes “automatic prompt engineer” by using language model itself as an prompt engineer.

General guides

Tips

Methods

Ding2021OpenPrompt is an open-source framework for prompt learning.

Chain-of-thought prompting

!Chain of thought prompting

Tree of thoughts

Graph of thoughts: Besta2023graph, https://github.com/spcl/graph-of-thoughts

Analogical prompting: Yasunaga2023large The idea is to ask LLMs to “recall relevant exemplars” and use it to solve the initial problem.

Emotional stimuli (e.g., “this is important for my career”): Li2023large2

Suzgun2024metaprompting

Captain’s log: the irreducible weirdness of prompting AIs by Ethan Mollick

Tuning for reliability and fairness

Si2022prompting focuses, not on the accuracy of the results, but on the reliability of the result.

Tools

Resources

Memes