Configure knowledge source settings

Note

This article describes features used in agents or agent flows powered by the standard harness.

Configure how your agent uses knowledge sources from the Generative AI settings page and the agent's Overview page. This article explains the settings in each location and how to troubleshoot grounded answers and citations.

For supported knowledge sources, authentication requirements, and orchestration behavior, see Knowledge sources summary.

Generative AI knowledge source settings

Your agent's Generative AI settings page contains settings that affect how your agent uses knowledge sources.

Allow ungrounded responses

The Allow ungrounded responses setting in the Knowledge section of your agent's Generative AI settings manages whether your agent can generate responses using only the model's general knowledge. This setting requires that the agent has generative orchestration turned on.

Screenshot of the Allow ungrounded responses setting in the Knowledge section.

When you turn on the Allow ungrounded responses setting, your agent can respond by using the model's general knowledge, even when it doesn't use any knowledge sources or tools.

When you turn off this setting, the agent blocks any response generated in a turn where it didn't use a knowledge source or tool. This condition means the response is blocked if the agent answers a question from conversation history or general knowledge without calling a knowledge source or tool. In that case, the fallback topic triggers.

For example, consider the following conversation:

User: "What is the return policy for online orders?"

Agent: "Our return policy allows returns within 30 days of purchase (for all items, including sale items)." (Retrieved from a knowledge source)

User: "Does that apply to sale items too?"

Agent: (Blocked)

In this scenario, the agent might use context from previous turns to answer the follow-up question without calling a knowledge source or tool. Because it didn't call either in that turn, the response is blocked.

Note

Turning the Allow ungrounded responses setting off doesn't guarantee that the agent never uses general knowledge. The agent's underlying model might still incorporate general knowledge when it combines this knowledge with information it retrieves from knowledge sources or tools. This setting only blocks responses where the agent didn't use any knowledge source or tool at all in that turn.

If your agent withholds an answer or citations don't appear as expected, see Troubleshoot grounded answers.

Use information from the web

The Use information from the Web setting on your agent's Generative AI settings page controls the same feature as Web Search in the Knowledge section of the agent's Overview page. This setting requires generative orchestration.

Moderation

Use content moderation settings to control how strictly your agent filters potentially harmful content.

You can configure content moderation at the following levels:

  • Agent: Use the setting on the Generative AI settings page.
  • Topic: Use the setting in the generative answers node.
  • Prompt: Use the setting in the prompt tool.

The topic-level setting takes precedence over the agent-level setting. If you don't set content moderation at the topic level, the agent uses the Generative AI settings configuration.

To override agent or topic content moderation for prompt tools, configure the Completion setting of the prompt tool to send a specific response.

To adjust the content moderation settings at the agent level, change your agent's Generative AI option to Generative.

  1. Select the desired moderation level for your agent.

    The moderation levels range from Low to High. The lowest level generates the most answers, but they might contain harmful content. The highest level of content moderation generates fewer answers, and applies a stricter filter to restrict harmful content. The default moderation level is High.

  2. Select Save.

To adjust the content moderation settings at the topic level, change the setting in your generative answers node.

To adjust the content moderation settings for the prompt tool, change the setting in the prompt builder.

The Tenant graph grounding with semantic search setting on your agent's Generative AI settings page determines whether your agent uses semantic search to improve search results. This setting requires that the agent has generative orchestration turned on.

By default, all users with Microsoft 365 Copilot licenses use tenant graph grounding with semantic search. If some end users don't have Microsoft 365 Copilot licenses, turn on this setting to improve search results for those users. This feature comes at an extra cost. Learn more in Copilot Credits billing rates.

This feature requires the agent to share a tenant with a Microsoft 365 Copilot license. It also requires that a semantic index is configured for use. To use a semantic index, the Microsoft 365 Copilot license must be assigned to at least one user in the enterprise.

Important

The Tenant graph grounding with semantic search feature requires that the agent's user authentication is set to Authenticate with Microsoft. If authentication is set to any other method than Authenticate with Microsoft, you can't change the setting.

When you turn on the feature and the maker has a Microsoft 365 license in the same tenant, the agent supports SharePoint and connectors containing files up to 200 MB.

Note

  • For agents grounded in SharePoint knowledge sources, Tenant graph grounding with semantic search can improve knowledge retrieval and response quality. Some users and queries might experience a small increase in latency.
  • If you don't have a Microsoft 365 Copilot license in the same tenant as your agent, or you experience lower response quality, turn off the feature.
  • The agent maker doesn't need to have a Microsoft 365 Copilot license to create an agent with a semantic index.
  • SharePoint and Microsoft 365 Copilot connectors support files up to 512 MB if they have PDF, PPTX, or DOCX extensions. Learn more in Supported content types.
  • The Tenant graph grounding with semantic search feature is separate from Dataverse search. Learn more in Frequently asked questions about Dataverse search.

Agent overview knowledge source settings

The following settings on the agent's Overview page affect how your agent uses knowledge sources.

The Web Search setting is in the Knowledge section of the agent's Overview page. You can also control it with the Use information from the web setting on the Generative AI settings page.

When you turn on this setting, your agent can search all public websites indexed by Bing when a user's question might benefit from information on the web. This search runs in parallel with searches of public websites you added as knowledge sources. Results from both searches are interleaved.

Web Search uses Grounding with Bing Search.

Screenshot of the Knowledge section on an agent's Overview page, with Web Search highlighted.

Official sources

You might not control how a knowledge source changes over time or fully trust its information. Let users know that they should review answers and verify them when appropriate.

If a knowledge source goes through a strict verification process and is highly trusted, you can mark it as an official source.

To mark a knowledge source as official:

  1. On the Knowledge page, select the three dots (⋮) for the knowledge source.
  2. Select Official source.
  3. Select Yes.

Note

  • Official sources aren't compatible with generative orchestration. To use this feature, turn off generative orchestration.
  • When an agent uses an official knowledge source, the response starts with a distinctive indication.

Troubleshoot grounded answers

Use the following guidance when your agent withholds grounded answers or citations appear differently across channels.

Why the agent sometimes doesn't return a grounded answer

When you turn off Allow ungrounded responses, the agent returns an answer from a knowledge source only when the answer includes an in-text citation to that source. This requirement helps ensure that answers are grounded in your knowledge sources rather than the model's general knowledge.

Occasionally, the model generates a correct answer from a knowledge source but doesn't include a citation for it. When that happens, the agent withholds the answer and responds as though it didn't find any information. Because models don't always include citations, this behavior can be intermittent. For example, asking the same question again might return the answer.

To make citations and grounded answers more consistent:

  • Add citation instructions. In the agent's instructions, ask the model to always cite its sources. For example, "Always include an in-text citation to the source document for every statement."
  • Avoid instructions that interfere with citations. Instructions that tell the model to omit references or sources, or that force a rigid output format (for example, "respond only in JSON"), can suppress the citation markers the agent needs. Keep instructions concise, and don't instruct the model to remove or reformat sources in a way that breaks them.
  • Add citation details to custom data. If you use a custom data source in a generative answers node, include the ContentLocation (URL) and Title fields so the model can cite the source. Learn more in Use a custom data source for generative answers nodes.

Note

If you want the agent to answer even when it can't cite a source, turn on Allow ungrounded responses. The agent can then respond by using the model's general knowledge, so its answers aren't always grounded in your knowledge sources.

How citations appear on different channels

How citations are shown can vary by channel:

  • Depending on the channel, citations might appear as plain, unformatted text instead of linked references.
  • Microsoft Teams has stricter limits than other channels. A response shows at most 20 citations; any beyond that are dropped. Each citation's title is limited to about 80 characters and its snippet to about 480 characters, so longer titles or snippets are shortened.
  • If you customize the generative answer response, citations aren't added automatically. For example, if you clear a Message node and render the answer yourself through a variable or an Adaptive Card, you need to include citation rendering yourself. In Teams, citation links are returned automatically only for answers that aren't customized. Learn more in Citations don't render for customized answers.