Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Misc updates to code search notebook #184

Merged
merged 1 commit into from
Aug 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions notebooks/en/code_search.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
},
"outputs": [],
"source": [
"%pip install inflection qdrant-client https://github.com/qdrant/fastembed/archive/main.zip"
"%pip install inflection qdrant-client fastembed"
]
},
{
Expand Down Expand Up @@ -682,10 +682,7 @@
"You can improve the search results, by grouping them by payload properties.\n",
"In our case, we can group the results by the module. If we use code embeddings,\n",
"we can see multiple results from the `map_index` module. Let's group the\n",
"results and assume a single result per module:\n",
"\n",
"> [!TIP]\n",
"> The query API doesn't support grouping yet. We'll use the older search API."
"results and assume a single result per module:"
]
},
{
Expand All @@ -696,12 +693,10 @@
},
"outputs": [],
"source": [
"results = client.search_groups(\n",
"results = client.query_points_groups(\n",
" COLLECTION_NAME,\n",
" query_vector=(\n",
" \"code\",\n",
" next(code_model.query_embed(query)).tolist(),\n",
" ),\n",
" query=next(code_model.query_embed(query)).tolist(),\n",
" using=\"code\",\n",
" group_by=\"context.module\",\n",
" limit=5,\n",
" group_size=1,\n",
Expand Down
Loading