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.