0

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

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.

当我不提供关键字时,它完美地工作,有多个提示,所有这些答案选项,正确答案,一切。问题是当我想生成这些问题时,正确答案就是关键字。我尝试了各种提示,甚至给出了我上面所做的例子,但它不起作用。

4

1 回答 1

1

使用 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 可能会有所帮助,我希望这对您来说是朝着正确方向迈出的一步。

于 2022-01-27T16:00:13.063 回答