mirror of
https://github.com/dair-ai/Prompt-Engineering-Guide
synced 2024-11-04 12:00:10 +00:00
Merge branch 'main' of https://github.com/dair-ai/Prompt-Engineering-Guide into main
This commit is contained in:
commit
ce95a7f4f4
@ -58,6 +58,7 @@ The following are the latest papers (sorted by release date) on prompt engineeri
|
||||
- [Augmented Language Models: a Survey](https://arxiv.org/abs/2302.07842) (Feb 2023)
|
||||
- [A Survey for In-context Learning](https://arxiv.org/abs/2301.00234) (Dec 2022)
|
||||
- [Towards Reasoning in Large Language Models: A Survey](https://arxiv.org/abs/2212.10403) (Dec 2022)
|
||||
- [Reasoning with Language Model Prompting: A Survey](https://arxiv.org/abs/2212.09597) (Dec 2022)
|
||||
- [Emergent Abilities of Large Language Models](https://arxiv.org/abs/2206.07682) (Jun 2022)
|
||||
- [A Taxonomy of Prompt Modifiers for Text-To-Image Generation](https://arxiv.org/abs/2204.13988) (Apr 2022)
|
||||
- [Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processing](https://arxiv.org/abs/2107.13586) (Jul 2021)
|
||||
|
@ -17,7 +17,7 @@ Topics:
|
||||
---
|
||||
|
||||
## Prompt Injection
|
||||
Prompt injection aims to hijack the model output by using clever prompts that change its behavior. These attacks could be harmful -- Simon Williams define it ["as a form of security exploit"](https://simonwillison.net/2022/Sep/12/prompt-injection/).
|
||||
Prompt injection aims to hijack the model output by using clever prompts that change its behavior. These attacks could be harmful -- Simon Willison defined it ["as a form of security exploit"](https://simonwillison.net/2022/Sep/12/prompt-injection/).
|
||||
|
||||
Let's cover a basic example to demonstrate how prompt injection can be achieved. We will use a popular example shared by [Riley on Twitter](https://twitter.com/goodside/status/1569128808308957185?s=20).
|
||||
|
||||
@ -186,4 +186,4 @@ Models like ChatGPT and Claude have been aligned to avoid outputting content tha
|
||||
---
|
||||
[Previous Section (Advanced Prompting)](./prompts-advanced-usage.md)
|
||||
|
||||
[Next Section (Miscellaneous Topics)](./prompt-miscellaneous.md)
|
||||
[Next Section (Miscellaneous Topics)](./prompt-miscellaneous.md)
|
||||
|
@ -77,7 +77,7 @@ A:
|
||||
The answer is True.
|
||||
```
|
||||
|
||||
That didn't work. It seems like basic standard prompting is not enough to get reliable responses for this type of reasoning problem. The example above provides basic information on the task, even with the examples. If you take a closer look at the task, it does involve more reasoning steps.
|
||||
That didn't work. It seems like basic standard prompting is not enough to get reliable responses for this type of reasoning problem. The example above provides basic information on the task, even with the examples. If you take a closer look at the task, it does involve more reasoning steps.
|
||||
|
||||
Following the findings from [Min et al. (2022)](https://arxiv.org/abs/2202.12837), here a few more tips about demonstrations/exemplars when doing few-shot:
|
||||
|
||||
@ -121,8 +121,6 @@ There is no consistency in the format above but the model still predicted the co
|
||||
|
||||
Overall, it seems that providing examples is useful in some places. When zero-shot prompting and few-shot prompting are not sufficient, it might mean that the whatever was learned by the model isn't enough to do well at the task. From here it is recommended to start thinking about fine-tuning your own models.
|
||||
|
||||
More recently, chain-of-thought (CoT) prompting has been popularized to address more complex arithmetic, commonsense, and symbolic reasoning tasks. So let's talk about CoT next and see if we can solve the above task.
|
||||
|
||||
---
|
||||
|
||||
## Chain-of-Thought Prompting
|
||||
@ -398,4 +396,4 @@ This paper touches on an important topic related to prompt engineering which is
|
||||
---
|
||||
[Previous Section (Basic Prompting)](./prompts-basic-usage.md)
|
||||
|
||||
[Next Section (Adversarial Prompting)](./prompt-adversarial.md)
|
||||
[Next Section (Adversarial Prompting)](./prompt-adversarial.md)
|
||||
|
Loading…
Reference in New Issue
Block a user