langchain/docs
Raouf Chebri 6fc24743b7
Add pg_hnsw vectorstore integration (#6893)
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.
2023-07-05 08:10:10 -07:00
..
api_reference Page per class-style api reference (#6560) 2023-06-30 09:23:32 -07:00
docs_skeleton docs: New experimental UI for Mendable Search (#6558) 2023-07-03 20:52:13 +01:00
extras Add pg_hnsw vectorstore integration (#6893) 2023-07-05 08:10:10 -07:00
snippets Update get_started.mdx (#7005) 2023-07-03 02:23:12 -06:00
.local_build.sh Harrison/deeplake new features (#6263) 2023-06-16 17:53:55 -07:00
package-lock.json docs: New experimental UI for Mendable Search (#6558) 2023-07-03 20:52:13 +01:00
requirements.txt Page per class-style api reference (#6560) 2023-06-30 09:23:32 -07:00