Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract metada from query and use it for pre-filtering in Weaviate #359

Open
shanumas opened this issue Jul 24, 2024 · 2 comments
Open

Extract metada from query and use it for pre-filtering in Weaviate #359

shanumas opened this issue Jul 24, 2024 · 2 comments

Comments

@shanumas
Copy link

I want to extract "title preference" from user query. For example, user is interested in documents for which
the title has "usa" in it.

I want to extact this during using llm during the query phase and use it for pre-filtering in weaviate. How can
I do this ?

I see that the metadata_extractor is attached in the ingest.py . But I want to use metadata_extractor during query
phase also.

@vbarda
Copy link
Collaborator

vbarda commented Jul 25, 2024

@shanumas check out this section of langchain docs https://python.langchain.com/v0.2/docs/how_to/query_constructing_filters/

@kuttybuski
Copy link

This worked great. Thanks @vbarda

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants