Skip to content

Commit

Permalink
Docs: azuresearch.ipynb (in docs/docs/integrations/vectorstores) -- f…
Browse files Browse the repository at this point in the history
…ixed headings and comments (langchain-ai#18135)

This PR updates azuresearch.ipynb with an edit to the introduction
sentence, consistent heading levels, and disambiguation in code
comments.
  • Loading branch information
HeidiSteen authored and al1p-R committed Feb 27, 2024
1 parent 4f59e24 commit 5fbdfcc
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions docs/docs/integrations/vectorstores/azuresearch.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
"source": [
"# Azure AI Search\n",
"\n",
"[Azure AI Search](https://learn.microsoft.com/azure/search/search-what-is-azure-search) (formerly known as `Azure Search` and `Azure Cognitive Search`) is a cloud search service that gives developers infrastructure, APIs, and tools for building a rich search experience over private, heterogeneous content in web, mobile, and enterprise applications.\n",
"\n"
"[Azure AI Search](https://learn.microsoft.com/azure/search/search-what-is-azure-search) (formerly known as `Azure Search` and `Azure Cognitive Search`) is a cloud search service that gives developers infrastructure, APIs, and tools for information retrieval of vector, keyword, and hybrid queries at scale.\n"
]
},
{
Expand Down Expand Up @@ -292,7 +291,7 @@
"source": [
"## Perform a vector similarity search with relevance scores\n",
" \n",
"Execute a pure vector similarity search using the similarity_search_with_relevance_scores() method:"
"Execute a pure vector similarity search using the similarity_search_with_relevance_scores() method. Queries that don't meet the threshold requirements are exluded."
]
},
{
Expand Down Expand Up @@ -331,9 +330,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Perform a Hybrid Search\n",
"## Perform a hybrid search\n",
"\n",
"Execute hybrid search using the search_type or hybrid_search() method:"
"Execute hybrid search using the search_type or hybrid_search() method. Vector and nonvector text fields are queried in parallel, results are merged, and top matches of the unified result set are returned."
]
},
{
Expand All @@ -356,7 +355,7 @@
}
],
"source": [
"# Perform a hybrid search\n",
"# Perform a hybrid search using the search_type parameter\n",
"docs = vector_store.similarity_search(\n",
" query=\"What did the president say about Ketanji Brown Jackson\",\n",
" k=3,\n",
Expand Down Expand Up @@ -385,7 +384,7 @@
}
],
"source": [
"# Perform a hybrid search\n",
"# Perform a hybrid search using the hybrid_search method\n",
"docs = vector_store.hybrid_search(\n",
" query=\"What did the president say about Ketanji Brown Jackson\", k=3\n",
")\n",
Expand All @@ -396,7 +395,16 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Create a new index with custom filterable fields \n",
"## Custom schemas and queries\n",
"\n",
"This section shows you how to replace the default schema with a custom schema.\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Create a new index with custom filterable fields \n",
"\n",
"This schema shows field definitions. It's the default schema, plus several new fields attributed as filterable. Because it's using the default vector configuration, you won't see vector configuration or vector profile overrides here. The name of the default vector profile is \"myHnswProfile\" and it's using a vector configuration of Hierarchical Navigable Small World (HNSW) for indexing and queries against the content_vector field.\n",
"\n",
Expand Down Expand Up @@ -566,7 +574,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Create a new index with a Scoring Profile\n",
"### Create a new index with a scoring profile\n",
"\n",
"Here's another custom schema that includes a scoring profile definition. A scoring profile is used for relevance tuning of nonvector content, which is helpful in hybrid search scenarios."
]
Expand Down

0 comments on commit 5fbdfcc

Please sign in to comment.