docs: Updated index definition and reference to LangChain-MongoDB (#19047)

**Description:** 
Updates to LangChain-MongoDB documentation: updates to the Atlas vector
search index definition

**Issue:** 
NA

**Dependencies:** 
NA

**Twitter handle:** 
iprakul
pull/19048/head
Prakul 4 months ago committed by GitHub
parent 5e0c58f9c2
commit 4c53e31377
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -23,10 +23,10 @@
"metadata": {},
"source": [
"> Note: \n",
">\n",
"> \n",
">* More documentation can be found at [LangChain-MongoDB site](https://www.mongodb.com/docs/atlas/atlas-vector-search/ai-integrations/langchain/)\n",
">* This feature is Generally Available and ready for production deployments.\n",
">* The langchain version 0.0.305 ([release notes](https://github.com/langchain-ai/langchain/releases/tag/v0.0.305)) introduces the support for $vectorSearch MQL stage, which is available with MongoDB Atlas 6.0.11 and 7.0.2. Users utilizing earlier versions of MongoDB Atlas need to pin their LangChain version to <=0.0.304\n",
"> \n",
"> "
]
},
@ -121,13 +121,12 @@
"id": "1f3ecc42",
"metadata": {},
"source": [
"Now, let's create a vector search index on your cluster. In the below example, `embedding` is the name of the field that contains the embedding vector. Please refer to the [documentation](https://www.mongodb.com/docs/atlas/atlas-vector-search/create-index/) to get more details on how to define an Atlas Vector Search index.\n",
"Now, let's create a vector search index on your cluster. More detailed steps can be found at [Create Vector Search Index for LangChain](https://www.mongodb.com/docs/atlas/atlas-vector-search/ai-integrations/langchain/#create-the-atlas-vector-search-index) section.\n",
"In the below example, `embedding` is the name of the field that contains the embedding vector. Please refer to the [documentation](https://www.mongodb.com/docs/atlas/atlas-vector-search/create-index/) to get more details on how to define an Atlas Vector Search index.\n",
"You can name the index `{ATLAS_VECTOR_SEARCH_INDEX_NAME}` and create the index on the namespace `{DB_NAME}.{COLLECTION_NAME}`. Finally, write the following definition in the JSON editor on MongoDB Atlas:\n",
"\n",
"```json\n",
"{\n",
" \"name\": \"index_name\",\n",
" \"type\": \"vectorSearch\",\n",
" \"fields\":[\n",
" {\n",
" \"type\": \"vector\",\n",
@ -277,8 +276,6 @@
"source": [
"```json\n",
"{\n",
" \"name\": \"index_name\",\n",
" \"type\": \"vectorSearch\",\n",
" \"fields\":[\n",
" {\n",
" \"type\": \"vector\",\n",

Loading…
Cancel
Save