变量提示词#

我的变量提示词方案已经在变量提示词: 让 AI 理解变量中详细介绍了, 此处只列举一些杂七杂八甚至可能过时了的内容.

这些都只是提示词, 写法只取决于你的想象. 以下只是给你一个概念, 请不要照抄.
这些都只是提示词, 写法只取决于你的想象. 以下只是给你一个概念, 请不要照抄.
这些都只是提示词, 写法只取决于你的想象. 以下只是给你一个概念, 请不要照抄.

我的过时变量角色卡#

我每张卡其实都使用了不同的变量提示词写法:

  • 所有变量提示词都在 D1

  • 补充一个 D0 recall 来稳定格式

../../../../_images/%E5%8F%98%E9%87%8F%E6%8F%90%E7%A4%BA%E8%AF%8D_%E6%97%A5%E8%AE%B0%E7%BB%9C%E7%BB%9C.png

变量分析思维链#

思维链或者所有提示词怎么写完全由你自己说了算, 你也许会得到:

不为变量编写任何 check 规则, 而是直接让 AI 自己搞定:

<UpdateVariable>
<Analysis>$(IN ENGLISH, no more than 80 words)
- ${calculate time passed: ...}
- ${decide whether dramatic updates are allowed as it's in a special case or the time passed is more than usual: yes or no}
- ${what variables should be updated, accoring only to current reply instead of previous plots: ...}
</Analysis>
<JSONPatch>
[
  { "op": "replace", "path": "${/path/to/variable}", "value": "${new_value}" },
  { "op": "add", "path": "${/path/to/array/-}", "value": "${item_to_append}" },
  { "op": "add", "path": "${/path/to/object/newKey}", "value": "${content}" }
  { "op": "remove", "path": "${/path/to/array/0}" },
  ...
]
</JSONPatch>
</UpdateVariable>

此外, 变量更新格式说白了也是额外输出格式, 因此完全可以放在更次要的位置而在 D1/D0 用变量更新格式强调来保证 AI 输出.