Generative bot response in combination with rail in conversation flow #111
Replies: 1 comment 1 reply
-
Hi, So you want to do something like this?
I've just added a new canonical form, in order for the bot not to be biased towards over-generating You can also branch the flow to provide different continuations for positive or negative emotions, but you need to define different user canonical forms and branch on those. |
Beta Was this translation helpful? Give feedback.
-
Hello! Me and two other developers at my company are actively experimenting with NeMo-Guardrails in an attempt to improve our current agent architecture. We've been working with Guardrails daily for the past 2 weeks and keep running into this issue and can't seem to figure out a solution in the documentation....
We simply want to combine a generative response with our rails within the conversation flow.
For example:
def user express feelings
"Today is terrible. My dog died!"
"I had a horrible day.... I was struck by lightning!"
def bot express agreement
"Remember, the day can only get better from here!"
define flow encourage user
user express feelings
bot express agreement
What I want to do is.... generate a custom "empathy" response based on "user express feelings", then have the flow continue and trigger our rail "bot express agreement"
So that the final response would be something along the lines of:
BOT: "I'm so sorry to hear about your dog. Remember, the day can only get better from here!"
If anyone has any ideas, I would be very grateful to hear them!
Beta Was this translation helpful? Give feedback.
All reactions