为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

使用LSTM在Python中预测未来值

这段代码可以预测指定股票的当前日期之前的值,但不能预测…

如何在gensim的word2vec模型中查找双词组的相似性

我有一个word2vec模型,假设我使用的是googl…

dask_xgboost.predict 可以工作但无法显示 – 数据必须是一维的

我试图使用 XGBoost 创建模型。 看起来我成功地…

ML Tuning – Cross Validation in Spark

我在https://spark.apache.org/…

如何在React JS中使用fetch从REST API获取预测

我正在开发一个应用程序,其中Flask REST AP…

如何分析ML.NET中多类分类预测得分数组?

我在ML.NET中创建了一个多类分类项目。该项目可以对…

发表回复

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