mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-04 10:42:55 +00:00
docs: fix vectorstore feature table - correct "IDs in add Documents" values (#32153)
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. <!-- START COPILOT CODING AGENT TIPS --> --- 💬 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>
This commit is contained in:
parent
b4d87c709c
commit
fc802d8f9f
@ -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,
|
||||
},
|
||||
],
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user