Skip to main content

Notifications

Copilot Studio - Building Copilot Studio Chatbo...
Answered

Citations / references not showing in the chat in Teams but working in PVA

(5) ShareShare
ReportReport
Posted on by 24

Hello,

 

Is there a way to have the references/citations showing in a Teams Power App like it does in the PVA web app ?

Thank you

Chloe_lepez_0-1699539372525.png

 

  • Suggested answer
    CD-15111524-0 Profile Picture
    CD-15111524-0 3 on at
    Citations / references not showing in the chat in Teams but working in PVA
    @Sebbi3 - I have been able to get some solid results using Prompt Actions rather than the typical Generative Answer nodes:

    1. Turn off Generative AI orchestration. The citations, as noted in prior responses, have not been working in Teams anyway (not hyperlinked, only plain text).
    2. Using the Conversational Boosting topic, add in a Generative Answers (Advanced -> Generative answers) node to give answers from whichever knowledge sources you would like.
    3. In the properties for the Generative answers node, under Advanced settings, uncheck "Send a message" and save the Complete LLM response as a variable.
    4. Set a new variable for your sources to the following function. This will convert the sources that were found in the search to a string so you can use it in the prompt action below. I'm also omitting the Url and Id fields, because you don't want to cite anything:
     
    Concat(Global.YourLLMVariable.Text.CitationSources,
    "{ Name: " & Name & ", Text: " & Text & "},")
    5. Then, create a prompt action (Call an action -> Create a prompt).
     
     
    6. In your prompt, create a couple of input variables, one for the question that was asked by the user and the other for the sources variable you created above. Test and adjust this prompt to suit your needs. You might need to tweak it a bit. Also, I recommend changing the prompt setting for model to GPT-4o vs GPT-4o-mini.

     
    7. Set the input and output variables on the Prompt action node (System.LastMessage.Text or System.Activity.Text for the question typically; and a new output variable).
    8. Use a "Send a message" node to reply using the output variable (it's a record variable so you need to use Variable.Text to get the actual text response.
     
    Let me know if that helps you. There are ways to work with the functionality that Copilot Studio gives to you, but I really would like more settings around the default Generative AI orchestration, responses and citations. Right now I feel like I have to do a bunch of workarounds to get the functionality that I want.

    In general, for everyone else here, I highly recommend turning off Generative AI orchestration (until it works better with Teams) and using the Conversational Boosting topic. You have more control over the AI generated responses, as that becomes the default if no other matching topic is found. I've used it to create a formula to swap out citations with hyperlinks so they appear properly in Teams. You can also use my approach from above with a slightly different prompt to yield citations. Works with Teams perfectly:

  • Sebbi3 Profile Picture
    Sebbi3 19 on at
    Citations / references not showing in the chat in Teams but working in PVA
    Sorry to jump in. But is there a way to remove the citation and references from being displayed? As we would like just the answer to be displayed.
    Any assistance in this would be greatly appreciated. 
  • Vinoth Selvam Profile Picture
    Vinoth Selvam 1,161 on at
    Citations / references not showing in the chat in Teams but working in PVA
     
    Yes, you are correct. Copilot currently behaves differently based on the type of Knowledge Source.
     
     
    When you have the documents uploaded in the Dataverse directly,
    The Citations will be shown as Popup as you mention in your question.
     (But there are some ways to Customize this.)
     
     
     
    Can you try this method. This can help you to Customize the Citations.
     
    Amazing Video from Dewain.
     
     
    Hope this helps!
     
    Thanks.
  • MT-28102026-0 Profile Picture
    MT-28102026-0 2 on at
    Citations / references not showing in the chat in Teams but working in PVA
    This works great if knowledge source is SP or website. I have my knowledge source as uploaded file. In that case, I get only reference number [1] besides the text but file name/citation is displayed in reference. How can we get the file name of uploaded file using this method?
  • Suggested answer
    SG-23081251-0 Profile Picture
    SG-23081251-0 2 on at
    Citations / references not showing in the chat in Teams but working in PVA
    After implementing the given "Answer", the copilot runs into error when unable to generate a correct response: Sorry, something unexpected happened. We’re looking into it. Error code: SystemError. Conversation ID: a:1W11BuWgmw9r6iGRu1mrag1sqZnNuS88i6muQIG6jneH1PW9lmjVf8-aeRXf_25K1fbgz_Bb34EbhorjKsvuhfG40r9naPXyuztwJu3IyxRJfzU1vMNaec5qV5BHxEQq6. Time (UTC): 9/5/2024 3:50:36 PM.
  • SP-09082213-0 Profile Picture
    SP-09082213-0 12 on at
    Citations / references not showing in the chat in Teams but working in PVA
    I have implemented adaptive card but citation sources come as empty. My data source, pdf files are loaded from my local drive.
  • RM-05071235-0 Profile Picture
    RM-05071235-0 8 on at
    Citations / references not showing in the chat in Teams but working in PVA
    Hello HenryJammes ,
    I tried your workaround but unfortunately it doesnt work.
     
    The result is, in the Copilot Studio environment citations are no longer showing as clickable links, insted thay appear to be plain text.
    In Teams, however, beside the previous behaviour the system also returns an error message like this:
     
    Sorry, something unexpected happened. We’re looking into it. Error code: SystemError. Conversation ID: a:1oJ83Us81-82zcfTJzkAmnu5uYuj_7baSLZJ6v3C7rilMEaHYtxYILYCPJYMybKxhh472LanCQtc_5LpATOqO2YTrGkUpbZ5_iqJTgvVNKwt0UeyFoh3lM4vWf99OccdM. Time (UTC): 7/17/2024 7:57:59 AM.
     
    While the answer is something like this, where you can see that the citation numbers turn out to be plain text:
     
    Do you have any suggestion?
     
    Thank you in advance,
     
    Roberto
  • Suggested answer
    CU20060512-0 Profile Picture
    CU20060512-0 2 on at
    Citations / references not showing in the chat in Teams but working in PVA
    After implementation of @HenryJammes answer I'm encountering an error, how can we resolve?
     
  • shanepconnolly Profile Picture
    shanepconnolly 4 on at
    Re: Citations / references not showing in the chat in Teams but working in PVA

    Thanks for the response -solved the error but as you said, the links are still not clickable!

  • Brad Walker Profile Picture
    Brad Walker 2 on at
    Re: Citations / references not showing in the chat in Teams but working in PVA

    Hi Shane. I also ran across this initially. You need to create a new message not 'ask with an adaptive card'.  Then within the Message card, select Add > Adaptive Card. 

     

    Even with doing this, the links are not clickable from Teams. 

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #9 Get Recognized…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,867

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,161

Leaderboard

Featured topics