web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Hide references to Cit...
Copilot Studio
Answered

Hide references to Citations

(0) ShareShare
ReportReport
Posted on by 11

I would like to know, how can I hide references in my chatbot?

volodymyrlesiv_0-1709301094740.png

 

Categories:
I have the same question (0)
  • Verified answer
    cchannon Profile Picture
    4,702 Moderator on at

    Sure, take a look at this older forum response from @HenryJammes : Solved: Re: Citations / references not showing in the chat... - Page 4 - Power Platform Community (microsoft.com)

    In this forum post, the user had the opposite problem: Citations were not displaying and they wanted them to. Henry's response explains how you can feed a custom definition to an Adaptive Card response that creates an explicit spot for the citations.

     

    In your case, you should be able to follow Henry's instructions, but remove the Citations chunk from his formula so it doesn't display in the card.

  • manojsharmadcx Profile Picture
    on at

    Hi @cchannon , thanks for this answer. After removing citation part, the dangling references like [1],[2] etc. still remain. How can those be removed from answer. Tried using PowerFX formula but it apparently doesn't provide regex support.

    manojsharmadcx_0-1709718208706.png

     



  • volodymyrlesiv Profile Picture
    11 on at

    Hey hey) You can use SUBSTITUTE formula, if you want to remove all the dangling references, you can do something like this: SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(<variable>, "[1]", ""), "[2]", ""), "[3]", "")

  • BenBjon Profile Picture
    12 on at

    Thank you, this is exactly what I needed as well. 

     

  • BenBjon Profile Picture
    12 on at

    I have an additional problem. Is there a way to filter out quotation marks from answers you get using Substitute? I can't seem to do any escape characters 

     

  • sgupt187 Profile Picture
    19 on at

    Hi, I am working on citation removal from generative answer node response but not able to do so . In Conversation boosting topic able to do because there is a variable which is of type record but in any other topic when I am trying to create a variable in generative answer node then by default it is of string type . So , not able to apply below formula for citations removal:
    Substitute(Substitute(Substitute(Substitute(Topic.genRes.Text.Content, "[1]" , ""), "[2]",""),"[3]",""),"[4]","")
    Can anyone tell me how can I implement citation removal from the response generated by generative answer node in any other topic other than conversation boosting?

  • BenBjon Profile Picture
    12 on at

    I needed a solution for this because I'm trying to send back a structured JSON reply, and wanted the citations gone.

    After working on this for far too long, I found a formula that correctly filters out the citations and the trailing [1]'s. It doesn't require an adaptive card, it's just a single formula. 

    (Note, this only works for up to 3 citations, but it does work)

     Here's the formula:

    Trim(
     Substitute(
     Substitute(
     Substitute(
     Substitute(
     Substitute(
     Substitute(Topic.VARIABLE_HERE, ": cite:1 ""Citation-1""", ""),
     ": cite:2 ""Citation-2""", ""),
     ": cite:3 ""Citation-3""", ""),
     "[1]", ""),
     "[2]", ""),
     "[3]", "")
    )
  • sgupt187 Profile Picture
    19 on at

    Thank you, BenBjon, for the solution. It works perfectly.

  • mauldinjonas Profile Picture
    on at

    Where does this code go to be implemented into my topic? I have the remove citation code formula in my adaptive card. 

  • BenBjon Profile Picture
    12 on at

    What I did is pass the answer from Generative AI into a variable and disable the message. Then, right after, I have a variable node that executes this formula. It replaces the original response variable with this formula, and I'm assuming you can then pass that modified variable into an adaptive card. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 250 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 197 Super User 2025 Season 2

#3
S-Venkadesh Profile Picture

S-Venkadesh 103 Moderator

Last 30 days Overall leaderboard