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

Related Posts

L1-L2正则化的不同系数

我想对网络的权重同时应用L1和L2正则化。然而,我找不…

使用scikit-learn的无监督方法将列表分类成不同组别,有没有办法?

我有一系列实例,每个实例都有一份列表,代表它所遵循的不…

f1_score metric in lightgbm

我想使用自定义指标f1_score来训练一个lgb模型…

通过相关系数矩阵进行特征选择

我在测试不同的算法时,如逻辑回归、高斯朴素贝叶斯、随机…

可以将机器学习库用于流式输入和输出吗?

已关闭。此问题需要更加聚焦。目前不接受回答。 想要改进…

在TensorFlow中,queue.dequeue_up_to()方法的用途是什么?

我对这个方法感到非常困惑,特别是当我发现这个令人费解的…

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注