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 / How Can I Force a Copi...
Copilot Studio
Unanswered

How Can I Force a Copilot Agent to Respond With a URL?

(3) ShareShare
ReportReport
Posted on by 136
I want to create a Copilot agent that acts as a global search for a wide variety of resources (200+). I want my agent to read through the text of the resources to find the answer to a user's question, provide a direct quote from the relevant resource, and, most importantly, provide a clickable URL to the resource. I'm hoping to find ideas for making that work. 
 
Since the resources aren't all text-based, my current strategy is to divide resources by a given domain, and then place the text from all resources in a given domain into a single text document that I then upload as a PDF knowledge source. For resources that are not text-based, I instead provide a written description of the resource and when it might be useful. Unfortunately, it seems that no matter what I try, my agent will always provide a reference to the PDF file I uploaded as a knowledge source - never to the resource mentioned in the knowledge source, which is the desired behavior. For example, let's say one domain is recipes. I might have a text-based RECIPE RESOURCES document with a section for each recipe. One section is CHEESE SANDWICH. The section starts by saying, "All information in this section is from Gordon's Cheese Sandwich, which can be found at such-and-such URL. When referencing this recipe, always provide an in-text link to the provided URL". Then when I test the agent, it will talk about Gordon's cheese sandwich, but will provide a "link" as a reference tab at the bottom of the response that, when clicked, produces to a weirdly formatted text pop-up of the content of my PDF.
 
I'd also be okay even if the link was just a raw URL instead of something that is nicely formatted. Or even just a string that isn't clickable at all. But it seems like something is blocking any URLs from appearing in an answer an agent gives? No matter how I format or include a URL in a knowledge source, I can't make it appear in anything the agent says. 
 
I've also tried:
  • Adding a JSON object as a global variable that has the paired Resource Names and URLs, and adding instructions to check any response it gives to the user for all of the string values in the "Resource" part of each pair, and to make such strings appear as a clickable link to the paired URL any time they appear.
  • Telling the agent to always provide an in-text clickable link to resources it mentions.
  • Telling the agent to look for HTML syntax in knowledge sources, and to provide a clickable URL whenever presenting information formatted in this way. 
 
 
Categories:
I have the same question (0)
  • Verified answer
    Artur Stepniak Profile Picture
    1,539 Super User 2025 Season 2 on at
    Hello,
     
    it's because your PDF data is being indexed, which means that it's converted to embeddings - matrix representation of your text data. In consequence, it searches your data by converting your prompt to the same embedding and finding the nearest neighbour in the PDF - to put it simply, I don't know exactly what they do. If you like to search for the data like you've mentioned, you'd need to convert your data to a kind of table representation. Then the bot could filter out the table in the topic and provide you with the necessary data.
     
    In case of any other questions, let me know. If the answer helped you, mark it, so that others can benefit from it.

    Best regards,

    Artur Stepniak
    Interested in GenAI? Visit my site!
     
  • Verified answer
    JT-29071526-0 Profile Picture
    136 on at
    Thank you very much! I was able to make this work by creating a table with a column for URL, Resource Name, Question, and Text. Then I built a new "Question" entity and added agent instructions to match the user's input to one of the possible "Question" values. Output is provided to the user through calling a Power Automate flow with a "get rows" Excel Business action that finds the matching row using "Question" as the key. 
     
    This seems to work, and is a big step forward. Although it would be great if there were a way to accomplish something similar without being quite so micromanagey. 

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 255 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

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

#3
S-Venkadesh Profile Picture

S-Venkadesh 101 Moderator

Last 30 days Overall leaderboard