Replies: 2 comments 1 reply
-
Thanks for the comprehensive write up Can you check the following: Field Mapping in Foundry Agent Configuration
Index Field Definition
Skillset or Indexer Output
Agent Response Template
Playground vs. Production Behavior
Debugging Tips Here is a quick diagnostic blueprint to resolve the Direct Index Query (via REST or Search Explorer) Use the Azure Search REST API or Search Explorer to issue a manual query: GET https://<search_service>.search.windows.net/indexes/<index_name>/docs?api-version=2023-07-01-Preview&search="password management standard" Include these headers:
Inspect the returned JSON
Field Mapping in Foundry Agent Review your Foundry agent’s blueprint/config (YAML or UI config, depending on how you’re deploying): output_fields:
- title
- summary
- meta_spo_item_weburi # ← Ensure this is explicitly listed If your agent uses response templating, confirm that the link field is referenced:
If using response citations or markdown generation, make sure the URL isn’t being dropped due to null handling or empty string filtering. if you using Copilot Studio Compare Copilot vs. Foundry Retrieval Logic Copilot likely uses something akin to: document.url = metadata["meta_spo_item_weburi"] Make sure Foundry isn’t relying solely on internal Optional Debug Extension You could tweak your Foundry agent temporarily to log the retrieved document object pre-render: print(json.dumps(doc, indent=2)) Just to confirm the field is present before the templating starts. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Data source, Indexer, and Index was configured for Azure AI Search to index SharePoint. Fields in Index are a meta data and custom fields (mapped).
Agent in Foundry retrieves the information and response correctly but the URL to the document is empty. 'Knowledge' is set to use Azure AI Search.
{
name: "azure_ai_search"
context: {
trace_id: "thread_df3YPi2cPj1cNVwXxZUdnBQa"
span_id: "call_zbL6HxV6SVMfnfHdo9fvJ3bT"
thread_id: "thread_df3YPi2cPj1cNVwXxZUdnBQa"
}
kind: "Tool"
parent_id: "step_AqhiJZzJ8drHDFh3h9jVF6fb"
start_time: "2025-07-16T13:38:31.000Z"
end_time: "2025-07-16T13:38:32.000Z"
status: {
status_code: "Ok"
description: "completed"
}
attributes: {
span_type: "Tool"
id: "call_zbL6HxV6SVMfnfHdo9fvJ3bT"
type: "azure_ai_search"
azure_ai_search: {
input: ""password management standard""
output: "{'summary': 'Retrieved 5 documents.', 'metadata': {'urls': ['doc_0', 'doc_1', 'doc_2', 'doc_3', 'doc_4'], 'titles': ['doc_0', 'doc_1', 'doc_2', 'doc_3', 'doc_4'], 'get_urls': ['https://spo-searchservice.search.windows.net//indexes/spo-index/docs/Y2dpZmVkY29ycC5zaGFyZXBvaW50LmNvbSxmYmYzMDVkOC1lZW...
view all
"
}
output: "{'summary': 'Retrieved 5 documents.', 'metadata': {'urls': ['doc_0', 'doc_1', 'doc_2', 'doc_3', 'doc_4'], 'titles': ['doc_0', 'doc_1', 'doc_2', 'doc_3', 'doc_4'], 'get_urls': ['https://spo-searchservice.search.windows.net//indexes/spo-index/docs/Y2dpZmVkY29ycC5zaGFyZXBvaW50LmNvbSxmYmYzMDVkOC1lZW...
view all
"
}
}
Copilot is setup to retrieve the same data from the same index. Agent responded correctly with a working link to document.
Im thinking that the agent is not able to pull metadata and only custom fields/columns from SharePoint.
Any idea on why the agent isn't able to retrieve the links to the document? in the index, the field set to retrieve the url is 'meta_spo_item_weburi'.
Beta Was this translation helpful? Give feedback.
All reactions