Integration of weaviate and langchain, how to use hybrid in v4 like as_retriever in v3

Description

I noticed that there is a method called as_retriever in the v3 version, which is integrated into langgraph as a tool, but I can’t find anything similar in v4. The WeaviateVectorStore library that can be integrated as a retriever only supports vector retrieval.

Server Setup Information

  • Weaviate Server Version:
    Name: weaviate-client
    Version: 4.11.1

Name: langchain-weaviate
Version: 0.0.4

Hi @cyf121232145 !!

Welcome to our community :hugs:

In the new integration, the similarity search already uses hybrid:

Not that, because it passes all kwargs to collection.query.hybrid, you can use any of the parameters as documented here:

Is this what you are referring to? Sorry, I don’t have much experience with langgraph.

Let me know if this helps!