gpt mbr ext3_可以gpt 3构建gpt 3应用

gpt mbr ext3

Three months since OpenAI has released their GPT-3 API, it’s now a shared notion — getting to STOA results is mostly a function of effective prompts programming, rather than an NLP task.

自从OpenAI发布其GPT-3 API三个月以来,这已成为一个共同的想法-获得STOA结果主要是有效提示编程的功能,而不是NLP任务。

It can literally be the difference between a chatbot whose replies do not make any sense, and a chatbot able to pass a Turing test.

从字面上看,这可能是聊天机器人(其回复没有任何意义)与能够通过图灵测试的聊天机器人之间的区别。

什么是提示? (What are Prompts?)

The interaction with GPT-3 is being done via prompts — textual hints guiding it about the context and task at hand.

与GPT-3的交互是通过提示完成的-文本提示可指导GPT-3有关当前的上下文和任务。

To a large extent, prompts are an abstract fine-tuning layer, allowing the user, i.e. developer, to guide GPT-3 in knowing which neuron-tree in its ‘brain’ it should activate to perform best. The more examples of successful completions one provides, i.e. pair of inputs and outputs, the higher the chances it will generate the right completion for an unseen case.

提示在很大程度上是一个抽象的微调层,允许用户(即开发人员)引导GPT-3知道应激活其“大脑”中的哪个神经元树以使其发挥最佳性能。 一个成功完成的例子越多,即一对输入和输出,对于一个看不见的案件,它产生正确完成的机会就越高。

Image for post
An example prompt for a Q&A bot
问答机器人的提示示例

After running hundreds of iterations with different prompts, I started wondering —

在使用不同的提示运行了数百次迭代之后,我开始想知道-

How can one automate this guesswork of human intuition? What if we feed GPT-3 with GPT-3 prompts?

一个人如何才能自动完成这种对人类直觉的猜测? 如果我们向GPT-3提供GPT-3提示怎么办?

It’s all about having data, and lots of it.

这都是关于拥有数据以及大量数据的。

By now, OpenAI has numerous examples of prompts written by humans, along with the parameters used and potentially — also presets, given that a prompt was saved through their Playground environment (more about the API Playground here).

到目前为止,OpenAI拥有许多由人类编写的提示示例,以及使用的参数和可能的参数以及预置(假设通过他们的Playground环境保存了提示)(更多关于API Playground的信息)。

Image for post
Preset dialogue when saving a prompt in OpenAI’s Playground
在OpenAI的Playground中保存提示时预设对话

什么是预设?(What are Presets?)

A preset is like a recipe, a configuration that includes both the prompt and the parameters used.

预设就像一个配方,是一个包含提示和所用参数的配置。

Presets have another advantage — they implicitly teach us about the quality of the prompt they contain, as the user has explicitly stored it and by doing so, unintentionally labeled these prompts as ‘high-quality’.

预设还有另一个优势-当用户明确存储它们时,它们会隐式地告诉我们所包含提示的质量,这样做会无意间将这些提示标记为“高质量”。

创建元提示 (Creating a meta-prompt)

Imagine OpenAI takes all of its stored presets and then concatenates their description and prompt into one long meta-prompt. Will GPT-3 then learn how to prompt itself?

想象一下,OpenAI会使用所有已存储的预设,然后将其描述连接起来并提示为一个长的元提示。 然后,GPT-3将学习如何提示自己吗?

This is a program that generates GPT-3 prompts based on their descriptions.--
Description: [preset description]
Prompt: [preset stored prompt]
-- --
Description: [preset description]
Prompt: [preset stored prompt]
--
...

If that works, we now have an app that generates prompts based on the given description.

如果可行,我们现在有一个应用程序可以根据给定的描述生成提示。

选择最佳提示 (Choosing the best prompt)

To avoid yet another manual work of running multiple prompts until we get the one sufficing our performance metrics, one can specify a function that scores its’ outputs, along with a labeled set of examples.

为了避免在运行多个提示之前获得足够的性能指标,需要进行另一项手动操作,可以指定一个对输出结果进行评分的函数,以及一组带有标签的示例。

For example, if you’re writing a bot to answer 1-digit math questions, your score function should be an exact match, as there is only one correct answer to ‘5 + 6’. Your labeled set of examples can be 10 input/output pairs.

例如,如果您正在编写一个机器人来回答一位数的数学问题,那么您的分数函数应该完全匹配,因为只有一个正确的答案是“ 5 + 6”。 您标记的示例集可以是10个输入/输出对。

Image for post
labeled dataset for 1-digit calculator bot
1位计算器机器人的标记数据集

The same logic of an exact matching score function would also work for a bot extracting information from invoices’ OCR, as there is only one correct answer to what is invoice’s issue date.

机器人从发票的OCR提取信息时,精确匹配得分函数的相同逻辑也将起作用,因为对于发票的发行日期只有一个正确的答案。

Summarization, content generation, and other language tasks are more complex as they require a more tolerant form of matching. An example of a scoring function that works for a trivia bot would be ‘contains’.

汇总,内容生成和其他语言任务更加复杂,因为它们需要更宽容的匹配形式。 适用于琐事机器人的计分功能的一个示例是“包含”。

Image for post
labeled dataset for a trivia bot
琐事机器人的标记数据集

So even if the bot yields “George Washington, of course!” the function will still score it as a valid answer.

因此,即使该机器人产生“当然是乔治·华盛顿!” 该功能仍会将其计为有效答案。

自动GPT-3 (Auto GPT-3)

Given a scoring function and a GPT-3 app capable of generating prompts, you can iterate different prompts with different parameters until you get to the best performing preset. This would be similar to what AutoML is doing to ML, providing one extra layer of abstraction from the intuition of language models.

有了评分功能和能够生成提示的GPT-3应用程序,您可以使用不同的参数迭代不同的提示,直到获得最佳性能的预设为止。 这类似于AutoML对ML所做的工作,从语言模型的直觉上提供了额外的一层抽象。

尾注 (Ending notes)

GPT-3’s novelty is in its simplicity of building applications that would usually require a team of multiple data scientist and linguistics. That said, getting a GPT-3 empowered app to production is a whole new different story, with much to be learned about setting up safety nets and avoiding biases.

GPT-3的新颖之处在于其构建应用程序的简单性,通常需要一组由多个数据科学家和语言学组成的团队。 也就是说,将具有GPT-3功能的应用程序投入生产是一个全新的故事,有关设置安全网和避免偏见的知识很多。

With many talking about GPT-3 changing the way we think about coding, suggesting programmers of the future would be ‘Prompts Engineers’, it’s hard to not contemplate if this profession is even needed, or we could immediately skip to Auto GPT-3.

由于许多人谈论GPT-3改变了我们对编码的看法,暗示未来的程序员将是“提示工程师”,因此很难不考虑是否需要这个专业,否则我们可以立即跳到Auto GPT-3。

Share your thoughts! Twitter LinkedIn

分享你的意见! Twitter LinkedIn

翻译自: https://medium.com/swlh/can-gpt-3-build-a-gpt-3-app-dc4d17a5b351

gpt mbr ext3

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值