Skip to content

Integrating AI Builder with Copilot Studio for enhanced knowledge base utilization

In the current landscape of IT support, challenges such as managing a high volume of user requests, ensuring timely and accurate responses, and maintaining a knowledge base that is both comprehensive and accessible are commonplace. These hurdles can lead to inefficiencies, user dissatisfaction, and increased pressure on support teams. However, the advent of Artificial Intelligence offers a beacon of hope, promising to enhance efficiency and revolutionize the way user requests are handled.

One of the key advantages of AI in IT support is its ability to understand and process natural language. This means that when users reach out with questions or issues, AI can interpret the request and provide an accurate response by drawing from a vast repository of knowledge base articles.

In this article we are going to show how we can leverage Copilot Studio and AI Builder to build an IT support copilot that uses the Knowledge Base in Dynamics 365 Customer Service to provide answers to users’ requests.

Data source: The Knowledge Base article table

In this example we are going to use the Knowledge article table, although we could also use our own custom table.

The table contains different fields like Article Number, Title, Content or Status, that we are going to use in the output of the GPT prompt.

Use AI Builder to ground data from the Knowledge articles table

Before building the copilot, we want to find a way to search for content in our Knowledge Base articles based on a user’s query. As you may know, it is possible to create a GPT prompt in AI Builder and use it to ground our own data (watch this this excellent video by Rémi Dyon from Microsoft if you want to know more about that).

We created the following GPT prompt in AI Builder:

As you can see in the picture, we are using the Knowledge Article dataverse table (stored in our environment) to provide answers to the user’s query (stored in an input parameter called Description), using only the records where their status is published.

The result should be an adaptive card, so we can use it in our copilot without any transformations. That’s the reason why we explicitly mention some of the properties that it should have and their values (version and schema).

An example result of this prompt is shown below:

An article that matches the problem description has been found in the Knowledge Article table, and the result is formatted to be displayed using an adaptive card!

It is also important to note that the prompt can use GPT 3.5 (default) or GPT 4 (preview), which has some implications from a licensing point of view (in this example, we are using GPT 3.5). You can configure this feature on the settings section:

Now that our GPT prompt is ready, we can save it, and use it from a Power Automate cloud flow.

Create a Power Automate cloud flow to use the GPT prompt

After creating the GPT prompt with AI Builder, we need to create a Power Automate Cloud flow that gets the input data from Copilot, creates the text using a prompt and returns the generated text, as shown in the following picture (we are using the Power Automate classic UI to show values used in each action):

Our GPT prompt we created before is called Knowledge Base Article Search, and the problem description will be used as the input parameter. The value returned to Copilot is a parameter called Text, that comes out from the Create text with GPT using a prompt action.

When saving the Power Automate cloud flow you will receive a warning message like this: Your flow was saved, but with a warning: The ‘Create text with GPT using a prompt’ action doesn’t have a content approval action after it. Add a ‘Start and wait for an approval of text’ action after the ‘Create text with GPT using a prompt’ action to let someone manually review the content. This is because you may use an approval process before using some AI generated text, as described in the Human review for automation with a prompt article.

Design the IT Support copilot with Copilot Studio

Now it’s time to create the IT Support copilot, and configure a topic to manage user requests. In this case, we are going to use the greeting topic that comes by default when we create any copilot with Copilot Studio (we already configured the copilot to use dynamic chaining with generative actions). The step-by-step process of the topic is:

  1. Ask the user to provide a detailed description of the problem.
  2. Show a status message that the search has begun.
  3. Call the Power Automate cloud flow we designed in previous step.
  4. Show an adaptive card with the search result.

(the logic of the topic is shown in 2 columns for readability purposes).

In order to display the adaptive card, we created a message node, adding an adaptive card, and configuring it to show the content of the result from the Power Automate cloud flow (we store it in a variable called varResult). This is how we can configure that:

Now it’s time to save the topic and test our copilot.

IT Support copilot in action

Let’s imagine a user has created a Power BI dashboard that uses an Excel file stored in an on-premise location, and now it has been moved to the cloud. The user need to know how he/she can update to Power BI dashboard to point to the right file location. This is what is shown in the following picture:

As you can see, the generated result provides a possible solution to the user’s problem! Of course we could change the format or the fields shown in the result, but the result is simply amazing.

Conclusions

We created this solution very quickly, and the most difficult part was to define the right prompt. It is highly recommended to read the AI Builder prompt engineering guide to learn the basics about how to work with prompts and in the end, get the best possible results.

From a cost perspective, we need to remember that AI Builder usage is based on credit consumption, and use of create text with GPT costs around 16 credits for 1k tokens, according to the Power Platform licensing guide May 2024.

In conclusion, leveraging the AI capabilities of Copilot Studio and AI Builder will significantly enhance the results in delivering solutions by fostering a more creative, efficient, and faster development process. These tools empower organizations to design intelligent copilots that can interact with users in a natural and intuitive manner, providing personalized and accurate support.

Finally, by embracing these advanced AI capabilities, organizations can expect to see a marked improvement in the quality of their IT solutions and a reduction in the time required to develop and deploy them, ultimately driving better business outcomes and customer satisfaction.

AI BuilderCopilot StudioDataverseIT Support

Leave a Reply

Your email address will not be published. Required fields are marked *