Supercharging Microsoft Teams with AI

AI is everywhere already and it will be even more everywhere. You can find it in our phones, our laptops, our cars, our homes, and occupy our minds. AI is not just a technology, it is a revolution. A revolution that is changing the way we work, learn, communicate, and create. AI is not only transforming the world and work, but also how we should transform ourselves. For some this is overwhelming or there just too much noise about it all the time. Yes, AI content is very vocal, but the impact AI is doing to this world; I don’t think it is too much. AI fuels digitalization, and digitalization feeds AI. It’s a cycle of innovation that grows faster and stronger with each revolution.

And we are living in this an amazing era of innovation and advancement. Every day, we witness something new , a new AI tool or use and expand possibilities where AI can help us. You have very likely heard about Microsoft Copilot, which got a Generally Available day for the first of November. It is coming faster than I thought!

So, it is not a surprise that this week is full of AI for me. This is because of the Baltic Summit 2023, where I will be speaking on Saturday 30th of September 2023 about Supercharging Microsoft Teams with Azure OpenAI. This gives me a chance to visit beautiful Gdynia in Poland for the first time. I am very excited to share my experience and use cases on how to leverage the power of Azure OpenAI to Supercharge Microsoft Teams with AI. I will also show cool, live, demos and a peek under the hood on how AI can integrate with Microsoft Teams using Power Platform. You are most welcome to reserve a ticket to this free community event and join me at the Baltic Summit 2023!

Now, to spoil (or hype) a bit about my session on Saturday I want to share something, in advance, of what you will be seeing live, on the stage. No, this is not a full session reveal – to see that you need to join the event in person.

Azure OpenAI

Azure OpenAI offers a great way for organizations utilize large language models along with Dall-E, Whisper and there are tons of other Azure AI services. We have seen already lots of “ChatGPTs” in action – one of course is Bing Chat Enterprise of which I wrote a month+ ago. The short story is: you can use various GPT-models, including GPT-4 32k, via Azure OpenAI.

What makes this really interesting, is that what else you can do with capabilities that are emerging with Azure OpenAI.

Add your data enables to combine Azure Cognitive Search (ACS) with AOAI (Azure OpenAI). The query to search index is done internally in AOAI during the request. At this point you can connect only one Cognitive Search Index to the query, but it is possible to have various information sources that are connected to ACS Search Index. Sources can be , for example, Azure Blob Storage or SharePoint Library. And now the plot thickens.. When you start adding SharePoint Document Libraries to the index, you can index documents in your organization has. It is also possible to use semantic index, which essentially transforms that prompt used for the query to a well working search query. In short: you get better results with semantic index on, than without. Add your data is in preview, and it comes with some limitations: only English materials (and query) are properly supported. ACS could support multiple languages, but that has not been extended to AOAI – at least not yet.

Another great parameter is inScope, which limits the language model to answer to the prompt based only by the data that was found with query. This means less (or none) hallucination since model doesn’t invent answers out of the thin datastream. For demos I have built a bot with Power Platform that gets the data from a SharePoint Document Library.

This is only the section, in GPT-model API call, regarding using own data source. There it is defined that it uses Azure Cognitive Search with index. Field mapping is the default one for SharePoint Library connected to ACS. I only fetch top 3 documents, but that can be expanded to 5 easily. Query type is semantic with extremely imaginative semantic configuration name “semantic”.

Here you can see this in action.

Add your data returns reference documents with citations along its answer. This way it is possible to point to referenced documents – and it would be also possible to include citation (the part of the document where AOAI found the answer) in the response. I have omitted that part. Yes, it returns the same document three times, and this can happen when it thinks it found a need to have different citations – despite doc 2 and 3 were not used in the text.

And if something is queried that is not found in the query, the model generates a short answer:

Quite cool, isn’t it?

What what is even more cool is Functions capability which was introduced to AOAI at the end of July. With Functions capability it is possible to build bots that understand user’s intent and convert that to requests to backend systems. This is very likely how Copilot works under the hood as well – determining from the prompt when certain plugin needs to be called – and using which parameters. Functions is in preview currently.

I have a simple example in this one: getting a temperature of a city at this moment. When the language model determines that user is asking a temperature of a certain city, it lets program to know about and how to call it. Every AOAI API call includes functions descriptions. The flow is

  • User prompts
  • Response determines function name and parameters
  • Call your API, backend, flow, …
  • Call AOAI again (in the program) with response details
  • Get the final response.

So yes, this is more complicated than standard GPT API call. It is also possible to describe multiple functions to call and receive chained calls to functions. This opens awesome possibilities as it is transforming the AI from passive RETRIEVE to active ACTION.

In the example I have described get_weather that needs one parameter: city location that can be such as Helsinki, Finland or Seattle, WA, USA. AI converts our request to correct parameter format. Description of both function and parameters are very important since they are the key how AI determines when those functions need to called.

This is the response from call, telling that finish_reason is function_call that needs to be done. In the demo I call Azure Maps API to retrieve that city’s temperature.

So, let’s see this in action:

As can be seen, I don’t have to follow any specific format. AI knows the temperature of Gdynia, Poland is needed in order to generate the answer. Perhaps I should have mentioned it is a community event and not a business one. That leaves me a question: blazer or no blazer. Perhaps I just take a t-shirt. Hoodie is definitely out of question with that temperature.

The functionality could be extended to include a day also, and call to Azure Maps API could include getting a forecast, but I wanted to keep this example simple.

And as it is an language model, it can ask for missing parameters as well.

I have also other demos about functions, which I will present at Baltic Summit 2023 this Saturday. As there can be multiple function calls, bot can understand more complex prompts. This is an another step towards a new kind of UI with machines.

AI can be used to supercharge Teams in various ways. For example analyzing free text responses by retrieving semantics and more, as well as automatic document summarizing that can help to save some time when people can just read the summary to determine if they should read the document also. Or just to get most relevant points of the content quickly.

I am also looking forward on extending Microsoft Copilot. After all, there is always a trigger in Power Automate for those. My guess is that Copilot is introduced about these capabilities and functions (with parameters) are connected to Power Automate that will be called when needed. Sounds very much like Functions work, doesn’t it?

And parameters are described just like you do when introducing flows to Power Apps or Power Virtual Agents.

AI is changing the way we work.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.