为 GPT-3 选择一个好的提示

Choosing a good prompt for GPT-3

我正在尝试根据如下所示的文本生成测验:

Text: "Mary has little lamb and John has a cow. The lamb is one month old. It eats grass and milk, which Mary brings from the the farm."

Keywords: "lamb", "cow", "one month old", "farm."

1. What does Mary have?
A. Lamb
B. Cow
C. Dog
D. Cat

A. Lamb

2. What does John have?
A. Cow
B. Lamb
C. Dog
D. Cat

A. Cow

3. How old is Mary's lamb?
A. One month old
B. One year old
C. Two months old
D. Two years old

etc.

当我不提供关键字、多个提示、所有这些答案选项、正确答案等一切时,它工作得很好。 问题是当我想生成这些问题时,正确答案是关键字。我尝试了各种提示,甚至给出了像我上面所做的例子,但它没有工作。

使用 GPT-J 我测试了以下内容:

输入:

Create a quiz about the following text according to the keywords: Mary has little lamb and John has a cow. The lamb is one month old. It eats grass and milk, which Mary brings from the the farm.

Keywords: "lamb", "cow", "one month old", "farm."

Question 1: What does Mary have?
A. Lamb
B. Cow
C. Dog
D. Cat

Answer: A. Lamb

Question 2:

输出:

Create a quiz about the following text according to the keywords: Mary has little lamb and John has a cow. The lamb is one month old. It eats grass and milk, which Mary brings from the the farm.

Keywords: "lamb", "cow", "one month old", "farm."

Question 1: What does Mary have?
A. Lamb
B. Cow
C. Dog
D. Cat

Answer: A. Lamb

Question 2: What does John have?
A. Lamb
B. Cow
C. Dog
D. Cat

Answer: B. Cow

Question 3: How old is the lamb?
A. 1 month
B. 1 year
C. 2 months
D. 1 year and a half

Answer: C. 2 months

在输入中举例说明您想要的内容(1 个问题 + 答案)可以帮助 GPT 理解所需输出的结构。明确地向 GPT 解释输入中所需的任务是什么(见第 1 行)可以帮助它理解我的经验中的任务。

它不能完美地执行任务,但使用 GPT-3 可能会有所帮助,我希望这对您来说是朝着正确方向迈出的一步。