Skip to content

[BUG] Unable to retrieve / deserialize the annotations (URL citations) using Agent #48760

Open
@ZubaeyrMSFT

Description

@ZubaeyrMSFT

Library name and version

Azure.AI.Projects 1.0.0-beta.3

Describe the bug

I am using Agents with Azure AI Search as knowledge. The response message from the agent contains the citation strings (ex: [51:0+source]), but the corresponding annotations doesn't include the actual reference links. It just contains the Text field with same value.

The type of the Annotation is: Azure.AI.Projects.UnknownMessageTextAnnotation and I am not able to cast it to MessageTextFileCitationAnnotation either.

Image

  foreach (MessageContent contentItem in threadMessage.ContentItems)
  {
      if (contentItem is MessageTextContent textItem)
      {
          var textContent = (MessageTextContent)contentItem;
          messageContentBuilder.Append(textContent.Text);
          textContent.Annotations?.ForEach(annotation => 
          {
           _logger.LogInformation(JsonConvert.SerializeObject(annotation, settings: new JsonSerializerSettings { }));
          });
      }
  }

Expected behavior

Expecting the Annotations to contain the referenced URLs, and it should be able to cast to correct class.

Actual behavior

not able to get url citations from Annotations

Reproduction Steps

Please see bug description

Environment

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    AI ProjectsClientThis issue points to a problem in the data-plane of the library.Service AttentionWorkflow: This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions