Skip to main contentü¶úÔ∏èüîó LangChainDocsUse casesIntegrationsAPICommunityChat our docsLangSmithJS/TS DocsSearchCTRLKProvidersAnthropicAWSGoogleMicrosoftOpenAIMoreComponentsLLMsChat modelsDocument loadersDocument transformersText embedding modelsVector storesRetrieversAmazon KendraArcee RetrieverArxivAzure Cognitive SearchBM25ChaindeskChatGPT PluginCohere RerankerDocArrayElasticSearch BM25Google Cloud Enterprise SearchGoogle DriveGoogle Vertex AI SearchKay.aikNNLOTR (Merger Retriever)MetalPinecone Hybrid SearchPubMedRePhraseQuerySEC filingSelf-querying retrieverSVMTavily Search APITF-IDFVespaWeaviate Hybrid SearchWikipediayou-retrieverZepToolsAgents and toolkitsMemoryCallbacksChat loadersComponentsRetrieversWeaviate Hybrid SearchWeaviate Hybrid SearchWeaviate is an open-source vector database.Hybrid search is a technique that combines multiple search algorithms to improve the accuracy and relevance of search results. It uses the best features of both keyword-based search algorithms with vector search techniques.The Hybrid search in Weaviate uses sparse and dense vectors to represent the meaning and context of search queries and documents.This notebook shows how to use Weaviate hybrid search as a LangChain retriever.Set up the retriever:#!pip install weaviate-clientimport weaviateimport osWEAVIATE_URL = os.getenv("WEAVIATE_URL")auth_client_secret = (weaviate.AuthApiKey(api_key=os.getenv("WEAVIATE_API_KEY")),)client = weaviate.Client(    url=WEAVIATE_URL,    additional_headers={        "X-Openai-Api-Key": os.getenv("OPENAI_API_KEY"),    },)# client.schema.delete_all()from langchain.retrievers.weaviate_hybrid_search import WeaviateHybridSearchRetrieverfrom langchain.schema import Document    retriever = WeaviateHybridSearchRetriever(    client=client,    index_name="LangChain",    text_key="text",    attributes=[],    create_schema_if_missing=True,)Add some data:docs = [    Document(        metadata={            "title": "Embracing The Future: AI Unveiled",
Weaviate is an open-source vector database.
Weaviate is an open-source vector database. ->: Skip to main contentü¶úÔ∏èüîó LangChainDocsUse casesIntegrationsAPICommunityChat our docsLangSmithJS/TS DocsSearchCTRLKProvidersAnthropicAWSGoogleMicrosoftOpenAIMoreComponentsLLMsChat modelsDocument loadersDocument transformersText embedding modelsVector storesRetrieversAmazon KendraArcee RetrieverArxivAzure Cognitive SearchBM25ChaindeskChatGPT PluginCohere RerankerDocArrayElasticSearch BM25Google Cloud Enterprise SearchGoogle DriveGoogle Vertex AI SearchKay.aikNNLOTR (Merger Retriever)MetalPinecone Hybrid SearchPubMedRePhraseQuerySEC filingSelf-querying retrieverSVMTavily Search APITF-IDFVespaWeaviate Hybrid SearchWikipediayou-retrieverZepToolsAgents and toolkitsMemoryCallbacksChat loadersComponentsRetrieversWeaviate Hybrid SearchWeaviate Hybrid SearchWeaviate is an open-source vector database.Hybrid search is a technique that combines multiple search algorithms to improve the accuracy and relevance of search results. It uses the best features of both keyword-based search algorithms with vector search techniques.The Hybrid search in Weaviate uses sparse and dense vectors to represent the meaning and context of search queries and documents.This notebook shows how to use Weaviate hybrid search as a LangChain retriever.Set up the retriever:#!pip install weaviate-clientimport weaviateimport osWEAVIATE_URL = os.getenv("WEAVIATE_URL")auth_client_secret = (weaviate.AuthApiKey(api_key=os.getenv("WEAVIATE_API_KEY")),)client = weaviate.Client(    url=WEAVIATE_URL,    additional_headers={        "X-Openai-Api-Key": os.getenv("OPENAI_API_KEY"),    },)# client.schema.delete_all()from langchain.retrievers.weaviate_hybrid_search import WeaviateHybridSearchRetrieverfrom langchain.schema import Document    retriever = WeaviateHybridSearchRetriever(    client=client,    index_name="LangChain",    text_key="text",    attributes=[],    create_schema_if_missing=True,)Add some data:docs = [    Document(        metadata={            "title": "Embracing The Future: AI Unveiled",