Skip to content

Commit 3178068

Browse files
author
ajosh0504
committed
Updating num candidates
1 parent 7dc75a9 commit 3178068

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

labs/vector-search-lab.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@
435435
" query_embedding = <CODE_BLOCK_7>\n",
436436
"\n",
437437
" # Define an aggregation pipeline consisting of a $vectorSearch stage, followed by a $project stage\n",
438-
" # Set the number of candidates to 50 and only return the top 5 documents from the vector search\n",
438+
" # Set the number of candidates to 20 and only return the top 5 documents from the vector search\n",
439439
" # Set the `filter` field in the $vectorSearch stage to the value `filter` passed to the function\n",
440440
" # In the $project stage, exclude the `_id` field, include these fields: `title`, `cover`, `year`, `pages`, and the `vectorSearchScore`\n",
441441
" # NOTE: Use variables defined previously for the `index`, `queryVector` and `path` fields in the $vectorSearch stage\n",
@@ -761,7 +761,7 @@
761761
" \"index\": ATLAS_VECTOR_SEARCH_INDEX_NAME,\n",
762762
" \"path\": \"embedding\",\n",
763763
" \"queryVector\": get_embeddings(user_query, \"text\", \"query\"),\n",
764-
" \"numCandidates\": 50,\n",
764+
" \"numCandidates\": 20,\n",
765765
" \"limit\": 10,\n",
766766
" }\n",
767767
" },\n",

solutions/vector-search-lab.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@
435435
" query_embedding = get_embeddings(user_query, mode, \"query\")\n",
436436
"\n",
437437
" # Define an aggregation pipeline consisting of a $vectorSearch stage, followed by a $project stage\n",
438-
" # Set the number of candidates to 50 and only return the top 5 documents from the vector search\n",
438+
" # Set the number of candidates to 20 and only return the top 5 documents from the vector search\n",
439439
" # Set the `filter` field in the $vectorSearch stage to the value `filter` passed to the function\n",
440440
" # In the $project stage, exclude the `_id` field, include these fields: `title`, `cover`, `year`, `pages`, and the `vectorSearchScore`\n",
441441
" # NOTE: Use variables defined previously for the `index`, `queryVector` and `path` fields in the $vectorSearch stage\n",
@@ -445,7 +445,7 @@
445445
" \"index\": ATLAS_VECTOR_SEARCH_INDEX_NAME,\n",
446446
" \"queryVector\": query_embedding,\n",
447447
" \"path\": \"embedding\",\n",
448-
" \"numCandidates\": 50,\n",
448+
" \"numCandidates\": 20,\n",
449449
" \"filter\": filter,\n",
450450
" \"limit\": 5,\n",
451451
" }\n",
@@ -816,7 +816,7 @@
816816
" \"index\": ATLAS_VECTOR_SEARCH_INDEX_NAME,\n",
817817
" \"path\": \"embedding\",\n",
818818
" \"queryVector\": get_embeddings(user_query, \"text\", \"query\"),\n",
819-
" \"numCandidates\": 50,\n",
819+
" \"numCandidates\": 20,\n",
820820
" \"limit\": 10,\n",
821821
" }\n",
822822
" },\n",
@@ -967,7 +967,7 @@
967967
],
968968
"metadata": {
969969
"kernelspec": {
970-
"display_name": "base",
970+
"display_name": "Python 3",
971971
"language": "python",
972972
"name": "python3"
973973
},
@@ -981,7 +981,7 @@
981981
"name": "python",
982982
"nbconvert_exporter": "python",
983983
"pygments_lexer": "ipython3",
984-
"version": "3.11.6"
984+
"version": "3.9.6"
985985
},
986986
"widgets": {
987987
"application/vnd.jupyter.widget-state+json": {

0 commit comments

Comments
 (0)