From fc802d8f9f74b78faff23b31ab5600ec2a0e5260 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Mon, 21 Jul 2025 20:29:34 -0400 Subject: [PATCH] docs: fix vectorstore feature table - correct "IDs in add Documents" values (#32153) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The vectorstore feature table in the documentation was showing incorrect information for the "IDs in add Documents" capability. Most vectorstores were marked as ❌ (not supported) when they actually support extracting IDs from documents. ## Problem The issue was an inconsistency between two sources of truth: - **JavaScript feature table** (`docs/src/theme/FeatureTables.js`): Hardcoded `idsInAddDocuments: false` for most vectorstores - **Python script** (`docs/scripts/vectorstore_feat_table.py`): Correctly showed `"IDs in add Documents": True` for most vectorstores ## Root Cause All vectorstores inherit the base `VectorStore.add_documents()` method which automatically extracts document IDs: ```python # From libs/core/langchain_core/vectorstores/base.py lines 277-284 if "ids" not in kwargs: ids = [doc.id for doc in documents] # If there's at least one valid ID, we'll assume that IDs should be used. if any(ids): kwargs["ids"] = ids ``` Since no vectorstores override `add_documents()`, they all inherit this behavior and support IDs in documents. ## Solution Updated `idsInAddDocuments` from `false` to `true` for 13 vectorstores: - AstraDBVectorStore, Chroma, Clickhouse, DatabricksVectorSearch - ElasticsearchStore, FAISS, InMemoryVectorStore, MongoDBAtlasVectorSearch - PGVector, PineconeVectorStore, Redis, Weaviate, SQLServer The other 4 vectorstores (CouchbaseSearchVectorStore, Milvus, openGauss, QdrantVectorStore) were already correctly marked as `true`. ## Impact Users visiting https://python.langchain.com/docs/integrations/vectorstores/ will now see accurate information. The "IDs in add Documents" column will correctly show ✅ for all vectorstores instead of incorrectly showing ❌ for most of them. This aligns with the API documentation which states: "if kwargs contains ids and documents contain ids, the ids in the kwargs will receive precedence" - clearly indicating that document IDs are supported. Fixes #30622. --- 💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click [here](https://survey.alchemer.com/s3/8343779/Copilot-Coding-agent) to start the survey. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: mdrxy <61371264+mdrxy@users.noreply.github.com> --- docs/src/theme/FeatureTables.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/src/theme/FeatureTables.js b/docs/src/theme/FeatureTables.js index 215c72481eb..8af9ecc73dc 100644 --- a/docs/src/theme/FeatureTables.js +++ b/docs/src/theme/FeatureTables.js @@ -1029,7 +1029,7 @@ const FEATURE_TABLES = { passesStandardTests: false, multiTenancy: false, local: true, - idsInAddDocuments: false, + idsInAddDocuments: true, }, { name: "Chroma", @@ -1042,7 +1042,7 @@ const FEATURE_TABLES = { passesStandardTests: false, multiTenancy: false, local: true, - idsInAddDocuments: false, + idsInAddDocuments: true, }, { name: "Clickhouse", @@ -1055,7 +1055,7 @@ const FEATURE_TABLES = { passesStandardTests: false, multiTenancy: false, local: true, - idsInAddDocuments: false, + idsInAddDocuments: true, }, { name: "CouchbaseSearchVectorStore", @@ -1081,7 +1081,7 @@ const FEATURE_TABLES = { passesStandardTests: false, multiTenancy: false, local: false, - idsInAddDocuments: false, + idsInAddDocuments: true, }, { name: "ElasticsearchStore", @@ -1094,7 +1094,7 @@ const FEATURE_TABLES = { passesStandardTests: false, multiTenancy: false, local: true, - idsInAddDocuments: false, + idsInAddDocuments: true, }, { name: "FAISS", @@ -1107,7 +1107,7 @@ const FEATURE_TABLES = { passesStandardTests: false, multiTenancy: false, local: true, - idsInAddDocuments: false, + idsInAddDocuments: true, }, { name: "InMemoryVectorStore", @@ -1120,7 +1120,7 @@ const FEATURE_TABLES = { passesStandardTests: false, multiTenancy: false, local: true, - idsInAddDocuments: false, + idsInAddDocuments: true, }, { name: "Milvus", @@ -1146,7 +1146,7 @@ const FEATURE_TABLES = { passesStandardTests: false, multiTenancy: false, local: true, - idsInAddDocuments: false, + idsInAddDocuments: true, }, { name: "openGauss", @@ -1172,7 +1172,7 @@ const FEATURE_TABLES = { passesStandardTests: false, multiTenancy: false, local: true, - idsInAddDocuments: false, + idsInAddDocuments: true, }, { name: "PineconeVectorStore", @@ -1185,7 +1185,7 @@ const FEATURE_TABLES = { passesStandardTests: false, multiTenancy: false, local: true, - idsInAddDocuments: false, + idsInAddDocuments: true, }, { name: "QdrantVectorStore", @@ -1211,7 +1211,7 @@ const FEATURE_TABLES = { passesStandardTests: false, multiTenancy: false, local: true, - idsInAddDocuments: false, + idsInAddDocuments: true, }, { name: "Weaviate", @@ -1224,7 +1224,7 @@ const FEATURE_TABLES = { passesStandardTests: false, multiTenancy: true, local: true, - idsInAddDocuments: false, + idsInAddDocuments: true, }, { name: "SQLServer", @@ -1237,7 +1237,7 @@ const FEATURE_TABLES = { passesStandardTests: false, multiTenancy: false, local: false, - idsInAddDocuments: false, + idsInAddDocuments: true, }, ], }