写点什么

AI 日课 @20230413:Prompt Engineering 02 - 原则

作者:无人之路
  • 2023-04-15
    浙江
  • 本文字数:918 字

    阅读完需:约 3 分钟

AI日课@20230413:Prompt Engineering 02 - 原则

AI日课@20230413:Prompt Engineering 02 - 原则


学习 1:Prompt Engineering 02

今天继续学习 Prompt Engineering,主要是如何写 Prompt 的一些框架性的原则。

https://github.com/mattnigh/ChatGPT3-Free-Prompt-List

给出了一个叫 CRISPE 的框架性原则,如下


CRISPE Prompt Framework:

  1. Capacity and Role: What role (or roles) should ChatGPT act as?

  2. Insight: Provides the behind the scenes insight, background, and context to your request.

  3. Statement: What you are asking ChatGPT to do.

  4. Personality: The style, personality, or manner you want ChatGPT to respond in.

  5. Experiment: Asking ChatGPT to provide multiple examples to you.


https://medium.com/@thorbjoern.heise/a-generic-framework-for-chatgpt-prompt-engineering-7097f6513a0b

也给出了一个类似的由 basic elements + specifiers 的框架:



https://humanloop.com/blog/prompt-engineering-101

这篇文章结合例子给出一个原则清单:

We have seen several tips for getting started with prompt engineering. For a quick recap:

  1. Use clear, direct, and concise instructions

  2. Try “complete this sentence” prompts for more natural responses

  3. Use examples (few-shot learning) of the task

  4. Align prompt instructions with a clear end goal

  5. Use persona keywords to alter the style and voice of the response

  6. Constrain the LLM’s responses by listing desired responses in the prompt

  7. Experiment with variations of the prompt to see what works best for you!

Go on and start engineering prompts with these newfound skills and remember that if at first you don’t succeed, try and try (a different variation of a prompt) again!


总结一下,写好一个 Prompt,需要告诉 AI:

  1. role:你是谁

  2. instruction:要做什么

  3. context:背景信息

  4. examles:如有必要,举例子

  5. requirements:输出的受众、格式等


如果只留一条:

  1. Experiment:做试验,靠尝试


近期 AI 日课:

AI日课@20230412:Prompt Engineering

AI日课@20230411:Prompt的三个层次和三个“万万没想到!”

AI日课@20230410:大语言模型是对本质知识的无损压缩

发布于: 刚刚阅读数: 3
用户头像

无人之路

关注

无人之路,自己领航。 2018-04-25 加入

喜欢写点东西的数据人,自动驾驶从业者。公众号同名,欢迎加微信yangls06交流。

评论

发布
暂无评论
AI日课@20230413:Prompt Engineering 02 - 原则_ChatGPT_无人之路_InfoQ写作社区