Nóta
Aðgangur að þessari síðu krefst heimildar. Þú getur prófað aðskrá þig inn eða breyta skráasöfnum.
Aðgangur að þessari síðu krefst heimildar. Þú getur prófað að breyta skráasöfnum.
When you add public websites as knowledge sources at the agent level, you use publicly available information to improve the reach of your agent.
Add a public website
To add a public website as a knowledge source, complete the following steps:
Open the agent.
Select Add knowledge from either the Overview or Knowledge pages, or the Properties of a generative answers node.
Select Public websites.
Enter the URL to the public website. To use a variable instead of a static URL, select the variable picker icon next to the URL field and choose a Custom, System, or Environment variable.
Add a name (by default, the website's URL is used).
Add a description. Provide a detailed description, especially if generative AI is enabled, as the description aids generative orchestration.
Select Add to agent to finish adding the knowledge source.
Test your agent to see how well it responds to questions related to the content from your website. You might want to test edge case questions to decide if you need a lower moderation to be more inclusive.
URL considerations
The URL you use in your agent represents the scope of content for generating responses. Some URLs have requirements and restrictions.
Note
- When you specify a URL, the knowledge source uses Grounding with Bing Search to return information from the web.
- The Classic data options in the generative answers node properties allow you to specify dynamically formed URLs by using a Power Fx formula. Learn more in Use a custom data source for generative answers nodes.
- You can also specify Bing Custom Search in the Classic data options of the generative answers node properties. Learn more in Search public data or use a Bing Custom Search for generative answers.
URL type and structure
The URL can have up to two levels of depth, with subpaths indicated by a forward slash
/. However, a trailing forward slash is allowed.Valid Not valid www.contoso.comwww.fabrikam.com/engines/rotarywww.fabrikam.com/engines/rotary/www.fabrikam.com/engines/rotary/dual-shaftIf the URL redirects to another top-level site, the content isn't included in results:
For example, if
www.fabrikam.comredirects towww.contoso.fabrikam.com, your agent doesn't generate responses from content on either of those URLs.URLs that point to a website requiring authentication or ones not indexed by Bing aren't supported.
For example, wikis and SharePoint sites require authentication, so you can't use them:
fabrikam.visualstudio.com/project/_wikifabrikam.sharepoint.com
URL domain structure
Your agent uses any publicly viewable content in the URL you specify, including subdomains under a top-level domain, to generate content.
Examples:
If you use
www.fabrikam.com/engines/rotary, the agent also uses the content onwww.fabrikam.com/engines/rotary/dual-shaftto generate responses.The agent doesn't use content on
www.fabrikam.com/tools, since tools isn't a subdomain of rotary.If you use
www.fabrikam.com(the www exists), the agent doesn't use content on news.fabrikam.com (the www doesn't exist), since news. is a subdomain under the top-level domain fabrikam.com.If you use fabrikam.com, the agent uses content on
www.fabrikam.comand news.fabrikam.com, since they sit under the top-level domain fabrikam.com.
Social networks and forum URLs
Your agent might generate nonsensical, irrelevant, or inappropriate answers if you use a forum or social network site as your URL. Therefore, community content on social networks often increases the risk of more answers being rejected.
For more information, see the FAQ for generative answers. AI is trained to avoid generating malicious and offensive responses.
Search engine URLs
Don't include URLs of search engines like bing.com, as they don't provide useful responses.
Use variables as URLs
Use variables in public website or SharePoint knowledge source URLs to dynamically control the scope of content your agent uses.
Instead of creating multiple knowledge sources for different scenarios, define a single knowledge source and insert a variable into the URL. At runtime, Copilot Studio resolves the variable and uses the resulting URL for grounding.
Variable support
When you add or edit a public website or SharePoint knowledge source URL, you can insert a variable into the URL field.
Use a variable to:
Append a path to a base URL
https://www.contoso.com/{variable}Replace the entire URL
{variable}
At runtime, the variable resolves to a string value. The knowledge source is scoped to the resolved URL.
Note
Using a variable changes which URL is used for grounding. It doesn't change URL structure requirements or depth limitations for public websites.
Create and set a variable
To use a variable in a public website or SharePoint knowledge source:
Create a string variable with Global scope.
Set the variable value using one of the following options:
- Topic inputs
- User profile properties, such as language
- Environment variables
- Agent flows or connectors
Insert the variable into the URL field by selecting {x} (Insert variable).
Test the agent to confirm the variable resolves to the expected URL.
Example: Scope by product
You can scope knowledge to different product areas based on the user's query.
Use a topic input to capture the product name as a variable named
Product.Add a Set variable value node after the Trigger node, and create a new variable named
ProductTable.Use a Power Fx formula to define and map the product names to URL paths.
Table( { Product: "Copilot", Path: "microsoft-365-copilot" }, { Product: "Teams", Path: "microsoft-teams" }, { Product: "Surface", Path: "surface" } )Add another Set variable value node and use it to create a new string type global variable named
GlobalProductURL.In the To value setting, select Formula and use a Power Fx function to perform a lookup into the table based on the value of
Productinput variable,Topic.Product, as follows:LookUp(Topic.ProductTable, Product = Topic.Product, Path)Use the variable in the knowledge source URL:
https://www.microsoft.com/en-us/{GlobalProductURL}
The agent queries only the scoped section of the website at runtime.
Common scenarios
Use variables in public website knowledge sources for:
Product-based routing: Scope queries to specific product documentation.
Region or language filtering: Map
User.Languageto localized URLs (for example,en-us,it-it).Environment-specific URLs: Switch between development, test, and production sites.
Considerations
- Public website knowledge sources use Bing search and rely on indexed content.
- URL depth limits still apply when you use variables.
- Variables change the target URL only. They don't affect how content is indexed or retrieved.
Important
The variable must resolve to a valid public URL that meets the requirements for public website knowledge sources. Invalid or unsupported URLs might not return results.