Merge branch 'main' into patch-2

pull/134/head
Elvis Saravia 2023-04-16 16:32:23 -06:00 committed by GitHub
commit b267537e5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 39 additions and 7 deletions

View File

@ -2,7 +2,7 @@
Prompt engineering is a relatively new discipline for developing and optimizing prompts to efficiently use language models (LMs) for a wide variety of applications and research topics. Prompt engineering skills help to better understand the capabilities and limitations of large language models (LLMs). Researchers use prompt engineering to improve the capacity of LLMs on a wide range of common and complex tasks such as question answering and arithmetic reasoning. Developers use prompt engineering to design robust and effective prompting techniques that interface with LLMs and other tools.
Motivated by the high interest in developing with LLMs, we have created this new prompt engineering guide that contains all the latest papers, learning guides, lectures, references, and tools related to prompt engineering.
Motivated by the high interest in developing with LLMs, we have created this new prompt engineering guide that contains all the latest papers, learning guides, lectures, references, and tools related to prompt engineering.
Happy Prompting!
@ -29,10 +29,21 @@ We have published a 1 hour lecture that provides a comprehensive overview of pro
- [Notebook with code](https://github.com/dair-ai/Prompt-Engineering-Guide/blob/main/notebooks/pe-lecture.ipynb)
- [Slides](https://github.com/dair-ai/Prompt-Engineering-Guide/blob/main/lecture/Prompt-Engineering-Lecture-Elvis.pdf)
---
## Running the guide locally
To run the guide locally, for example to check the correct implementation of a new translation, you will need to:
1. Install Node >=18.0.0
1. Install `pnpm` if not present in your system. Check [here](https://pnpm.io/installation) for detailed instructions.
1. Install the dependencies: `pnpm i next react react-dom nextra nextra-theme-docs`
1. Boot the guide with `pnpm dev`
2. Browse the guide at `http://localhost:3000/`
---
## Guides
Please note that the guides below are now outdated. You can find the most up-to-date guides on our new website [https://www.promptingguide.ai/](https://www.promptingguide.ai/).
Please note that the guides below are now outdated. You can find the most up-to-date guides on our new website [https://www.promptingguide.ai/](https://www.promptingguide.ai/).
- [Prompt Engineering - Introduction](/guides/prompts-intro.md)
- [Prompt Engineering - Basic Prompting](/guides/prompts-basic-usage.md)
@ -44,7 +55,7 @@ Please note that the guides below are now outdated. You can find the most up-to-
- [Prompt Engineering - Miscellaneous Topics](/guides/prompts-miscellaneous.md)
- [Prompt Engineering - Papers](/pages/papers.en.mdx)
- [Prompt Engineering - Tools](/pages/tools.en.mdx)
- [Prompt Engineering - Datasets](/pages/datasets.en.mdx)
- [Prompt Engineering - Datasets](/pages/datasets.en.mdx)
- [Prompt Engineering - Additional Readings](/pages/readings.en.mdx)
---

View File

@ -2,6 +2,7 @@
Prompt engineering is a relatively new discipline for developing and optimizing prompts to efficiently use language models (LMs) for a wide variety of applications and research topics. Prompt engineering skills help to better understand the capabilities and limitations of large language models (LLMs). Researchers use prompt engineering to improve the capacity of LLMs on a wide range of common and complex tasks such as question answering and arithmetic reasoning. Developers use prompt engineering to design robust and effective prompting techniques that interface with LLMs and other tools.
This guide covers the basics of prompts to provide a rough idea of how to use prompts to interact and instruct large language models (LLMs).
This guide covers the basics of prompts to provide a rough idea of how to use prompts to interact and instruct LLMs.
All examples are tested with `text-davinci-003` using [OpenAI's playground](https://platform.openai.com/playground) unless otherwise specified. The model uses the default configurations, i.e., `temperature=0.7` and `top-p=1`.

View File

@ -1,11 +1,11 @@
# LLM Settings
When working with prompts, you will be interacting with the LLM via an API or directly. You can configure a few parameters to get different results for your prompts.
When working with prompts, you interact with the LLM via an API or directly. You can configure a few parameters to get different results for your prompts.
**Temperature** - In short, the lower the `temperature` the more deterministic the results in the sense that the highest probable next token is always picked. Increasing temperature could lead to more randomness encouraging more diverse or creative outputs. We are essentially increasing the weights of the other possible tokens. In terms of application, we might want to use a lower temperature value for tasks like fact-based QA to encourage more factual and concise responses. For poem generation or other creative tasks, it might be beneficial to increase the temperature value.
**Temperature** - In short, the lower the `temperature`, the more deterministic the results in the sense that the highest probable next token is always picked. Increasing temperature could lead to more randomness, which encourages more diverse or creative outputs. You are essentially increasing the weights of the other possible tokens. In terms of application, you might want to use a lower temperature value for tasks like fact-based QA to encourage more factual and concise responses. For poem generation or other creative tasks, it might be beneficial to increase the temperature value.
**Top_p** - Similarly, with `top_p`, a sampling technique with temperature called nucleus sampling, you can control how deterministic the model is at generating a response. If you are looking for exact and factual answers keep this low. If you are looking for more diverse responses, increase to a higher value.
The general recommendation is to alter one, not both.
Before starting with some basic examples, keep in mind that your results may vary depending on the version of LLM you are using.
Before starting with some basic examples, keep in mind that your results may vary depending on the version of LLM you use.

View File

@ -145,6 +145,15 @@ The current recommendation for `gpt-3.5-turbo-0301` is to add instructions in th
---
## References
- [ChatGPT-4 Outperforms Experts and Crowd Workers in Annotating Political Twitter Messages with Zero-Shot Learning](https://arxiv.org/abs/2304.06588) (April 2023)
- [ChatGPT Beyond English: Towards a Comprehensive Evaluation of Large Language Models in Multilingual Learning](https://arxiv.org/abs/2304.05613) (April 2023)
- [Distinguishing ChatGPT(-3.5, -4)-generated and human-written papers through Japanese stylometric analysis](https://arxiv.org/abs/2304.05534) (April 2023)
- [Zero-shot Temporal Relation Extraction with ChatGPT](https://arxiv.org/abs/2304.05454) (April 2023)
- [Can ChatGPT and Bard Generate Aligned Assessment Items? A Reliability Analysis against Human Performance](https://arxiv.org/abs/2304.05372) (April 2023)
- [Are Large Language Models Ready for Healthcare? A Comparative Study on Clinical Language Understanding](https://arxiv.org/abs/2304.05368) (April 2023)
- [The Wall Street Neophyte: A Zero-Shot Analysis of ChatGPT Over MultiModal Stock Movement Prediction Challenges](https://arxiv.org/abs/2304.05351) (April 2023)
- [Toxicity in ChatGPT: Analyzing Persona-assigned Language Models](https://arxiv.org/abs/2304.05335) (April 2023)
- [Multi-step Jailbreaking Privacy Attacks on ChatGPT](https://arxiv.org/abs/2304.05197) (April 2023)
- [Is ChatGPT a Good Sentiment Analyzer? A Preliminary Study](https://arxiv.org/abs/2304.04339) (April 2023)
- [A Preliminary Evaluation of ChatGPT for Zero-shot Dialogue Understanding](https://arxiv.org/abs/2304.04256) (April 2023)
- [Extractive Summarization via ChatGPT for Faithful Summary Generation](https://arxiv.org/abs/2304.04193) (April 2023)

View File

@ -160,6 +160,9 @@ Coming soon!
## References / Papers
- [chatIPCC: Grounding Conversational AI in Climate Science](https://arxiv.org/abs/2304.05510) (April 2023)
- [Galactic ChitChat: Using Large Language Models to Converse with Astronomy Literature](https://arxiv.org/abs/2304.05406) (April 2023)
- [Emergent autonomous scientific research capabilities of large language models](https://arxiv.org/abs/2304.05332) (April 2023)
- [Evaluating the Logical Reasoning Ability of ChatGPT and GPT-4](https://arxiv.org/abs/2304.03439) (April 2023)
- [Instruction Tuning with GPT-4](https://arxiv.org/abs/2304.03277) (April 2023)
- [Evaluating GPT-4 and ChatGPT on Japanese Medical Licensing Examinations](https://arxiv.org/abs/2303.18027) (April 2023)

View File

@ -4,6 +4,7 @@ The following are the latest papers (sorted by release date) on prompt engineeri
## Overviews
- [One Small Step for Generative AI, One Giant Leap for AGI: A Complete Survey on ChatGPT in AIGC Era](https://arxiv.org/abs/2304.06488) (April 2023)
- [A Bibliometric Review of Large Language Models Research from 2017 to 2023](https://arxiv.org/abs/2304.02020) (April 2023)
- [A Survey of Large Language Models](https://arxiv.org/abs/2303.18223) (April 2023)
- [Nature Language Reasoning, A Survey](https://arxiv.org/abs/2303.14725) (Mar 2023)
@ -17,6 +18,8 @@ The following are the latest papers (sorted by release date) on prompt engineeri
## Approaches
- [Boosted Prompt Ensembles for Large Language Models](https://arxiv.org/abs/2304.05970) (April 2023)
- [Global Prompt Cell: A Portable Control Module for Effective Prompt](https://arxiv.org/abs/2304.05642) (April 2023)
- [Why think step-by-step? Reasoning emerges from the locality of experience](https://arxiv.org/abs/2304.03843) (April 2023)
- [Revisiting Automated Prompting: Are We Actually Doing Better?](https://arxiv.org/abs/2304.03609) (April 2023)
- [REFINER: Reasoning Feedback on Intermediate Representations](https://arxiv.org/abs/2304.01904) (April 2023)
@ -126,6 +129,9 @@ The following are the latest papers (sorted by release date) on prompt engineeri
## Applications
- [Are LLMs All You Need for Task-Oriented Dialogue?](https://arxiv.org/abs/2304.06556) (April 2023)
- [HiPrompt: Few-Shot Biomedical Knowledge Fusion via Hierarchy-Oriented Prompting](https://arxiv.org/abs/2304.05973) (April 2023)
- [Approximating Human Evaluation of Social Chatbots with Prompting](https://arxiv.org/abs/2304.05253) (April 2023)
- [Automated Reading Passage Generation with OpenAI's Large Language Model](https://arxiv.org/abs/2304.04616) (April 2023)
- [WebBrain: Learning to Generate Factually Correct Articles for Queries by Grounding on Large Web Corpus](https://arxiv.org/abs/2304.04358) (April 2023)
- [Prompt Pre-Training with Twenty-Thousand Classes for Open-Vocabulary Visual Recognition](https://arxiv.org/abs/2304.04704) (April 2023)

View File

@ -62,6 +62,7 @@
- [Language Model Behavior: A Comprehensive Survey](https://arxiv.org/abs/2303.11504)
- [Learn Prompting](https://learnprompting.org)
- [Learning Prompt](https://github.com/thinkingjimmy/Learning-Prompt)
- [LINGO : Visually Debiasing Natural Language Instructions to Support Task Diversity](https://arxiv.org/abs/2304.06184)
- [Meet Claude: Anthropics Rival to ChatGPT](https://scale.com/blog/chatgpt-vs-claude)
- [Methods of prompt programming](https://generative.ink/posts/methods-of-prompt-programming)
- [Mysteries of mode collapse](https://www.lesswrong.com/posts/t9svvNPNmFf5Qa3TA/mysteries-of-mode-collapse)

View File

@ -10,6 +10,7 @@
- [Dyno](https://trydyno.com)
- [EmergentMind](https://www.emergentmind.com)
- [EveryPrompt](https://www.everyprompt.com)
- [Guardrails](https://github.com/ShreyaR/guardrails)
- [GPT Index](https://github.com/jerryjliu/gpt_index)
- [GPTTools](https://gpttools.com/comparisontool)
- [hwchase17/adversarial-prompts](https://github.com/hwchase17/adversarial-prompts)