Solution found: use the OnPlanComplete topic trigger to collect feedback after the AI response
Topic: Capture AI Response
Trigger: OnGeneratedResponse
Nodes:
– Set variable value Global.isAIGeneratedResponse = true
– Set variable value Global.FormattedText = System.Response.FormattedText
– Set variable value Global.Citations = System.Response.Citations (optional, I’m tracking which sources receive positive and negative feedback)
Don’t cancel the response (so don’t set System.ContinueResponse to false)
Topic: “Plan complete – ask for feedback”
Trigger: OnPlanComplete
Add condition to the trigger: Global.isAIGeneratedResponse = true
Nodes:
– Send message (or Ask with adaptive card): send an Adaptive Card to request feedback. Pass Global.FormattedText (and optionally Global.Citations) into the card data.
– Set variable value Global.isAIGeneratedResponse = false
Same issue, ContinueResponse = false and then sending System.Response.FormattedText
I’ve implemented a quick workaround until we find a better solution:
If(
IsEmpty(System.Response.Citations),
System.Response.FormattedText,
System.Response.FormattedText
& Char(10) & Char(10)
& “**Sources:**” & Char(10)
& Concat(
System.Response.Citations As c,
“1. [” & c.Name & “](” & c.Url & “)” & Char(10)
)
)