自然语言生成中的一个标准任务是文本摘要。文本摘要可以涵盖许多不同的风格和领域。事实上,语言模型最有前景的应用之一就是将文章和概念概括成简洁易读的摘要。让我们尝试使用提示进行一个基本的摘要任务。
提示词:
Explain antibiotics
A::
输出:
Antibiotics are a type of medication used to treat bacterial infections. They work by either killing the bacteria or preventing them from reproducing, allowing the body’s immune system to fight off the infection. Antibiotics are usually taken orally in the form of pills, capsules, or liquid solutions, or sometimes administered intravenously. They are not effective against viral infections, and using them inappropriately can lead to antibiotic resistance.
"A:" 是一种在问答中使用的显式提示格式,你在这里使用它是为了告诉模型接下来你期望有一个答案。在这个例子中,我们可能还不清楚使用它是否有用,我们会在之后的示例中探讨这一点。现在假设我们感觉模型给了太多的信息,想要进一步提炼它。 我们可以指导模型帮我们用一句话总结相关内容:
提示词:
Antibiotics are a type of medication used to treat bacterial infections. They work by either killing the bacteria or preventing them from reproducing, allowing the body’s immune system to fight off the infection. Antibiotics are usually taken orally in the form of pills, capsules, or liquid solutions, or sometimes administered intravenously. They are not effective against viral infections, and using them inappropriately can lead to antibiotic resistance.
Explain the above in one sentence:
译注:Explain the above in one sentence可翻译为用一句话解释上面的信息:
输出:
Antibiotics are medications used to treat bacterial infections by either killing the bacteria or stopping them from reproducing, but they are not effective against viruses and overuse can lead to antibiotic resistance.
虽然语言模型是被训练用于执行自然语言生成及相关任务,但它同样非常擅长执行分类和一系列其他自然语言处理(NLP)任务。
这是一个从给定段落中提取信息的提示词示例。
提示词:
Author-contribution statements and acknowledgements in research papers should state clearly and specifically whether, and to what extent, the authors used AI technologies such as ChatGPT in the preparation of their manuscript and analysis. They should also indicate which LLMs were used. This will alert editors and reviewers to scrutinize manuscripts more carefully for potential biases, inaccuracies and improper source crediting. Likewise, scientific journals should be transparent about their use of LLMs, for example when selecting submitted manuscripts.
Mention the large language model based product mentioned in the paragraph above:
输出:
The large language model based product mentioned in the paragraph above is ChatGPT.
现在应该很明显,你可以通过简单地指示模型做什么来让它执行不同的任务。这是一个强大的能力,AI产品开发人员已经在利用它来构建强大的产品和体验。
让模型给出具体回答的最佳方法之一是改善提示的格式。如前所述,一个提示可以结合指令、上下文、输入和输出指示(output indicators)来获得更好的结果。虽然这些组成部分不是必需的,但随着你给出的指令越具体,你将获得越好的结果,这成为了一种良好的实践。下面是一个例子,展示了按照更结构化的提示词来会是什么样子的。
提示词:
Answer the question based on the context below. Keep the answer short and concise. Respond "Unsure about answer" if not sure about the answer.
Context: Teplizumab traces its roots to a New Jersey drug company called Ortho Pharmaceutical. There, scientists generated an early version of the antibody, dubbed OKT3. Originally sourced from mice, the molecule was able to bind to the surface of T cells and limit their cell-killing potential. In 1986, it was approved to help prevent organ rejection after kidney transplants, making it the first therapeutic antibody allowed for human use.
Question: What was OKT3 originally sourced from?
Answer:
输出:
Mice