Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Copilot Studio - General
Unanswered

Remove quotes from generative responses

(0) ShareShare
ReportReport
Posted on by

Hi, 

 

I have created a chatbot for my department that answers questions about other employees, projects, teams, processes, etc. The information that the chatbot uses to generate responses about employees is stored in several Word documents and pages in a SharePoint. When generating answers, numbers appear in the text (1, 2, 3, etc.) that act as quotes. If the user clicks they can access the source of information. I need to remove those numbers from the answers, for security reasons. I would like the user to not be able to access the original source of information, since they could also edit the documents and alter the information. I appreciate if anyone knows a solution.

 

Thanks in advance.

 

Fernando

 

  • lonewolf1 Profile Picture
    29 on at
    Re: Remove quotes from generative responses

    you can user 'Answer.Text', for more detailed explanation, have a look at my response to this post

  • FGuerrero1 Profile Picture
    on at
    Re: Remove quotes from generative responses

    Hi again @Umianta 

     

    Yes,  of course.

     

    Thanks 

  • Umianta Profile Picture
    290 on at
    Re: Remove quotes from generative responses

    Hi @FGuerrero1 

     

    I am glad that you were able to make some progress . Can you share me the  error you are getting ? 

    Cheers ,

    Umesh Khandelwal

  • FGuerrero1 Profile Picture
    on at
    Re: Remove quotes from generative responses

    Hi @Umianta,

     

    Thank you very much for your answer, it seems to be a good solution. I have stored the generative answer in a variable called "employees_answer". Then I have introduced this function: Replace(emplyees_answer, "<a href=", ""). "emplyees_answer represents the response generated by the chatbot and with the replace function it looks for the link and replaces it with an empty string, thus removing the links. However, it gives me an error. I have almost no knowledge of programming, functions, formulas, etc. so I am probably doing something wrong. I don't know what Power Fx function I could use to parse the response and remove the links.

     

    Thank you very much again for the help.

     

  • Umianta Profile Picture
    290 on at
    Re: Remove quotes from generative responses

    Hi @FGuerrero1 

     

    It seems there isn't a straightforward method to exclude reference links in Generative Answers responses. I tried to control it through Custom Instructions or prompts ,but didn't help

    However, you can develop a custom solution to address this:

    1. Save the Generative Answers response in a variable.
    2. Utilize Power Fx function to parse the response and eliminate the links.
    3. Display the simplified response message in the chatbot.

    Umianta_0-1713692008414.png

     

    If my response has addressed your query, kindly mark your post as Solved.

    If you found my response helpful or it provided you with a direction to proceed, please give it a Thumbs Up. Your Kudos are appreciated. You can accept multiple posts as solutions.

    If you're still encountering any issues or challenges, please don't hesitate to inform me so I can assist you further. I'm here to help.

    Cheers ,

    Umesh Khandelwal

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Copilot Studio - General

#1
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 76

#2
Pablo Roldan Profile Picture

Pablo Roldan 61

#3
stampcoin Profile Picture

stampcoin 10

Overall leaderboard