langchain 在pgvector向量存储中没有HNSW索引,

c0vxltue  于 6个月前  发布在  其他
关注(0)|答案(3)|浏览(232)

Checked other resources

  • I added a very descriptive title to this issue.
  • I searched the LangChain documentation with the integrated search.
  • I used the GitHub search to find a similar question and didn't find it.
  • I am sure that this is a bug in LangChain rather than my code.
  • The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).

Example Code

Not applicable

Error Message and Stack Trace (if applicable)

  • No response*

Description

There is no HNSW index in the pgvector vector store:
https://github.com/langchain-ai/langchain/blob/master/libs/community/langchain_community/vectorstores/pgvector.py
Unlike the pgembedding vectore store:
https://github.com/langchain-ai/langchain/blob/master/libs/community/langchain_community/vectorstores/pgembedding.py#L192

System Info

Not applicable

kfgdxczn

kfgdxczn1#

你好,@holasoftware ,我想知道为什么你需要在pgvector.py中提供hnsw索引功能,而它已经在pgembedding.py中了?

cpjpxq1n

cpjpxq1n3#

你好,@holasoftware ,我想知道为什么你需要在pgvector.py中提供hnsw索引功能,而它已经在pgembedding.py中了?
pgembedding不适用于pgvector,而是适用于pg_embedding。它们是不同的Postgres扩展。实际上,还有pgvecto_rs(docs),专为第三个Postgres扩展pgvecto.rs设计:-p。
因此,这个PR是为pgvector设计的,我认为它更广泛地使用,因为该扩展受到AWS和GCP等的支持。

相关问题