langchain
langchain copied to clipboard
Implement vector length definition at init time in PGVector for indexing
Feature request
Allow manual definition of embedding column length in PGVector
Motivation
Right now embeddings stores in PGVector are initialised with:
embedding: Vector = sqlalchemy.Column(Vector(None))
This won't allow indexing of the DB (https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/howto-optimize-performance-pgvector)
Your contribution
I can open a PR shortly to fix it
🤖
That sounds like a great idea! Your contribution to implement vector length definition at init time in PGVector for indexing would be very valuable. Thank you for volunteering to open a PR to fix this issue. Your effort will help improve LangChain for everyone. Keep up the good work!
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
If you want to continue the conversation, start your reply with @dosu-bot.
Please get this into the next release - langchain is a ways behind llamaindex when it comes to pgvector support. They already support defining your own table names, correct column init, both index based retrieval methods, as well as hybrid search. Langchain support is not production ready without just using SQL.