Lucifer 发表于 3 天前

ChatGPT提示词指令分享·技巧篇②

<h1>技巧 2:增加一定程度上的示例供AI参考</h1>
<p>除了直接告诉 AI 可以做什么和不能做什么,有些情况下,我们可以清楚地用语言描述这些限制,但有时需求比较复杂,光靠文字指令很难让 AI 完全理解。</p>
<p>举个例子,帮宠物取英文名字时,往往涉及特定的风格和感觉。单纯让 AI 生成名字,结果可能不够理想,像下面这样:</p>
<pre><code class="language-other">Suggest three names for a horse that is a superhero.
请为一匹超级英雄马取三个名字。
</code></pre>
<p>生成的名字里,第一个还算可以,第二个“Captain Canter”虽然带有英雄感,但“Canter”其实是慢跑,听起来不够酷,整体风格也比较普通。</p>
<pre><code class="language-other">Thunder Hooves, Captain Canter, Mighty Gallop
雷蹄、慢跑队长、神驰
</code></pre>
<p>这时候,我们可以在提示中加入一些示范案例,给 AI 一个更明确的参考:</p>
<pre><code class="language-other">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:

请为一种超级英雄动物取三个名字。

动物:猫
名字:锋爪队长、毛球特工、不可思议的猫侠

动物:狗
名字:护卫拉夫、神奇犬、吠叫爵士

动物:马
名字:
</code></pre>
<p>加了这些例子后,AI 生成的名字风格更贴近预期,更有酷感,比如:</p>
<pre><code class="language-other">Gallop Guardian, Equine Avenger, The Mighty Stallion
疾驰守护者、骏马复仇者、威猛战马
</code></pre>
<p>下面整理了一些场景示例,包含两个效果一般和两个更优的提示,你可以试试看效果差别:</p>
<table>
<thead>
<tr>
<th>场景</th>
<th>Less Effective</th>
<th>Better</th>
<th>原因</th>
</tr>
</thead>
<tbody>
<tr>
<td>起英文名</td>
<td>Suggest three English names for a boy.<br/>请为男孩取三个英文名字。</td>
<td>Suggest three English names for a boy.Here are some examples: Jimmy、Jason、James<br/>请为一个男孩取三个英文名字。以下是一些例子:Jimmy、Jason、James。</td>
<td>可以在下方运行这个案例,在不给示例的情况下 AI 会给你什么答案。</td>
</tr>
<tr>
<td>将电影名称转为 emoji</td>
<td>Convert Star Wars into emoji.<br/>把《星球大战》用表情符号表示。</td>
<td>Convert movie titles into emoji.<br/>Back to the Future: 👨👴🚗🕒<br/>Batman: 🤵🦇<br/>Transformers: 🚗🤖<br/>Star Wars:<br/>把电影名转换成表情符号。<br/>回到未来:👨👴🚗🕒<br/>蝙蝠侠:🤵🦇<br/>变形金刚:🚗🤖<br/>星球大战:</td>
<td>可以在下方运行这个案例,在不给示例的情况下 AI 会给你什么答案。</td>
</tr>
</tbody>
</table>
页: [1]
查看完整版本: ChatGPT提示词指令分享·技巧篇②