In 2022 fall, ChatGPT has been released, which was one of the biggest milestone in the generative AI space. Huge companies started to integrate with OpenAI really fast – such as Microsoft, Bing Search has integrated a Bing Chat which is using OpenAI APIs in the background. This huge hype and consume of ChatGPT was an eye-opener, the time of using AI in our daily life as human beings has come.
Here at ALLWIN, we started to research AI integration possibilities for enterprise applications, using the available AI services. As we are a Microsoft partner, our first idea was to see what Azure can offer. Azure offers a whole bunch of AI services, such as Azure OpenAI Service, Azure Cognitive Search, Azure AI Language, Azure AI Speech, etc. This is not a technical post , the goal of this post is to give you ideas through our PoC projects, how AI services can support your business and which service is designed for what purpose (although these services can be combined).
This is a highly configurable service package around different OpenAI APIs, including Azure OpenAI Studio which is a user friendly, wizard based client application to create and configure OpenAI based applications. Besides the user interface, Azure creates and configures different Azure services to make these applications smarter, than just a UI for OpenAI APIs.
As seen on the screenshot above, Azure OpenAI Studio offers 3 playgrounds to use different OpenAI services: Chat, Completions and DALL-E (excluded from this post).
Chat playground looks really similar to the ChatGPT UI, but here it contains much more configuration possibilities how the chat should behave, but the most interesting part here is the “Add your data” option, which means I can use my own private documents as a source for my ChatGPT-like application. In my next blogpost I’ll cover the technical side of building a custom chat application using Azure AI services, but now let’s talk about the possibilities using it in enterprise applications. Let’s take an intranet as an example which is using SharePoint mainly as a document storage and collaboration platform. These documents can be used as context for conversation, therefore users of the intranet can chat with the application by asking about content of the documents. Below an example, what Azure AI can extract from our policy at ALLWIN.
As seen above, it can also show the original text sections and the name of the document(s), which were the source for the answer from OpenAI – this is not a OpenAI feature, this feature is implemented by Microsoft based on Open AI Embedding API, Azure Cognitive Search and text-embedding-ada-002 embedding model.
Data privacy concern might come up in your mind – what happens with my private data? Is it stored by OpenAI in any form? Does OpenAI re-use my data? The simple answer is “No”, because the documents are indexed by Azure Cognitive Search from an Azure Blob Storage and these are managed in your Azure Subscription with full transparency and full control in your hand. Azure OpenAI Services only include in the OpenAI request the actual related data for the given question and it throws after the response. So, of course private data is sent to OpenAI, but not stored!
Completions is really similar to Chat. The biggest difference is that it is answering for the prompt by extending the sent text instead of answering it. This API can assist people in writing, by predicting the next phrase or even a section for a text based on the written text. For example it can be integrated to a CMS (Content Management System) editor interface to accelerate content writing for marketers. Let’s look at the following example, where I want to write marketing content for a landing page. I just wrote 1,5 sentence and the Completion API can fill the rest of the last sentence (text generated with green background) based on the previously written text.
I did not provide any private data – except the prompt itself. Can you imagine how powerful it is to have such an integration in a Content Management System? Although, it is possible to use our own data on the same way as I mentioned in the Chat paragraph, using Azure Cognitive Search and OpenAI embeddings.
So far, I talked about the Azure OpenAI services but now let’s look at a pure Azure based AI service. Sentiment Analysis is a service to classify a given text to “positive”, “neutral” or “negative” categories with a confidence level. Let’s look at the service results, using the following example: we just released a new internal product to help managers to create financial reports and managers asked to give feedback about the product. We have two options, how to execute sentiment analysis:
Use the following 4 feedback as an example:
If we do the analysis for all feedbacks in one go, then I can get a response about the document sentiment and per sentence as well.
The document sentiment result is the average percentage of all sentence results. This could give you false results, because if a person leaves a long feedback with multiple sentences it distorts the results, and one opinion can move the result to too negative or positive. Therefore, in this case I would recommend to do the sentiment analysis per feedback and then calculate the average. Well, it is important to define what is one unit, because a sentence is not always a unit.
Azure Language Studio also gives a great overview, what kind of sentimental words (assessment) and objects (target) found. For example, “helping” is a 100% positive adjective but the “too complex” is more heavy because of the word “too”, that’s the reason why the result is 79% negative. If I remove the word “too”, then the negative part gets softer. Here are the results without the word “too”.
In this post, I showed just a few examples how AI can help organizations to be more effective. Azure offers a lot more services, this 3 examples could give you hints to think about AI integrations in your business. If you need any help in the discovery phase or in the implementation phase, do not hesitate to contact us!