Tip
对提示词极度压缩所带来的表意的精准和凝练,使得我们的意图在大模型的向量空间被精准送达;另外文字的简洁让大模型注意力更加集中,不容易产生幻觉
这句话还是非常抽象,既然实践是检验真理唯一标准,在这里我利用一些案例来说明:
先看这一段文生图的提示词,初始的提示词不仅长度长,很多词语冗余,表意不精确,让我们一步一步来压缩
original:
Create an artwork of a small monkey in the style of a modern video game built on Unreal Engine. The monkey is standing in a forest environment with trees, beautiful nature and a bright blue sunny sky in the background, high contrast image composed of a brown, green and olive color palette.
compress step:
image composed of a brown,green and olive color palette⇒earthy tonesCreate an artwork of a small monkey in the style of a modern video game built on Unreal Engine. The monkey⇒An ureal engine 3D render of a monkeya bright blue sunny sky in the background⇒sunny skyin a forest environment with trees, beautiful nature⇒forest
通过一步压缩,最终得到
An unreal engine 3D render of a monkey,forest,sunny sky,high contrast,earthy tones
从效果来说,我们第二次压缩过的生图,明显要比第一张图主体明确,好很多。这就是我所说的提示词凝聚的意思,让大模型少了很多干扰。
当然,我们也可以说,由于过度压缩,我们本来让猴子“站着”的信息丢失了,我们可以再把这个词意加上
modified
An unreal engine 3D render of a monkey,forest,sunny sky,high contrast,earthy tones
最后这张效果图中,我们看到除了最后一张,其他几张的猴子都是站姿了。 拿这个案例作为例子,我们现在应该可以真切的感知到,用词的精准和凝聚有多么重要。
作为理工科背景,我现在能感觉文科类,哲学类这些科目有多重要,他们会在驾驭AI方面有更大的潜力。
另外分享一些修炼用词凝聚的方法,比如可以探索一些跨界的学科理论:

又或者用一些模板套路,比如以文胜图为例:
[art style] of a [subject], in [location/scene], [mood]

让我们一起共同学习


