mirror of
https://github.com/dair-ai/Prompt-Engineering-Guide
synced 2024-11-04 12:00:10 +00:00
improve guides
This commit is contained in:
parent
322a5a8ddf
commit
ec80e10b91
@ -241,6 +241,7 @@ The following are the latest papers (sorted by release date) on prompt engineeri
|
||||
- [How to get images that don't suck](https://www.reddit.com/r/StableDiffusion/comments/x41n87/how_to_get_images_that_dont_suck_a)
|
||||
- [How to make LLMs say true things](https://evanjconrad.com/posts/world-models)
|
||||
- [How to write good prompts](https://andymatuschak.org/prompts)
|
||||
- [If I Was Starting Prompt Engineering in 2023: My 8 Insider Tips](https://youtube.com/watch?v=SirW7feTjh0&feature=shares)
|
||||
- [Introduction to Reinforcement Learning with Human Feedback](https://www.surgehq.ai/blog/introduction-to-reinforcement-learning-with-human-feedback-rlhf-series-part-1)
|
||||
- [In defense of prompt engineering](https://simonwillison.net/2023/Feb/21/in-defense-of-prompt-engineering/)
|
||||
- [Language Models and Prompt Engineering: Systematic Survey of Prompting Methods in NLP](https://youtube.com/watch?v=OsbUfL8w-mo&feature=shares)
|
||||
|
@ -2,9 +2,9 @@
|
||||
|
||||
In the previous guide, we introduced and gave a basic example of a prompt.
|
||||
|
||||
In this guide, we will provide more examples of how prompts are used and introduce key concepts that will be important for more advanced guides.
|
||||
In this guide, we will provide more examples of how prompts are used and introduce key concepts that will be important for the more advanced guides.
|
||||
|
||||
Often, the best way to learn concepts is by running through examples. Below we cover a few examples of how well-crafted prompts can be used to perform all types of interesting and different tasks.
|
||||
Often, the best way to learn concepts is by going through examples. Below we cover a few examples of how well-crafted prompts can be used to perform all types of interesting and different tasks.
|
||||
|
||||
Topics:
|
||||
- [Text Summarization](#text-summarization)
|
||||
|
@ -157,6 +157,14 @@ Not all the components are required for a prompt and the format depends on the t
|
||||
|
||||
Here are some tips to keep in mind while you are designing your prompts:
|
||||
|
||||
|
||||
## Start Simple
|
||||
As you get started with designing prompts, you should keep in mind that it is really an iterative process that requires lot of experimentation to get optimal results. Using a simple playground like OpenAI's or Cohere's is a good starting point.
|
||||
|
||||
You can start with simple prompts and keep adding more elements and context as you aim for better results. Versioning your prompt along the way is vital for this reason. As we read the guide you will see many examples where specificity, simplicity, and conciseness will often give you better results.
|
||||
|
||||
When you have big task that involves many different subtasks, you can try to break down the task into simpler subtasks and keep building up as you get better results. This avoids adding too much complexity to the prompt design process at the beginning.
|
||||
|
||||
### The Instruction
|
||||
You can design effective prompts for various simple tasks by using commands to instruct the model what you want to achieve such as "Write", "Classify", "Summarize", "Translate", "Order", etc.
|
||||
|
||||
@ -182,6 +190,8 @@ Text: "hello!"
|
||||
### Specificity
|
||||
Be very specific about the instruction and task you want the model to perform. The more descriptive and detailed the prompt is, the better the results. This is particularly important when you have a desired outcome or style of generation you are seeking. There aren't specific tokens or keywords that lead to better results. It's more important to have a good format and descriptive prompt. In fact, providing examples in the prompt is very effective to get desired output in specific formats.
|
||||
|
||||
When designing prompts you should also keep in mind the length of the prompt as there are limitations regarding how long this can be. Thinking about how specific and detailed you should be is something to consider. Too many unnecessary details in not necessarily a good approach. The details should be relevant and contribute to the task at hand. This is something you will need to experiment with a lot. We encourage a lot of experimentation and iteration to optimize prompts for your applications.
|
||||
|
||||
As an example, let's try a simple prompt to extract specific information from a piece of text.
|
||||
|
||||
*Prompt:*
|
||||
|
Loading…
Reference in New Issue
Block a user