Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 61

Dynamic Responses with Generative Actions

Recommended resources

Hello! Welcome back to your advanced Power Platform training.

In our last lesson, we established a critical security pattern by implementing user authentication with Microsoft Entra ID. We saw how to create a secure handshake between the user, the copilot, and your Azure tenant, enabling personalized and secure interactions.

Today, we build directly on that foundation to unlock one of Copilot Studio's most powerful features. We'll move beyond manually defining every conversational turn and learn to use generative actions to create dynamic responses by connecting to data sources like websites or SharePoint. This capability, often called "Generative Answers," allows your copilot to intelligently search and summarize information from vast knowledge bases, providing relevant answers to questions you never explicitly programmed it to handle.

This is a fundamental shift in chatbot development and a core competency tested in the PL-400 exam.

1. The Concept: Retrieval-Augmented Generation (RAG)

Before we start configuring, it's important to understand the technology at play. Generative Answers in Copilot Studio are powered by a technique called Retrieval-Augmented Generation (RAG).

Unlike training a new AI model on your company's data (which is complex and expensive), RAG works by:

  1. Retrieving relevant information from your specified data sources (e.g., a SharePoint site, a public website).
  2. Augmenting the Large Language Model's (LLM) prompt with this retrieved information.
  3. Generating a response that is grounded in your specific data, not just the LLM's general knowledge.

This approach ensures that the answers are relevant, up-to-date, and context-specific to your organization. The architecture diagram below shows how a user's query flows through the system to produce a grounded, generated answer.

Microsoft Copilot Studio Generative Answers Architecture
This diagram illustrates the end-to-end flow of a user's message within Copilot Studio. The query is processed through stages of optimization, retrieval from configured data sources (like Bing or Microsoft Graph for SharePoint), and summarization by Azure OpenAI before being delivered back to the user.

To get a clear, practical introduction to what Generative Answers are and why they're so useful, please watch the beginning of the following video.

Mastering Generative Answers in Copilot Studio

This video from Lisa Crosbie provides an excellent conceptual overview of Generative Answers, explaining the 'iceberg' analogy for user questions and the RAG model.

Please watch from the beginning until the 3:19 mark. Focus on understanding the 'why' behind generative answers and the concept of 'grounding' the AI in your data.


2. Connecting to Public Websites

The most straightforward way to use Generative Answers is to point your copilot to one or more public websites. This is ideal for customer-facing copilots that need to answer questions based on a company's public domain content.

When you configure this, you provide a top-level URL, and the copilot will index the content on that site to answer user questions.

Let's continue with the same video to see a demonstration of this and to learn about some important considerations, such as URL structure and content moderation.

Mastering Generative Answers in Copilot Studio

This segment demonstrates how to connect to a public website and discusses common issues and settings.

Please watch from 5:26 to 12:19. Pay close attention to: How a simple URL can be used to answer detailed questions. The explanation for the common error 'I'm sorry, I can't help with that' and how to resolve it (especially the point about website subdomains). The concept of 'Content moderation' levels (High, Medium, Low) and their impact on response accuracy.


3. Connecting to SharePoint for Internal Knowledge

While public websites are useful, the most powerful enterprise scenario is connecting your copilot to internal knowledge stored in SharePoint Online. This allows you to build assistants that can answer employee questions about HR policies, project documentation, technical standards, and more.

Connecting to SharePoint provides a superior user experience compared to simply uploading documents because it provides direct links (citations) to the source documents, and it respects user permissions.

Authentication is the Key
To securely access SharePoint content, the copilot must be able to act on behalf of the signed-in user. This is where our previous lesson on authentication becomes critical. The process involves:

  1. Creating an App Registration in Microsoft Entra ID.
  2. Granting it specific API permissions to read SharePoint content.
  3. Configuring the Copilot Studio security settings to use this registration.

The following video provides a complete, step-by-step walkthrough of this entire process. Given your background, you'll find this a very practical guide to follow.

How to configure Generative Answers in Copilot Studio to use SharePoint

This tutorial by Dewain Robinson is a hands-on guide to configuring a copilot to use SharePoint for Generative Answers, including the necessary Azure AD setup.

Please watch this video in its entirety. It will guide you through the exact steps needed for implementation. Focus on: Copilot Setup (0:02 - 1:47): Enabling 'Boost conversational coverage' and adding the SharePoint site URL. Azure AD App Registration (1:47 - 7:39): This is the most critical part. Pay close attention to the API permissions being added for Microsoft Graph: OpenID and Profile (for user sign-in) Files.Read.All Sites.Read.All These last two permissions are essential for allowing the copilot to read content from SharePoint on the user's behalf. Copilot Security Configuration (7:39 - 8:52): Entering the Client ID, Secret, and adding the files.read.all and sites.read.all scopes. Testing (8:52 - 9:43): Observing the login and consent flow before asking a question.

To reinforce this, the official Microsoft documentation provides a clear reference for the requirements.

Use SharePoint content for a generative answers node

This Microsoft Learn article, 'Use SharePoint content for generative answers', confirms the authentication requirements and scopes you just saw in the video.

Please read the section 'Advanced authentication scenarios'. It explicitly lists the required Sites.Read.All and Files.Read.All scopes, confirming what you saw in the video tutorial. This is a key detail for the exam.

Test your understanding!

You have configured a copilot with Generative Answers pointed to your company's internal SharePoint site. A user successfully signs in but reports that the copilot responds with "I can't help with that" when asked about a specific project document. You have verified that the user has permission to view the document in SharePoint.

What is the most likely misconfiguration in your Azure AD App Registration that would cause this issue, even with a successful user sign-in?

Show answer

The most likely misconfiguration is missing API permissions for Microsoft Graph. While the openid and profile permissions allow the user to sign in successfully, the copilot application itself needs delegated permissions to read content from SharePoint on the user's behalf. If the Sites.Read.All and Files.Read.All permissions were not added and granted admin consent in the App Registration, the copilot would be unable to retrieve any content, resulting in the "I can't help with that" response.


4. Improving Response Quality with Custom Instructions

Getting the data connection right is only half the battle. To create a truly great user experience, you need to guide the AI on how it should respond. This is done using Custom Instructions.

Custom instructions are a meta-prompt you provide to your copilot that defines its persona, tone, and rules for responding. This can dramatically improve the quality and appropriateness of the generated answers.

Mastering Generative Answers in Copilot Studio

Let's return to Lisa Crosbie's video, where she gives an excellent demonstration of how custom instructions can transform the copilot's responses.

Please watch from 17:03 to 20:53. Note the stark difference in responses when the persona is changed from a general 'HR assistant' to a 'senior HR advisor'. Also, notice how you can instruct it to be more brief or use a specific format.

Using clear, descriptive custom instructions is one of the most effective ways to elevate your copilot from a simple Q&A bot to a genuinely helpful digital assistant.


Conclusion

In this lesson, you've learned how to leverage Generative Answers to build more intelligent and scalable copilots. We've moved from the rigidity of pre-defined topics to the flexibility of AI-powered content retrieval and summarization.

Key Takeaways:

  • Generative Answers use a Retrieval-Augmented Generation (RAG) model to ground responses in your specific data sources like public websites or SharePoint.
  • Connecting to SharePoint is the superior pattern for internal enterprise copilots and requires proper authentication setup.
  • The Azure AD App Registration for a SharePoint-connected copilot must have the delegated Sites.Read.All and Files.Read.All permissions for Microsoft Graph.
  • Custom Instructions are a powerful tool to define your copilot's persona, tone, and response style, significantly improving the quality of generated answers.

What's Next?

So far, our copilot can answer questions based on structured topics and now also from unstructured knowledge bases. In the next lesson, we will take this a step further. We will learn how to extend Copilot Studio capabilities with plugin actions built from custom connectors or Power Automate flows. This will allow your copilot not just to provide information, but to take action and perform complex operations by invoking other systems.