I have a Generative Answers bot successfully pulling answers from SharePoint...most of the time. The issue with it seems to be either missing content or the right content not being presented to the bot by search to process.
Microsoft states on this link -> https://learn.microsoft.com/en-us/microsoft-copilot-studio/nlu-boost-conversations#forming-questions that:
To learn more about how Bing interprets the question against the URL you specify, add site: \<your URL here> to the end of your question to see the top Bing results for the question.
This doesn't work in Bing, but if I use Bing for Work -> https://www.bing.com/work/ and enter a search like
"what is the dog policy in the office site:https://faketenant.sharepoint.com/sites/officepolicy"
I'll get a list of the searches for that question. So, I'm guessing that is what MS means above.
The problem is if I ask the bot the question "what is the dog policy in the office" the bot will give me a correct answer, but the references will be to links that are never listed by the Bing search above. So, obviously the Bot doesn't do it's searching that way. It happens with most questions.
I need to have a way of duplicating the way the bot searches so I can mimic it for the questions it gets wrong allowing me to correctly see what information the search is providing it.
I have also set up MS Graph API searches and PNP Modern Searches to try duplicate the correct answers. Both provide the same results as Bing Work.
My guess is the bot shortens what it searches for dropping the junk. Me doing that manually isn't a reliable answer.
Does anyone know how to mimc the search correctly or better yet know a log location (I have Application Insights setup for the bot) where it stores the exact search term it uses?
Hi @t353
Generative answers leverage the graph API to find the right documents and send them to the LLM for summarization and answer generation. There are some internal mechanism for moderation / content filtering in the back after the retrieval so you may have to look into application insights if you don't get any results for some queries.
You can see which documents are used by Copilot Studio by using the Graph Explorer and using a search query like this:
{
"requests": [
{
"entityTypes": [
"driveItem"
],
"query": {
"queryString": "YOUR KEYWORDS path:\"https://d365demopp497148.sharepoint.com/sites/Internal/\""
},
"from": 0,
"size": 3,
"QueryAlterationOptions": {
"EnableModification": true,
"EnableSuggestion": true
}
}
]
}