Share via

How to configure Azure AI Agents to return actual sources in citations instead of placeholder values like "doc_0"?

Darya Gorbachyonok 0 Reputation points
2025-11-12T13:10:20.7966667+00:00

Hi!

I have an Azure AI Agent that uses an Azure AI Search index as its knowledge source. When the agent generates a response, the annotations field in the API response contains citations that are meant to reference the source documents.

Currently, these citations are not usable. The url and title fields contain generic placeholders like "doc_0" instead of actionable identifiers.

"annotations":[
               {
                  "type":"url_citation",
                  "text":"【3:0†source】",
                  "start_index":1047,
                  "end_index":1059,
                  "url_citation":{
                     "url":"doc_0",
                     "title":"doc_0"
                  }
               },
               {
                  "type":"url_citation",
                  "text":"【3:1†source】",
                  "start_index":1059,
                  "end_index":1071,
                  "url_citation":{
                     "url":"doc_1",
                     "title":"doc_1"
                  }
               }
]

Question: How can I configure the system to return actionable source identifiers in these citations? Ideally, I would like one of the following:

  1. The actual URL of the source document (which is the data source for the Azure AI index)
  2. The unique document ID from the Azure AI Search index, which I can then use to retrieve the full document and its metadata (including any actual URLs) via a separate query.

What is the required configuration in Azure AI Search or the Agent to ensure the source document's real identifier (URL or ID) is populated in the citation fields? Thnak you!

Foundry Tools
Foundry Tools

Formerly known as Azure AI Services or Azure Cognitive Services is a unified collection of prebuilt AI capabilities within the Microsoft Foundry platform

0 comments No comments

1 answer

Sort by: Most helpful
  1. AI answer

    2025-11-12T13:10:40.0766667+00:00

    To configure your Azure AI Agent to return actionable source identifiers in citations instead of placeholders like "doc_0", you need to ensure that the metadata_storage_path field is included in your Azure AI Search index. This field should contain the actual URL of the document. When this field is present, Copilot Studio interprets it as the citation. If it is not included, the system will default to using whatever field contains a generic placeholder.

    Additionally, ensure that your knowledge source is properly set up to include the necessary fields that allow for retrieval of the actual document ID or URL. You can define a knowledge source that targets your Azure AI Search index and specify which fields are accessible for retrieval and citations.

    By configuring your index and knowledge source correctly, you can ensure that the citations returned by your Azure AI Agent contain the actual URLs or unique document IDs that you can use for further queries.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.