• Prompts(二)


    Prompts(一)-CSDN博客中,我们介绍并给出了如何赋能大语言模型的基本示例。

    在本节中,我们会提供更多示例,介绍如何使用提示词来完成不同的任务,并介绍其中涉及的重要概念。通常,学习概念的最佳方法是通过示例进行学习。下面,我们将通过示例介绍说明如何使用精细的提示词来执行不同类型的任务。

    文本概括

    自然语言生成的标准任务之一是文本概括。文本概括可能涉及到不同的风格和领域。事实上,语言模型最前景的应用场景之一就是能够快速概括出易于理解的文章大意和相关概念。 我们可以使用提示词尝试一个简单的概括任务。

    假设我想了解抗生素的相关信息,我可以给出这样的提示:

    提示词

    Explain antibioticsA:

    输出结果

    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: // 用一句话解释上面的信息:

    输出结果

    Antibiotics are medications used to treat bacterial infections by either killing the bacteria or stopping them from reproducing, but they are not effective against v
  • 相关阅读:
    Initialize the kubernetes basic environment configuration on CentOS 8.2
    基于javaweb+mysql的新闻发布管理系统
    JDK8新特性超详细总结
    快速全面掌握数据库系统核心知识点
    H5页面使用iosSelect.js省市县乡村四级联动
    数据结构 顺序表1
    计算机毕业设计springboot酒店客房管理系统8yj0v源码+系统+程序+lw文档+部署
    SQL Server 2016(分离和附加数据库)
    3.MySQL插入数据, 读取数据、Where子句和Order By关键字
    SPARKSQL3.0-SessionState构建源码剖析
  • 原文地址:https://blog.csdn.net/xzq_qzx_/article/details/136455084