-
Notifications
You must be signed in to change notification settings - Fork 103
Feature: Add Document Retrieval with Metadata Filtering similar to Chroma Vector Store #264
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
base: main
Are you sure you want to change the base?
Feature: Add Document Retrieval with Metadata Filtering similar to Chroma Vector Store #264
Conversation
…to default port used in tests
…ure/search_by_metadata
dishaprakash
left a comment
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.
Can we also add some examples related to this new feature into the vector store how to notebook?
|
@dishaprakash done |
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.
LGTM
|
@gRedHeadphone as we add new features to PGVectorStore, lets also update the how to guide for PGVectorstore on the langchain website (ref PR - langchain-ai/langchain#32549) |
| results = result_map.fetchall() | ||
| return bool(len(results) == 1) | ||
|
|
||
| async def aget( |
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.
Can we also support an ids input and just call the get_by_ids method?
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.
but then other parameters won't work. How about updating filters with ids filter?
|
|
||
| async def aget( | ||
| self, | ||
| filter: Optional[dict] = None, |
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.
We most likely should use "where" to match Chroma
| limit: Optional[int] = None, | ||
| offset: Optional[int] = None, | ||
| **kwargs: Any, | ||
| ) -> list[Document]: |
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.
This method should return A dict with the keys "ids", "embeddings", "metadatas", "documents" to match the Chroma implementation
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.
so should I also add "include" parameter?
original PR: #231
On top of it adding limit and offset parameter to get methods similar to chroma vector store