-
Notifications
You must be signed in to change notification settings - Fork 16.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
weaviate: Add-deprecation-warning #29757
Conversation
hsm207
commented
Feb 12, 2025
•
edited
Loading
edited
- Description: add deprecation warning when using weaviate from langchain_community
- Issue: NA
- Dependencies: NA
- Twitter handle: NA
Add deprecation warnings for weaviate related classes in the langchain_community package. Users should be using langchain-ai/langchain-weaviate now. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/hsm207/langchain?shareId=XXXX-XXXX-XXXX-XXXX).
Signed-off-by: hsm207 <hsm207@users.noreply.github.com>
Signed-off-by: hsm207 <hsm207@users.noreply.github.com>
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
DeprecationWarning, | ||
stacklevel=2, | ||
) | ||
|
||
|
||
class WeaviateHybridSearchRetriever(BaseRetriever): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do replacements for WeaviateHybridSearchRetriever
and WeaviateTranslator
exist in langchain-weaviate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A replacement for WeaviateHybridSearchRetriever
already exists in langchain-weaviate.
WeaviateTranslator
has no replacement.
Before discussing migration, what’s the intended scope of WeaviateTranslator
?
- Just simple natural language (NL) queries?, or
- Full support for every Weaviate search feature?
Weaviate has introduced many new query features over the years (multi-tenancy, named vectors, multi-target search). If WeaviateTranslator
is meant to support everything, I'm not sure LLM-based structured query generation can reliably handle this. If it’s just for basic NL queries, we can scope an update accordingly.
Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NL queries is likely fine. WeaviateTranslator
is used to support LLM-generated filters and other structured queries (see docs here). I removed the warning on that module for now. If/when it's supported in langchain-weaviate we can deprecate it in community.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ccurme What's the expected behaviour if the user NL query can't be parsed correctly? For example:
This will work:
I want to watch a movie rated higher than 8.5
But this won't, because the translator does not support parsing multi tenancy-related terms, although I see the the prompt the LLM use could theoretically be tweaked to extract it from the natural language query:
I want to watch a movie rated higher than 8.5 in tenant A
Do we just pass the query to the vector db and let it throw an exception or are there some checks being done earlier?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Detecting unsupported features and raising an exception is ideal.
Letting DB throw an exception is OK. My main concern is making sure that, if there are current users of self-query retriever with weaviate and we deprecate the community integration, we can give concrete instructions about what we recommend they do.
…triever Signed-off-by: hsm207 <hsm207@users.noreply.github.com>
@ccurme thanks for the review. When's the next langchain-community release planned? |