Langchain integration with Weaviate Client v4 - Hybrid search not working

Description

It seems the langchain SelfQueryRetriever still generates the filters as per Weaviate Client v3. The filter follows the v3 format, which, for unknown reasons, changed in v4. This is the error: _HybridQueryAsync.hybrid() got an unexpected keyword argument ‘where_filter’.

Server Setup Information

  • Weaviate Server Version: Weaviate Cloud
  • Deployment Method: NA
  • Multi Node? Number of Running Nodes: NA
  • Client Language and Version:
  • Multitenancy?: NA

Any additional Information

This is the error: _HybridQueryAsync.hybrid() got an unexpected keyword argument ‘where_filter’

Name: weaviate-client
Version: 4.14.1

Name: langchain
Version: 0.3.24

Hi!

I believe that this retriever is deprecated :thinking:

Here is the docs for the current integration, and here a recipe we have on how to use Weaviate with Langchain

Let me know if this helps!

Thanks!

Hi Duda,

Not sure why the SelfQueryRetriever should be obsolete. We use it with other vector stores, including Weaviate (Client v3) and the advantage is that it abstracts the underlying databases.

If not supported in Client v4, this is in fact may be due to LangChain not Weaviate, just let me know and I will add a custom retreiever just for Weaviate, whereas the other vectors DB we use will keep working fine with the SelfQueryRetriever.

hi @atolto-pirla !

I am sorry, I believe I mistaken the classes :grimacing:

Actually, this is the deprecated one: WeaviateHybridSearchRetriever — 🦜🔗 LangChain documentation

This is considering that Weaviate python V3 client is definitely deprecated :grimacing: So all integrations based on v3 client is now obsolete / deprecated.

Based on that recipe, let me know what you are attempting on doing, and I can try helping!

Thanks!