-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
zzlion
committed
Aug 26, 2023
1 parent
d6af948
commit 7734d8c
Showing
3 changed files
with
174 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
--- | ||
title: prompt总结 | ||
description: "" | ||
date: 2023-06-01 | ||
tags: | ||
- 202306 | ||
- prompt | ||
categories: | ||
- 202306 | ||
menu: main | ||
--- | ||
|
||
## 原则 | ||
|
||
1. write clear and specific instructions | ||
- use delimiters | ||
- \" | ||
- \' | ||
- \` | ||
- - | ||
- <> | ||
- \<tag> | ||
- `summarize the text delimeted by triple backticks into a single sentence. \`\`\`{text}\`\`\`` | ||
- ask for structrued output | ||
- json | ||
- xml | ||
- `generate a list of three made-up book titles along with their authors and genres. Provide them in JSON format with the following keys: book_id, title, author, genre` | ||
- check wheather conditions are satisfied | ||
|
||
```text | ||
You will be provided with text delimited by triple backticks. If it contains a sequence of instructions, re-write those instructions in the following format: | ||
Step 1 - ... | ||
Step 2 - ... | ||
... | ||
Step N - ... | ||
If the text does not contain a sequence of instructions, write "No instructions provided." | ||
Text: | ||
\`\`\`{text}\`\`\` | ||
``` | ||
|
||
- few-shot prompting | ||
- Give successful examples of completing tasks. Then ask model to perform the task. | ||
|
||
```text | ||
Your task is to answer in a consistent style. | ||
<child>: Teach me about patience. | ||
<grandparent>: The river that carves the deepest valley flows from a modest spring; the grandest symphony originates from a single note; the most intricate tapestry begins with a solitary thread. | ||
<child>: Teach me about resilience. | ||
``` | ||
|
||
2. 给模型时间思考 | ||
- Specify the steps to complete a task | ||
|
||
```text | ||
Perform the following actions: | ||
1 - Summarize the following text delimited by triple backticks with 1 sentence. | ||
2 - Translate the summary into French. | ||
3 - List each name in the French summary | ||
4 - Output a json object that contains the following keys: french_summary num_names. | ||
Separate your answer with line breaks. | ||
Text: | ||
\`\`\`{text}\`\`\` | ||
``` | ||
|
||
```text | ||
Perform the following actions: | ||
1 - Summarize the following text delimited by triple backticks with 1 sentence. | ||
2 - Translate the summary into French. | ||
3 - List each name in the French summary | ||
4 - Output a json object that contains the following keys: french_summary num_names. | ||
Use the following format: | ||
Text: <text to summarize> | ||
Summary: <summary> | ||
Translation: <translation> | ||
Names: <list of names in Italian summary> | ||
Output Json: <json with summary and num_names> | ||
Text: | ||
\`\`\`{text}\`\`\` | ||
``` | ||
|
||
- Instruct the model to work out its own solution before rushing to a conclusion | ||
|
||
```text | ||
Your task is to determine if the student's solution is correct or not. | ||
To solve the problem do the following: | ||
- First, work out your own solution to the problem. | ||
- Second, compare your solution to the student's solution and evaluate if the student's solution is correct or not. | ||
Don't decide if the student's solution is correct or not until you have done the problem yourself. | ||
``` | ||
|
||
- reducing hallucinations(幻觉) | ||
- first find relavant information | ||
- then answer the question based on the relavant information | ||
|
||
## 迭代prompt | ||
|
||
1. try something | ||
2. analyze where the result does not give what you want | ||
3. clarify instructions, give more time to think | ||
4. refine prompts with a batch of examples | ||
|
||
## Summarizing Text | ||
|
||
- summarize | ||
|
||
```text | ||
Your task is to generate a summary of a product review from an ecommerce site to give feeedback to the Shipping department. | ||
Summarize the review below, delimited by triple backticks, in at most 30 words, and focusing on any aspects that mention shipping and delivery of the product. | ||
Review: \`\`\`{review}\`\`\` | ||
``` | ||
|
||
```text | ||
Your task is to generate a summary of a product review from an ecommerce site to give feeedback to the pricing department, responsible for determining the price of the product. | ||
Summarize the review below, delimited by triple backticks, in at most 30 words, and focusing on any aspects that are relevant to the price and perceived value. | ||
Review: \`\`\`{review}\`\`\` | ||
``` | ||
|
||
- extract | ||
|
||
```text | ||
Your task is to extract relevant infomation from a product review from an ecommerce site to give feeedback to the Shipping department. | ||
``` | ||
|
||
## inferring | ||
|
||
- infer | ||
|
||
```text | ||
What is the sentiment of the following product review, which is delimited by triple backticks? | ||
Give your answer as a single word, either "positive" or "negative". | ||
Review text: \`\`\`{review}\`\`\` | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
title: 英语音标 | ||
description: "" | ||
date: 2023-07-12 | ||
tags: | ||
- 202307 | ||
- prompt | ||
categories: | ||
- 202307 | ||
menu: main | ||
--- | ||
|
||
## l 和 r | ||
|
||
### l 发音 | ||
|
||
1. 分为light l 和 dark l | ||
2. light l | ||
1. 用舌尖抵住上齿龈,气流从舌尖两侧流出,发出清辅音 l | ||
3. dark l | ||
1. 舌头抵住下齿龈,然后抬到上齿龈 | ||
|
||
### r 发音 | ||
|
||
1. 方法1:舌头向上缩 | ||
1. 方法2:舌根后缩 |
7734d8c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
wawlixiong-github-io – ./
wawlixiong-github-io-git-master-wawlixiong.vercel.app
wawlixiong-github-io.vercel.app
www.wawlixiong.fun
wawlixiong-github-io-wawlixiong.vercel.app
wawlixiong.fun