Hello,
While using generative AI and providing answers to end users, I do not want my copilot to include the Citation or reference document from which it is referencing as it may contain sensitive information. How can I restrict it while i still use the uploaded files as reference only in the background?
Substitute(
Substitute(
Substitute(
Substitute(
Substitute(
Substitute(
Substitute(
Substitute(
Substitute(
Substitute(topic.answer.text.content, "[1]", ""),
"[2]", ""
),
"[3]", ""
),
"[4]", ""
),
"[5]", ""
),
"[6]", ""
),
"[7]", ""
),
"[8]", ""
),
"[9]", ""
),
"[0]", ""
)
Great Q. My sense is that what you are really saying is that you want response, say "We report through 3 frameworks: GRI, CDP, and SASB [1][2]." to be "We report through 3 frameworks: GRI, CDP, and SASB." - Meaning, w/o the "[1][2]." My guess is that we have to intercept the response, put that in a record, then somehow use JSON to replace [n] with nothing; basically, "replace" away the values thru, say [5]. I don't see any record.property that doesn't have the [1][n] embedded in it.
You're a legend @lonewolf1 ! I realized I was putting the reponseCaptureType in the wrong indentation.
Thank you so much for you help
Sure thing.
first click on your "create Generative Answers" node (aka generative node), then click on advanced.
Click on select a variable and then create a new variable (lets call it var1)
after you have created the variable, if the generative node your are modifying is NOT inside the 'conversational boosting' Topic, you will see that the copilot studio will automatically set the variable type to 'String'. If your Generative node is inside the booting conversation topic then you will see that it is defined as a record.
To the best of my knowledge, if the generative node output is set to String, the answer it returns will include citations. to fix this issue you would need to save the generative node output as 'Record' to make this change, you need to open the code editor of your topic
Next, find the section of the code that is related to the generative node
to change the output of generative node from "string" to "record" add the line 'responseCaptureType: FullResponse' to the end of the generative node part of code:
Close the code editor, and click on Generative node properties again. now you should see that var1 has changed from String to Record.
Next, I want to show the AI response to the user so I place a message node and select what type of a response I want to be shown. (only text, text and references, only references ,...)
Ps. the Var1.Speech is used when you are using voice instead of typing ( I think lol)
I hope it helps!
Hi @lonewolf1,
Could you explain me that better? How can you name your generative node output as a variable. I think I am confused 😅.
Thanks
I am making a document based QA bot and I am thinking of converting my PDFs to Json but unlike your case, I need the Responses to have references. If I can have your advice on the following 3 questions :
My Pdf file is a software guide and some of the screenshots are from the software environment that have to be part of the answer generative node creates.
Thank you in advance
My pleasure!! Dont forget that the Generative Node output should be saved as "Record".
If you are using "Generative" nodes outside of the "conversation boosting" topic , you will not have the option to select "Full response" as Generative node output. To fix that, open "Code Editor" of your topic (right up corner of screen) and add 'responseCaptureType: FullResponse' to your generative node. Now you will have the generative node output as a Record and you can choose what to display.
To be honest the microsoft guide for copilot studio is really bad and unorganized! We have to figure things ourselves lol I saw it by chance when I was looking at the variables in send message node.
Artur Stepniak
5
Super User 2025 Season 1
Ekta Gupta
4
Michael E. Gernaey
4
Super User 2025 Season 1