Skip to content

Conversation

@jairmyree
Copy link
Member

Search May 2025 Preview

Preview Information: https://gist.github.com/alzimmermsft/d1dfe89635384c0498ec222afb6295f3
Closes #45141

This pull request introduces a new set of clients and a builder for interacting with Azure AI Search Knowledge Agents, enabling both synchronous and asynchronous operations. It includes the implementation of SearchKnowledgeAgentClient, SearchKnowledgeAgentAsyncClient, and SearchKnowledgeAgentClientBuilder, providing a comprehensive API for knowledge retrieval from various backing stores.

New Client Implementations:

  • Asynchronous Client:

    • Added SearchKnowledgeAgentAsyncClient, which provides asynchronous APIs for retrieving knowledge from Azure AI Search Knowledge Agents. It supports operations like retrieve and retrieveWithResponse for fetching data from multiple sources.
  • Synchronous Client:

    • Added SearchKnowledgeAgentClient, which offers synchronous APIs for similar operations as the asynchronous client. It includes methods for retrieve and retrieveWithResponse as well.

Client Builder:

  • Fluent Builder API:
    • Introduced SearchKnowledgeAgentClientBuilder to configure and instantiate both synchronous and asynchronous clients. The builder supports setting up credentials (API key or token-based), endpoint, agent name, API version, and other client options like retry policies and HTTP pipeline customization.

Copilot AI review requested due to automatic review settings May 12, 2025 18:54
@jairmyree jairmyree requested review from a team and alzimmermsft as code owners May 12, 2025 18:54
@jairmyree jairmyree marked this pull request as draft May 12, 2025 18:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request introduces a new set of clients and supporting models for interacting with Azure AI Search Knowledge Agents, enabling both synchronous and asynchronous operations. Key changes include the implementation of synchronous (SearchKnowledgeAgentClient) and asynchronous (SearchKnowledgeAgentAsyncClient) clients, the introduction of a fluent builder (SearchKnowledgeAgentClientBuilder), and several supporting model and implementation classes for query planning, message content, error responses, and document references.

Reviewed Changes

Copilot reviewed 83 out of 83 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
KnowledgeAgentModelQueryPlanningActivityRecord.java New model for query planning activity records with JSON (de)serialization.
KnowledgeAgentMessageTextContent.java Implementation of text content for knowledge agent messages.
KnowledgeAgentMessageImageContentImage.java Model for encapsulating image content in messages.
KnowledgeAgentMessageImageContent.java Model linking image content with message content type.
KnowledgeAgentMessageContentType.java Definition of expandable message content types (text/image).
KnowledgeAgentMessageContent.java Base class for message content with JSON (de)serialization.
KnowledgeAgentMessage.java Model for the overall message composed of one or more content parts.
KnowledgeAgentIndexParams.java Model for specifying index parameters with JSON (de)serialization support.
KnowledgeAgentAzureSearchDocReference.java Model for Azure Search document references including additional source data.
KnowledgeAgentActivityRecord.java Base class for activity records with common JSON (de)serialization logic.
ErrorResponseException.java Custom exception encapsulating error response details.
ErrorResponse.java Model for error responses which embeds error details.
ErrorDetail.java Model capturing detailed error information (code, message, target, etc.).
ErrorAdditionalInfo.java Model for any additional error information.
KnowledgeRetrievalsImpl.java Implementation class for executing retrieval operations via REST proxy calls.
KnowledgeAgentRetrievalClientImpl.java Low-level client implementation used by the public client classes.
SearchKnowledgeAgentClientBuilder.java Fluent builder for constructing both synchronous and asynchronous clients.
SearchKnowledgeAgentClient.java Synchronous client exposing retrieval APIs for Azure AI Search agents.
SearchKnowledgeAgentAsyncClient.java Asynchronous client exposing retrieval APIs for Azure AI Search agents.

Copy link
Member

@alzimmermsft alzimmermsft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Were

jairmyree and others added 6 commits May 13, 2025 09:45
…ch/documents/agents/SearchKnowledgeAgentAsyncClient.java

Co-authored-by: Alan Zimmer <[email protected]>
… parameter and set it to null by default; add permissionFilter to SearchableField annotation.
- Added methods to create, update, retrieve, and delete Knowledge Agents in SearchIndexAsyncClient and SearchIndexClient.
- Introduced support for query source authorization in SearchClient methods for document retrieval and search operations.
- Updated SearchResult and SemanticSearchResult classes to include reranker boosted score for enhanced search relevance.
- Improved documentation with code samples for new methods and parameters.
- Refactored SearchResultHelper and SearchResultConverter to accommodate new semantic search features.
- Fixed formatting and code style issues across various classes for better readability.
- Enhanced error handling in Knowledge Agent operations to ensure robust API interactions.
@alzimmermsft
Copy link
Member

Need one last update to add 2025-05-01-Preview to SearchServiceVersion and to make it the default.

…ng and improve documentation; add suppressions for missing Javadoc methods.
@github-actions
Copy link
Contributor

github-actions bot commented May 16, 2025

API Change Check

APIView identified API level changes in this PR and created the following API reviews

com.azure:azure-search-documents

Copy link
Member

@alzimmermsft alzimmermsft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API looks good aside SearchServiceVersion needing to be updated.

@jairmyree jairmyree marked this pull request as ready for review May 17, 2025 04:16
@jairmyree jairmyree requested a review from JonathanGiles as a code owner May 17, 2025 06:22
@jairmyree jairmyree requested a review from alzimmermsft May 17, 2025 08:13
@jairmyree
Copy link
Member Author

/check-enforcer override

@alzimmermsft
Copy link
Member

/check-enforcer override

@alzimmermsft alzimmermsft merged commit f3bb129 into main May 19, 2025
66 of 68 checks passed
@alzimmermsft alzimmermsft deleted the jairmyree/search/2025-05-01-preview branch May 19, 2025 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Azure AI Search 2025-05-01-Preview

3 participants