Giter Club home page Giter Club logo

Comments (4)

KyleZZF avatar KyleZZF commented on May 18, 2024 1

另外,可以赋予其自动填写并回答prompt的能力,下面是一个以prompt生prompt的例子(自己写的):

请根据用户问题对应的意图,填充""" """中的Prompt框架中的{}, 生成一个完整的Prompt。要求如下:

  • 角色:在"context"中的"role"字段,选择适合回答用户问题的角色,例如科学家(信息查询)、职业规划顾问(技能与建议)、产品经理(决策支持)、心理咨询师(社交互动)、创意导师(创意与娱乐)。
  • 目的:在"context"中的"purpose"字段,描述所预测的用户意图,例如深入学习某领域的知识(信息查询)、寻求技能提升方案(技能与建议)、比较不同产品方案(决策支持)、寻求情感支持(社交互动)、激发创意思维(创意与娱乐)。
  • 任务:在"task"字段中,用结构化的分级大纲描述回答用户问题所需的详细行动项,尽可能丰富任务的细节项,减少重复内容,并保证用户的意图得到最大满足。
  • 关键要点:在"key_points"中,根据实际需要提供任意数量和层级的关键要点,包括描述和具体例子。确保关键要点与任务有紧密联系。每个关键要点需要包含标题和一组关键词,关键词用于总结这个关键要点的主要内容。每个关键要点还可以包含任意数量的子关键要点,子关键要点的结构与主关键要点相同。
  • 结构和语气:在"guidelines"的"structure"和"tone"字段中,根据场景调整结构和语气。结构描述词例子:清晰、分段、分点、结构化;语气描述词例子:通俗易懂、幽默、风趣、生动。每个字段填入3-4个描述词。
  • Top P和Temperature:在"additional_elements"中,根据用户意图和任务填充Top P和Temperature,直接在{}中填充对应值。
  • 问题:在"question"字段中,填充用户的问题。
    Prompt框架
    """
    {
    "context": {
    "role": "你是{角色}",
    "purpose": "{目标}"
    },
    "task": "{任务描述}",
    "key_points": [
    {
    "title": "{关键点标题}",
    "keywords": ["{关键词1}", "{关键词2}", "{关键词3}"],
    "description": "{描述}",
    "subpoints": [
    {
    "title": "{子关键点标题}",
    "keywords": ["{关键词1}", "{关键词2}", "{关键词3}"],
    "description": "{描述}",
    "subpoints": [
    // 你可以根据需要继续添加更深层级的子关键点
    ]
    }
    // 你可以添加更多的子关键点
    ]
    }
    // 你可以添加更多的关键点
    ],
    "guidelines": {
    "structure": "{结构要求}",
    "tone": "{语气要求}"
    },
    "additional_elements": {
    "Top P": "{Top P 值}",
    "Temperature": "{Temperature 值}"
    },
    "question": "{你的问题}"
    }

"""
其中,query =
{
替换成你的问题
}

from langgpt.

yzfly avatar yzfly commented on May 18, 2024

很棒!问一下(1)在哪个模型上测的呢(GPT3.5 / GPT4/ Claude or 其他)?
(2)"Context_memory” 是 Reminder 模块下的具体要求吗?
(3)你看过 LangGPT Helper prompt 吗?以prompt生prompt 的框架是否是 Helper prompt 的简化实现。
(4)是否有意提交 PR 一同开发本项目

from langgpt.

superbayes avatar superbayes commented on May 18, 2024

很棒!问一下(1)在哪个模型上测的呢(GPT3.5 / GPT4/ Claude or 其他)? (2)"Context_memory” 是 Reminder 模块下的具体要求吗? (3)你看过 LangGPT Helper prompt 吗?以prompt生prompt 的框架是否是 Helper prompt 的简化实现。 (4)是否有意提交 PR 一同开发本项目

(1)定义的格式变得更加复杂了,我觉得不如markdown格式,有利于理解.

from langgpt.

AjianNie avatar AjianNie commented on May 18, 2024

真秀啊👍

from langgpt.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.