haive.core.engine.retriever.providers.AzureAISearchRetrieverConfig¶
Azure AI Search Retriever implementation for the Haive framework.
from typing import Any This module provides a configuration class for the Azure AI Search (formerly Azure Cognitive Search) retriever, which retrieves documents from Azure’s cloud search service.
The AzureAISearchRetriever works by: 1. Connecting to an Azure AI Search service 2. Executing search queries against indexed documents 3. Returning ranked search results as documents
This retriever is particularly useful when: - Using Azure cloud infrastructure - Need enterprise-grade search capabilities - Working with large document collections in Azure - Combining with other Azure AI services
The implementation integrates with LangChain’s AzureAISearchRetriever while providing a consistent Haive configuration interface with secure credential management.
Classes¶
Configuration for Azure AI Search retriever in the Haive framework. |
Module Contents¶
- class haive.core.engine.retriever.providers.AzureAISearchRetrieverConfig.AzureAISearchRetrieverConfig[source]¶
Bases:
haive.core.common.mixins.secure_config.SecureConfigMixin
,haive.core.engine.retriever.retriever.BaseRetrieverConfig
Configuration for Azure AI Search retriever in the Haive framework.
This retriever searches documents in Azure AI Search service and returns ranked results. It requires Azure credentials and search service configuration.
- retriever_type¶
The type of retriever (always AZURE_AI_SEARCH).
- Type:
- api_key¶
Azure Search API key (auto-resolved from AZURE_SEARCH_API_KEY).
- Type:
Optional[SecretStr]
Examples
>>> from haive.core.engine.retriever import AzureAISearchRetrieverConfig >>> >>> # Create the azure ai search retriever config >>> config = AzureAISearchRetrieverConfig( ... name="azure_search_retriever", ... azure_search_endpoint="https://my-search-service.search.windows.net", ... azure_search_index="documents-index", ... top_k=5, ... search_type="semantic" ... ) >>> >>> # Instantiate and use the retriever >>> retriever = config.instantiate() >>> docs = retriever.get_relevant_documents("cloud computing benefits")
- instantiate()[source]¶
Create an Azure AI Search retriever from this configuration.
- Returns:
Instantiated retriever ready for document retrieval.
- Return type:
AzureAISearchRetriever
- Raises:
ImportError – If required packages are not available.
ValueError – If API key or configuration is invalid.