langchain icon indicating copy to clipboard operation
langchain copied to clipboard

Implement vector length definition at init time in PGVector for indexing

Open Frank995 opened this issue 7 months ago • 2 comments

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

Frank995 avatar Jan 17 '24 09:01 Frank995

🤖

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.

dosubot[bot] avatar Jan 17 '24 09:01 dosubot[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.

RobertHH-IS avatar Jan 20 '24 10:01 RobertHH-IS