我正在尝试从如下所示的文本中生成一个测验:
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. LambB. CowC. DogD. CatA. Lamb2. What does John have?A. CowB. LambC. DogD. CatA. Cow3. How old is Mary's lamb?A. One month oldB. One year oldC. Two months oldD. Two years oldetc.
当我不提供关键词时,使用多个提示,包括所有这些答案选项、正确答案等,它都能完美运行。问题在于当我想生成这些问题时,正确答案必须是关键词。 我尝试了各种提示,甚至像上面那样提供例子,但都不起作用。
回答:
使用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. LambB. CowC. DogD. CatAnswer: A. LambQuestion 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. LambB. CowC. DogD. CatAnswer: A. LambQuestion 2: What does John have?A. LambB. CowC. DogD. CatAnswer: B. CowQuestion 3: How old is the lamb?A. 1 monthB. 1 yearC. 2 monthsD. 1 year and a halfAnswer: C. 2 months
在输入中提供你想要的示例(1个问题 + 答案)可以帮助GPT理解所需输出的结构。在输入中明确解释GPT所需执行的任务(见第1行)在我看来可以帮助它理解任务。
它并不能完美执行任务,但使用GPT-3可能会有所帮助,我希望这对你来说是朝正确方向迈出的一步。