haive.core.engine.retriever.providers.GoogleVertexAISearchRetrieverConfig¶
Google Vertex AI Search Retriever implementation for the Haive framework.
from typing import Any This module provides a configuration class for the Google Vertex AI Search retriever, which uses Google Cloud’s Vertex AI Search (formerly Enterprise Search) service. Vertex AI Search provides ML-powered search capabilities with natural language understanding and enterprise-grade security and compliance.
The GoogleVertexAISearchRetriever works by: 1. Connecting to a Vertex AI Search data store 2. Executing search queries with ML understanding 3. Returning ranked results with relevance scoring 4. Supporting various data source types and formats
This retriever is particularly useful when: - Building enterprise search on Google Cloud - Need ML-powered query understanding - Working with Google Cloud data sources - Want enterprise security and compliance - Building knowledge management systems
The implementation integrates with LangChain’s GoogleVertexAISearchRetriever while providing a consistent Haive configuration interface with secure GCP credential management.
Classes¶
Configuration for Google Vertex AI Search retriever in the Haive framework. |
Module Contents¶
- class haive.core.engine.retriever.providers.GoogleVertexAISearchRetrieverConfig.GoogleVertexAISearchRetrieverConfig[source]¶
Bases:
haive.core.common.mixins.secure_config.SecureConfigMixin
,haive.core.engine.retriever.retriever.BaseRetrieverConfig
Configuration for Google Vertex AI Search retriever in the Haive framework.
This retriever uses Google Cloud Vertex AI Search to provide ML-powered enterprise search with natural language understanding.
- retriever_type¶
The type of retriever (always GOOGLE_VERTEX_AI_SEARCH).
- Type:
- api_key¶
Service account key (auto-resolved from GOOGLE_APPLICATION_CREDENTIALS).
- Type:
Optional[SecretStr]
Examples
>>> from haive.core.engine.retriever import GoogleVertexAISearchRetrieverConfig >>> >>> # Create the Vertex AI Search retriever config >>> config = GoogleVertexAISearchRetrieverConfig( ... name="vertex_search_retriever", ... project_id="my-gcp-project", ... data_store_id="my-data-store", ... location_id="global", ... serving_config_id="default_config", ... max_documents=10 ... ) >>> >>> # Instantiate and use the retriever >>> retriever = config.instantiate() >>> docs = retriever.get_relevant_documents("enterprise search capabilities") >>> >>> # Example with regional deployment >>> regional_config = GoogleVertexAISearchRetrieverConfig( ... name="regional_vertex_search", ... project_id="my-gcp-project", ... data_store_id="my-data-store", ... location_id="us-central1", ... serving_config_id="custom_config" ... )
- get_output_fields()[source]¶
Return output field definitions for Google Vertex AI Search retriever.
- instantiate()[source]¶
Create a Google Vertex AI Search retriever from this configuration.
- Returns:
Instantiated retriever ready for enterprise search.
- Return type:
GoogleVertexAISearchRetriever
- Raises:
ImportError – If required packages are not available.
ValueError – If GCP credentials or configuration is invalid.