Copilot Studio RAG with Azure Open AI and Azure AI Search
ฝัง
- เผยแพร่เมื่อ 15 ต.ค. 2024
- Here I demonstrate how to use an Azure AI search index inside a Copilot Studio chat bot for a more advanced RAG scenario.
Link to demo script for adding files to blob storage: github.com/dju...
Official Microsoft doc: learn.microsof...
Azure OpenAI API Reference: learn.microsof...
Troubleshooting and Best Practices: learn.microsof...
Great video, very clear, esp. for the SAS powershell script for all blob storage items, very useful. BTW, are this setup requires the AOAI service to be on the same tenant of Copilot Studio?
@@michaeljiang4913 Thank you!
I'm not sure if the AZ subscription needs to be in the same tenant. You could try adding it manually in the connectors page of make.powerapps.com
Mate, awesome work.
Having searched myself for all these topics, I can see how tough it would have been behind the scenes .
Keep it up !!!
Been searching for info on using Azure AI with Copilot studio - THANKS for uploading this vid - well explained and super helpful!!!
Great, Im glad you found it useful! I plan on making a video on using generative actions and plugins with copilot studio so stay tuned for that.
Thank you very much . Got a question though , how do we know if and how much prompt history is sent to open ai via copilot?thx
I've been looking around for months for this exact use case. Thank you so much 👏. However, I still had to add title:[document name] in metadata for all documents in container (i did it manually)
Few more things to consider:
- using Basic tier for Azure Search service limits documents to 65536 characters, which in my case is 10 - 20 pages of pdf document. This is pretty restrictive.
- when giving access to references there are additional settings necesarry on the blob container
But most important - much better results comparing to connect Copilot to Sharepoint that has same documents in library.
@@markshark337 yes that is true about the Character limit. I am primarily using this for IT help desk tickets and documentation internally for my company, so those aren't that long. For large PDFs, you might need to break them up to stay on basic tier.
great video Dave, been looking for this!
Great tutorial and brilliant pacing! Really wonderful and very helpful. And, it's such a shame you have so few subscribers.
@@gunaseln thank you!
Thank you, learned something today.
Great content mate! Really useful stuff!!!
Great video! Question on the Citations provided with the responses. Do you know if it's possible to go directly to the 'point of reference' in the documents? One of the docs is over a hundred pages and I'm thinking about breaking down the document into smaller chucks if I can't go directly to the reference point. Any ideas or work-arounds?
That is a good point. I think your idea of breaking up the document is the best bet. Azure AI search does not consider page numbers or anything to indicate the place in the document, so the citations will just have the document name and link to that document.
Great content! Thanks for the demonstrations. Just a quick question: Is it not possible to enable hybrid search plus reranking while connecting our index in the OpenAI studio? I believe this option is available in Azure AI studio but strangely enough it wouldn't let me deploy the RAG app in copilot studio
@@amith114 yeah I ran into the same thing. It seems for now only keyword and semantic search works in copilot studio. Hopefully hybrid support will be added soon.
@@pwshisfun Thanks for reply! Appreciate it
I tried to use your script for the PowerShell repo and uploading the Blob account, but nothing appears to upload. I am determined it is looping through the for each loop, but it is not uploading. I am not getting any errors during that loop, though. I was able to manually upload the data, but unfortunately, it's missing the URL metadata. Any ideas?
Good morning Dave, I'm trying to recreate the Chat environment on my personal Azure account using the free $200 service credit. When I get to the 'Add a data source' in the chat playground I follow your instructions for adding the 'Data source', and 'Data management' sections. When I get to the 'Data connection' section I have a choice to use 'System assigned managed identity' or 'API key'. Selecting the 'System assigned managed identity' creates an error. 'Failed to validate the selected authentication type. Please resolve the following errors and click next.' with the following two errors 'The Azure AI Search resource has disabled RBAC authentication' and 'The Azure OpenAI resource has disabled system assigned managed identity'. Do you know how to resolve these two errors. Or do I need to use the 'API key'? When I select the 'API key' the Chat bot produces a timeout not enough tokens error. Do you have any ideas or thoughts for resolving the errors? Thanks for your time!! ~David
UPDATE: Boy, oh boy - this was a challenge to figure out!! I needed to change the Resource Group access control (IAM) in order for the for the managed identity to work. Sheesh!!
I didn't get the Azure OpenAI properties set automatically did you set it manually (deloyment name, index name .. etc) ?, thank you
I experiencing the same here, did you figure it out?
found it in the other video of @Dave's channel!
Hey! I tried to set it up with no success. How did you set up model data in the connection properties of the Azure OpenAI connection? Under "General" settings deployment name is clear, for the API version I tried both 2024-05-01-preview and 2023-06-01-preview but still getting "No information was found". The solution will be in connection properties.
I made a video reply to answer your question. Please see that here th-cam.com/video/vzLNfvC1K64/w-d-xo.html
If you have further questions, feel free to shoot me an email at david@davidjust.com
Man, you’re awesome. I wasn’t expecting such a quick answer, let alone in the format of an additional training video. I believe the issue in my case was with deploying from Azure OpenAI Studio to Copilot Studio Custom Environment, which is still in preview. I deleted the entire setup and first set up the Azure OpenAI connector from scratch in PowerApps. Then I added the Copilot configuration step by step, and it started to work. Many thanks for the explanation, I learned a lot!!
LOL, do not have conversation boosting under topics when deploy from OpenAI Studio to Copilot Studio, any idea?
You need to enable generative ai under settings / generative AI. Where it says "How should your copilot decide how to respond?" Select generative (preview). This will create the conversation boosting topic.
@@pwshisfun ok thanks! Now the OpenAI can works on copilot studio, but only in the "test your copilot", I am unable to publish, no error in topic checker, coming back to your channel, you actually successfully published to teams!!!
you did any configuration on azure? such as grant access etc?
@@ctvs-lee What happens when you try to publish? For teams, you need to publish the bot, then enable and configure the teams channel learn.microsoft.com/en-us/microsoft-copilot-studio/publication-fundamentals-publish-channels?tabs=teams