Closed elieobeid7 closed 2 months ago
Hey @elieobeid7 maybe you should try the python package langchain-weaviate
. This may help solve the issue.
@Sachin-Bhat I just inspected the source code of that package https://github.com/langchain-ai/langchain-weaviate/tree/main/libs/weaviate
hybridsearch
, if you search for the keyword hybrid
you find nothingweaviate
package is used insteadSo can't use it, I'd rather stick with weaviate v3 client and follow the official docs rather than waste time trying to understand how it works. In any case it doesn't even have hybrid search as I previously said.
Hi @elieobeid7,
I'm the maintainer of the langchain-weaviate integration and can confirm what @StreetLamb said.
Hybrid search is supported in v4, just not through the WeaviateHybridSearchRetriever class.
It has been consolidated into the similarity_search
function. By default, it does 50:50 bm25 and vector search. Users can pass the arg alpha
to it such that 0 means pure BM25 search, and 1 means pure vector search.
It has been consolidated into the similarity_search function. By default, it does 50:50 bm25 and vector search. Users can pass the arg alpha to it such that 0 means pure BM25 search, and 1 means pure vector search.
@hsm207
It would be helpful if that was made clear in the Weaviate Hybrid Search docs.
Also, I don't see By default, it does 50:50 bm25 and vector search
in the similarity_search
function docs:
"""Return docs most similar to query.
Args:
query: Text to look up documents similar to.
k: Number of Documents to return. Defaults to 4.
**kwargs: Additional keyword arguments will be passed to the `hybrid()`
function of the weaviate client.
Returns:
List of Documents most similar to the query.
Checked other resources
Example Code
Error Message and Stack Trace (if applicable)
Description
windows 11, I'm trying to use
WeaviateHybridSearchRetriever
with Weaviate client v4 since v3 is deprecated.System Info