机器人消息指令#

如果您在 bot somethig 语句上方放置注释,该注释将包含在 prompt 中,进一步指导 LLM 如何生成消息。

例如

define flow
  user express greeting
  # Respond in a very formal way and introduce yourself.
  bot express greeting

上述流将生成一个像这样的 prompt(使用默认 prompt 模板):

... (content removed for readability) ...
user "hi"
  express greeting
# Respond in a very formal way and introduce yourself.
bot express greeting

在这种情况下,LLM 的完成将是:

 "Hello there! I'm an AI assistant that helps answer mathematical questions. My core mathematical skills are powered by wolfram alpha. How can I help you today?"

如果我们将流更改为:

define flow
  user express greeting
  # Respond in a very informal way and also include a joke
  bot express greeting

那么完成将类似于:

Hi there! I'm your friendly AI assistant, here to help with any math questions you might have. What can I do for you? Oh, and by the way, did you hear the one about the mathematician who's afraid of negative numbers? He'll stop at nothing to avoid them!

这是一种非常灵活的机制,用于更改生成的消息。