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

community: Add InMemoryVectorStore #19326

Merged
merged 1 commit into from
Mar 20, 2024

Conversation

cbornet
Copy link
Collaborator

@cbornet cbornet commented Mar 20, 2024

This is a basic VectorStore implementation using an in-memory dict to store the documents.
It doesn't need any extra/optional dependency as it uses numpy which is already a dependency of langchain.
This is useful for quick testing, demos, examples.
Also it allows to write vendor-neutral tutorials, guides, etc...

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Mar 20, 2024
Copy link

vercel bot commented Mar 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
langchain ⬜️ Ignored (Inspect) Visit Preview Mar 20, 2024 10:46am

@dosubot dosubot bot added Ɑ: vector store Related to vector store module 🤖:enhancement A large net-new component, integration, or chain. Use sparingly. The largest features labels Mar 20, 2024
@cbornet cbornet force-pushed the inmemory-vector-store branch 3 times, most recently from f9467fb to 8a6e321 Compare March 20, 2024 10:42
@eyurtsev eyurtsev self-assigned this Mar 20, 2024
@eyurtsev
Copy link
Collaborator

@cbornet would you mind moving this to:


All in memory implementations are pretty fundamental -- useful as both reference implementations and for testing purposes

cc @baskaryan

@eyurtsev
Copy link
Collaborator

Standby! We're trying to figure whether it's langchain-core or langchain

@cbornet
Copy link
Collaborator Author

cbornet commented Mar 20, 2024

Ok. Note that I’m using utility functions for cosine similarity and mmr.
Those would have to be moved or duplicated to core.

@cbornet
Copy link
Collaborator Author

cbornet commented Mar 20, 2024

Also the core would have to depend on numpy

@cbornet
Copy link
Collaborator Author

cbornet commented Mar 20, 2024

But a no-numpy, zero-dep, less performant implementation could also probably be written.

@eyurtsev
Copy link
Collaborator

Aah got it i didn't notice the numpy dependencies

@eyurtsev
Copy link
Collaborator

OK we can merge as is for now. We're working on breaking langchain dependency on langchain community. Once that's broken, we're likely going to invert it with langchain containing reference implementations / general algorithms, but this will be after 0.2.0 release.

@eyurtsev eyurtsev merged commit 00614f3 into langchain-ai:master Mar 20, 2024
59 checks passed
@cbornet cbornet deleted the inmemory-vector-store branch March 21, 2024 09:26
rahul-trip pushed a commit to daxa-ai/langchain that referenced this pull request Mar 27, 2024
This is a basic VectorStore implementation using an in-memory dict to
store the documents.
It doesn't need any extra/optional dependency as it uses numpy which is
already a dependency of langchain.
This is useful for quick testing, demos, examples.
Also it allows to write vendor-neutral tutorials, guides, etc...
bechbd pushed a commit to bechbd/langchain that referenced this pull request Mar 29, 2024
This is a basic VectorStore implementation using an in-memory dict to
store the documents.
It doesn't need any extra/optional dependency as it uses numpy which is
already a dependency of langchain.
This is useful for quick testing, demos, examples.
Also it allows to write vendor-neutral tutorials, guides, etc...
gkorland pushed a commit to FalkorDB/langchain that referenced this pull request Mar 30, 2024
This is a basic VectorStore implementation using an in-memory dict to
store the documents.
It doesn't need any extra/optional dependency as it uses numpy which is
already a dependency of langchain.
This is useful for quick testing, demos, examples.
Also it allows to write vendor-neutral tutorials, guides, etc...
chrispy-snps pushed a commit to chrispy-snps/langchain that referenced this pull request Mar 30, 2024
This is a basic VectorStore implementation using an in-memory dict to
store the documents.
It doesn't need any extra/optional dependency as it uses numpy which is
already a dependency of langchain.
This is useful for quick testing, demos, examples.
Also it allows to write vendor-neutral tutorials, guides, etc...
chrispy-snps pushed a commit to chrispy-snps/langchain that referenced this pull request Mar 30, 2024
This is a basic VectorStore implementation using an in-memory dict to
store the documents.
It doesn't need any extra/optional dependency as it uses numpy which is
already a dependency of langchain.
This is useful for quick testing, demos, examples.
Also it allows to write vendor-neutral tutorials, guides, etc...
hinthornw pushed a commit that referenced this pull request Apr 26, 2024
This is a basic VectorStore implementation using an in-memory dict to
store the documents.
It doesn't need any extra/optional dependency as it uses numpy which is
already a dependency of langchain.
This is useful for quick testing, demos, examples.
Also it allows to write vendor-neutral tutorials, guides, etc...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖:enhancement A large net-new component, integration, or chain. Use sparingly. The largest features size:L This PR changes 100-499 lines, ignoring generated files. Ɑ: vector store Related to vector store module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants