How to Use the Generative Response Node in Copilot Studio: Detailed Tutorial for AI-Generated Answers

This article explains one of Copilot Studio’s standard features for utilizing generative AI: the “Generative response” node.

スポンサーリンク

Using Generative AI from Copilot Studio

There are two straightforward ways to use generative AI from Copilot Studio:

  • Generative response
  • Prompt actions (AI Builder)

While it’s also possible to connect to AI services like Azure OpenAI through custom connectors or Power Automate, starting with these two methods is probably the best approach.

In this article, I’ll explore the “Generative response” node in detail.

Generative Response

The “Generative response” node generates answers using knowledge (data sources) with RAG. *Generation is also possible without knowledge
Screenshot showing the Generative response node interface in Copilot Studio

However, I couldn’t find the name of the AI model being used, so if you want to specify a model like “I want to use GPT4o!”, you’ll probably need to use AI Builder prompts instead.

Basic Usage

First, prepare sites or files that will serve as knowledge. For this example, I created a SharePoint Online site containing cat documents.
Screenshot showing a SharePoint site with cat documentation
Start by going to Data source editing and clicking “Add knowledge”,
Screenshot showing the Add knowledge option in Data source editing
Select SharePoint,
Screenshot showing SharePoint selection for knowledge source
Enter the URL of the site you created earlier (https:// not needed) and add the knowledge source.
Screenshot showing how to enter the SharePoint site URL
Note that knowledge is added to the agent (not per topic), so the added SPO site is also displayed in the knowledge section of the [Overview] tab.
Screenshot showing the knowledge displayed in the Overview tab
Now when you ask questions about information in your knowledge base, it will generate answers based on that information.
*Note: There may be a time lag between adding SPO sites and seeing them reflected
Screenshot showing a generated answer based on the knowledge source

Storing the Response in a Variable

By setting a variable in [Advanced] → [Save bot response with a name] in the properties, you can store the generative AI’s response in a variable.
Screenshot showing how to save bot response with a variable name in Advanced properties
There are two ways to save responses. If you select “Text only”,
Screenshot showing the Text only option selected for saving responses
Only the generative AI’s response (text) is stored,
Screenshot showing the stored text-only response in a variable
If you select “Completion”, the variable becomes a record type,
Screenshot showing the Completion option selected for saving responses
And you can access not only Content (text only) but also MarkdownContent (text in markdown format) and other properties.
Screenshot showing the record type variable with Content and MarkdownContent properties

Generating Responses by Referencing Only Knowledge (Not Using AI’s Built-in Knowledge)

When using the “Generative response” node with default settings, “Allow use of AI’s built-in knowledge” is turned ON, so it can answer questions even if the information isn’t in your knowledge base.
Screenshot showing the Allow use of AI's built-in knowledge option turned on
While convenient, this can lead to hallucinations or unintended behavior, so if you “want to generate answers only from your knowledge base,” turn this off.
Screenshot showing the Allow use of AI's built-in knowledge option turned off
If information isn’t found in the knowledge base, the variable will be “empty,” allowing you to specify what happens when no answer is found using conditional statements later in the flow.
Screenshot showing conditional handling when no answer is found in the knowledge base

Generating Responses Without Using Knowledge

While it’s probably not a common scenario, if you “want to generate responses without using knowledge (using only the AI’s built-in knowledge),” you can turn ON “Search only selected sources” and leave knowledge sources unselected, allowing the AI to create answers on its own.
Screenshot showing the Search only selected sources option turned on with no knowledge sources selected

So the “Generative response” node is a feature that makes it easy to generate AI-powered answers, so I encourage you to try it out.

In the next article, I’ll provide a detailed explanation of AI Builder’s “Create prompt” feature.

Bonus 1: Referencing Classic Data

When you open the [Classic data] dropdown, you can also reference data sources from Copilot Studio’s early days, but I think you’d only use this when connecting directly to Bing Search or Azure OpenAI.
Screenshot showing the Classic data dropdown with options like Bing Search and Azure OpenAI

However, I feel it’s more flexible to use either of these through Power Automate actions, so I don’t think I’d use this much anyway.

Bonus 2: Supported File Formats for Knowledge

Currently, the following four file types can be used for knowledge:

  • SharePoint pages (modern pages)
  • Word documents (docx)
  • PowerPoint documents (pptx)
  • PDF documents (pdf)

Related Articles

コメント

Copied title and URL