Skip to content

Commit

Permalink
20230712
Browse files Browse the repository at this point in the history
  • Loading branch information
zzlion committed Aug 26, 2023
1 parent d6af948 commit 7734d8c
Show file tree
Hide file tree
Showing 3 changed files with 174 additions and 2 deletions.
4 changes: 2 additions & 2 deletions content.en/posts/20230520.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ menu: main

## reference

<https://learn-cryptography.readthedocs.io/zh/latest/basic/></br>
<https://www.bilibili.com/video/BV1KY411x7Jp/?spm_id_from=333.337.search-card.all.click&vd_source=dfa9bf517c1718c832302c15f80df948></br>
cryptography <https://learn-cryptography.readthedocs.io/zh/latest/basic/></br>
https <https://www.bilibili.com/video/BV1KY411x7Jp/?spm_id_from=333.337.search-card.all.click&vd_source=dfa9bf517c1718c832302c15f80df948></br>

## 密码学

Expand Down
146 changes: 146 additions & 0 deletions content.en/posts/20230601.md
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}\`\`\`
```
26 changes: 26 additions & 0 deletions content.en/posts/20230712.md
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:舌根后缩

1 comment on commit 7734d8c

@vercel
Copy link

@vercel vercel bot commented on 7734d8c Aug 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.