feat(docs): add PGVectorStore (#30950)

Thank you for contributing to LangChain!

-  **Adding documentation for PGVectorStore**: 
docs: Adding documentation for the new PGVectorStore as a part of
langchain-postgres

- **Add docs**: The notebook for PGVectorStore is now added to the
directory `docs/docs/integrations`.
As a part of this change, we've also updated the VectorStore features
table and VectorStoreTabs

---------

Co-authored-by: Chester Curme <chester.curme@gmail.com>
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
This commit is contained in:
dishaprakash 2025-07-25 17:22:58 +00:00 committed by GitHub
parent 12ae42c5e9
commit a0671676ae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 815 additions and 0 deletions

File diff suppressed because one or more lines are too long

View File

@ -10,6 +10,7 @@ from langchain_couchbase import CouchbaseSearchVectorStore
from langchain_milvus import Milvus
from langchain_mongodb import MongoDBAtlasVectorSearch
from langchain_pinecone import PineconeVectorStore
from langchain_postgres import PGVectorStore
from langchain_qdrant import QdrantVectorStore
vectorstore_list = [
@ -22,6 +23,7 @@ vectorstore_list = [
]
from_partners = [
("PGVectorStore", PGVectorStore),
("Chroma", Chroma),
("AstraDBVectorStore", AstraDBVectorStore),
("QdrantVectorStore", QdrantVectorStore),
@ -52,6 +54,17 @@ The table below lists the features for some of our most popular vector stores.
def get_vectorstore_table():
vectorstore_feat_table = {
"PGVectorStore": {
"Delete by ID": True,
"Filtering": True,
"similarity_search_by_vector": True,
"similarity_search_with_score": True,
"asearch": True,
"Passes Standard Tests": True,
"Multi Tenancy": False,
"Local/Cloud": "Local",
"IDs in add Documents": True,
},
"FAISS": {
"Delete by ID": True,
"Filtering": True,

View File

@ -1174,6 +1174,19 @@ const FEATURE_TABLES = {
local: true,
idsInAddDocuments: true,
},
{
name: "PGVectorStore",
link: "pgvectorstore",
deleteById: true,
filtering: true,
searchByVector: true,
searchWithScore: true,
async: true,
passesStandardTests: true,
multiTenancy: false,
local: true,
idsInAddDocuments: true,
},
{
name: "PineconeVectorStore",
link: "pinecone",

View File

@ -59,6 +59,13 @@ export default function VectorStoreTabs(props) {
text: `from langchain_postgres import PGVector\n${useFakeEmbeddings ? fakeEmbeddingsString : ""}\n${vectorStoreVarName} = PGVector(\n embeddings=embeddings,\n collection_name="my_docs",\n connection="postgresql+psycopg://...",\n)`,
packageName: "langchain-postgres",
default: false,
},
{
value: "PGVectorStore",
label: "PGVectorStore",
text: `from langchain_postgres import PGEngine, PGVectorStore\n${useFakeEmbeddings ? fakeEmbeddingsString : ""}\n$engine = PGEngine.from_connection_string(\n url="postgresql+psycopg://..."\n)\n\n${vectorStoreVarName} = PGVectorStore.create_sync(\n engine=pg_engine,\n table_name='test_table',\n embedding_service=embedding\n)`,
packageName: "langchain-postgres",
default: false,
},
{
value: "Pinecone",