直接告知 ai 什么能做,什么不能做外。在某些场景下,我们能比较简单地向 ai 描述出什么能做,什么不能做。但有些场景,有些需求很难通过文字指令传递给 ai,即使描述出来了,ai 也不能很好地理解。
比如给宠物起英文名,里面会夹杂着一些所谓的名字风格。此时你就可以在 prompt里增加一些例子,我们看看这个例子:
suggest three names for a horse that is a superhero.
output 是这样的,第一个感觉还行,第二个 captain 有 hero 的感觉,但 canter 就像是说这匹马跑得很慢,而且三个都比较一般,不够酷。
thunder hooves, captain canter, mighty gallop
此时你就可以在 prompt 里增加一些案例:
suggest three names for an animal that is a superhero.
animal: cat
names: captain sharpclaw, agent fluffball, the incredible feline
animal: dog
names: ruff the protector, wonder canine, sir barks-a-lot
animal: horse
names:
增加例子后,输出的结果就更酷一些,或者说是我想要的那种风格的名字。
gallop guardian, equine avenger, the mighty stallion
以下是一些场景案例,我整理了两个 less effective(不太有效的) 和 better(更好的) prompt,你可以自己尝试下这些案例:
场景 | less effective | better | 原因 |
---|---|---|---|
起英文名 | suggest three english names for a boy. | suggest three english names for a boy. here are some examples: jimmy、jason、james |
可以在下方运行这个案例,在不给示例的情况下 ai 会给你什么答案。 |
将电影名称转为 emoji | convert star wars into emoji. | convert movie titles into emoji. back to the future: 👨👴🚗🕒 batman: 🤵🦇 transformers: 🚗🤖 star wars: |
可以在下方运行这个案例,在不给示例的情况下 ai 会给你什么答案。 |
未经允许不得转载:凯发k8ag旗舰厅 » chatgpt技巧2:增加示例