mirror of
https://github.com/hwchase17/langchain
synced 2024-10-29 17:07:25 +00:00
6fc24743b7
Hi @rlancemartin, @eyurtsev! - Description: Adding HNSW extension support for Postgres. Similar to pgvector vectorstore, with 3 differences 1. it uses HNSW extension for exact and ANN searches, 2. Vectors are of type array of real 3. Only supports L2 - Dependencies: [HNSW](https://github.com/knizhnik/hnsw) extension for Postgres - Example: ```python db = HNSWVectoreStore.from_documents( embedding=embeddings, documents=docs, collection_name=collection_name, connection_string=connection_string ) query = "What did the president say about Ketanji Brown Jackson" docs_with_score: List[Tuple[Document, float]] = db.similarity_search_with_score(query) ``` The example notebook is in the PR too. |
||
---|---|---|
.. | ||
document_loaders/integrations | ||
document_transformers/text_splitters | ||
retrievers | ||
text_embedding/integrations | ||
vectorstores/integrations |