You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/search/vector-search-how-to-create-index.md
+6-12Lines changed: 6 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -206,27 +206,21 @@ In the following REST API example, "title" and "content" contain textual content
206
206
207
207
### [**.NET**](#tab/dotnet-add-field)
208
208
209
-
Under construction.
209
+
+ Use the [**Azure.Search.Documents 11.5.0-beta.4**](https://www.nuget.org/packages/Azure.Search.Documents/11.5.0-beta.4) package for vector scenarios.
210
210
211
-
Use the [**Azure.Search.Documents 11.5.0-beta.4**](https://www.nuget.org/packages/Azure.Search.Documents/11.5.0-beta.4) package for vector scenarios.
212
-
213
-
See the [cognitive-search-vector-pr](https://github.com/Azure/cognitive-search-vector-pr) GitHub repository for .NET code samples.
211
+
+ See the [cognitive-search-vector-pr](https://github.com/Azure/cognitive-search-vector-pr/tree/main/demo-dotnet) GitHub repository for .NET code samples.
214
212
215
213
### [**Python**](#tab/python-add-field)
216
214
217
-
Under construction.
218
-
219
-
Use the [**Azure.Search.Documents 11.4.0b8**](https://pypi.org/project/azure-search-documents/11.4.0b8/) package for vector scenarios.
215
+
+ Use the [**Azure.Search.Documents 11.4.0b8**](https://pypi.org/project/azure-search-documents/11.4.0b8/) package for vector scenarios.
220
216
221
-
See the [cognitive-search-vector-pr](https://github.com/Azure/cognitive-search-vector-pr) GitHub repository for Python code samples.
217
+
+ See the [cognitive-search-vector-pr](https://github.com/Azure/cognitive-search-vector-pr/tree/main/demo-python) GitHub repository for Python code samples.
222
218
223
219
### [**JavaScript**](#tab/js-add-field)
224
220
225
-
Under construction.
226
-
227
-
Use the [**@azure/search-documents 12.0.0-beta.2**](https://www.npmjs.com/package/@azure/search-documents/v/12.0.0-beta.2) package for vector scenarios.
221
+
+ Use the [**@azure/search-documents 12.0.0-beta.2**](https://www.npmjs.com/package/@azure/search-documents/v/12.0.0-beta.2) package for vector scenarios.
228
222
229
-
See the [cognitive-search-vector-pr](https://github.com/Azure/cognitive-search-vector-pr) GitHub repository for JavaScript code samples.
223
+
+ See the [cognitive-search-vector-pr](https://github.com/Azure/cognitive-search-vector-pr/tree/main/demo-javascript) GitHub repository for JavaScript code samples.
Copy file name to clipboardExpand all lines: articles/search/vector-search-how-to-query.md
+12-10Lines changed: 12 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,9 +15,9 @@ ms.date: 08/10/2023
15
15
> [!IMPORTANT]
16
16
> Vector search is in public preview under [supplemental terms of use](https://azure.microsoft.com/support/legal/preview-supplemental-terms/). It's available through the Azure portal, preview REST API, and [beta client libraries](https://github.com/Azure/cognitive-search-vector-pr#readme).
17
17
18
-
In Azure Cognitive Search, if you added vector fields to a search index, this article explains how to query those fields. It also explains how to combine vector queries with full text search and semantic search for hybrid query combination scenarios.
18
+
In Azure Cognitive Search, if you added vector fields to a search index, this article explains how to query those fields. It also explains how to combine vector queries with full text search and semantic search for *hybrid query* combination scenarios.
19
19
20
-
Query execution in Cognitive Search doesn't include vector conversion of the input string. Encoding (text-to-vector) of the query string requires that you pass the text to an embedding model for vectorization. You would then pass the output of the call to the embedding model to the search engine for similarity search over vector fields.
20
+
Cognitive Search doesn't provide built-in vectorization of the input string. Encoding (text-to-vector) of the query string requires that you pass the string to an embedding model for vectorization. You would then pass the output of the call to the embedding model to the search engine for similarity search over vector fields.
21
21
22
22
All results are returned in plain text, including vectors. If you use Search Explorer in the Azure portal to query an index that contains vectors, the numeric vectors are returned in plain text. Because numeric vectors aren't useful in search results, choose other fields in the index as a proxy for the vector match. For example, if an index has "descriptionVector" and "descriptionText" fields, the query can match on "descriptionVector" but the search result shows "descriptionText". Use the `select` parameter to specify only human-readable fields in the results.
23
23
@@ -45,7 +45,9 @@ You can also send an empty query (`search=*`) against the index. If the vector f
45
45
46
46
To query a vector field, the query itself must be a vector. To convert a text query string provided by a user into a vector representation, your application must call an embedding library that provides this capability. Use the same embedding library that you used to generate embeddings in the source documents.
47
47
48
-
Here's an example of a query string submitted to a deployment of an Azure OpenAI model:
48
+
You can find multiple instances of query string conversion in the [cognitive-search-vector-pr](https://github.com/Azure/cognitive-search-vector-pr/) repository for each of the Azure SDKs.
49
+
50
+
Here's a REST API example of a query string submitted to a deployment of an Azure OpenAI model:
49
51
50
52
```http
51
53
POST https://{{openai-service-name}}.openai.azure.com/openai/deployments/{{openai-deployment-name}}/embeddings?api-version={{openai-api-version}}
@@ -102,7 +104,7 @@ Be sure to the **JSON view** and formulate the query in JSON. The search bar in
102
104
103
105
:::image type="content" source="media/vector-search-how-to-query/select-json-view.png" alt-text="Screenshot of the index list." border="true":::
104
106
105
-
1. By default, the search API is 2023-07-01-Preview. This is the correct API version for vector search.
107
+
1. By default, the search API is **2023-07-01-Preview**. This is the correct API version for vector search.
106
108
107
109
1. Paste in a JSON vector query, and then select **Search**. You can use the REST example as a template for your JSON query.
108
110
@@ -140,21 +142,21 @@ Notice that "select" returns textual fields from the index. Although the vector
140
142
141
143
### [**.NET**](#tab/dotnet-vector-query)
142
144
143
-
Under construction.
145
+
+ Use the [**Azure.Search.Documents 11.5.0-beta.4**](https://www.nuget.org/packages/Azure.Search.Documents/11.5.0-beta.4) package for vector scenarios.
144
146
145
-
Use the [Azure.Search.Documents 11.5.0-beta.4](https://www.nuget.org/packages/Azure.Search.Documents/11.5.0-beta.4) package. For code samples, see the [cognitive-search-vector-pr] GitHub repository.
147
+
+ See the [cognitive-search-vector-pr](https://github.com/Azure/cognitive-search-vector-pr/tree/main/demo-dotnet) GitHub repository for .NET code samples.
146
148
147
149
### [**Python**](#tab/python-vector-query)
148
150
149
-
Under construction.
151
+
+ Use the [**Azure.Search.Documents 11.4.0b8**](https://pypi.org/project/azure-search-documents/11.4.0b8/) package for vector scenarios.
150
152
151
-
Use the [Azure.Search.Documents 11.4.0b8](https://pypi.org/project/azure-search-documents/11.4.0b8/) package. For code samples, see the [cognitive-search-vector-pr] GitHub repository.
153
+
+ See the [cognitive-search-vector-pr](https://github.com/Azure/cognitive-search-vector-pr/tree/main/demo-python) GitHub repository for Python code samples.
152
154
153
155
### [**JavaScript**](#tab/js-vector-query)
154
156
155
-
Under construction.
157
+
+ Use the [**@azure/search-documents 12.0.0-beta.2**](https://www.npmjs.com/package/@azure/search-documents/v/12.0.0-beta.2) package for vector scenarios.
156
158
157
-
Use the [@azure/search-documents 12.0.0-beta.2](https://www.npmjs.com/package/@azure/search-documents/v/12.0.0-beta.2) package. For code samples, see the [cognitive-search-vector-pr] GitHub repository.
159
+
+ See the [cognitive-search-vector-pr](https://github.com/Azure/cognitive-search-vector-pr/tree/main/demo-javascript) GitHub repository for JavaScript code samples.
Copy file name to clipboardExpand all lines: articles/search/vector-search-overview.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,17 +27,17 @@ We recommend this article for background, but if you'd rather get started, follo
27
27
28
28
You could also begin with the [vector quickstart](search-get-started-vector.md) or the [code samples on GitHub](https://github.com/Azure/cognitive-search-vector-pr).
29
29
30
+
Support for vector search is in public preview and available through the [**2023-07-01-Preview REST APIs**](/rest/api/searchservice/index-preview), Azure portal, and the more recent beta packages of the Azure SDKs for [.NET](https://www.nuget.org/packages/Azure.Search.Documents/11.5.0-beta.4), [Python](https://pypi.org/project/azure-search-documents/11.4.0b8/), and [JavaScript](https://www.npmjs.com/package/@azure/search-documents/v/12.0.0-beta.2).
31
+
30
32
## What's vector search in Cognitive Search?
31
33
32
34
Vector search is a new capability for indexing, storing, and retrieving vector embeddings from a search index. You can use it to power similarity search, multi-modal search, recommendations engines, or applications implementing the [Retrieval Augmented Generation (RAG) architecture](https://arxiv.org/abs/2005.11401).
33
35
34
-
Support for vector search is in public preview and available through the [**2023-07-01-Preview REST APIs**](/rest/api/searchservice/index-preview), Azure portal, and the more recent beta packages of the Azure SDKs for [.NET](https://www.nuget.org/packages/Azure.Search.Documents/11.5.0-beta.4), [Python](https://pypi.org/project/azure-search-documents/11.4.0b8/), and [JavaScript](https://www.npmjs.com/package/@azure/search-documents/v/12.0.0-beta.2).
35
-
36
36
The following diagram shows the indexing and query workflows for vector search.
37
37
38
38
:::image type="content" source="media/vector-search-overview/vector-search-architecture-diagram-2.png" alt-text="Architecture of vector search workflow." border="true" lightbox="media/vector-search-overview/vector-search-architecture-diagram-2.png":::
39
39
40
-
On the indexing side, prepare and load source documents that contain embeddings. Cognitive Search doesn't generate embeddings, so your solution should include calls to Azure OpenAI or other models that can create a vector representation of your image, audio, text, and other content. Add a *vector field* to your index definition on Cognitive Search. Load the index with a documents payload that includes the embeddings. Your index is now ready to query.
40
+
On the indexing side, prepare source documents that contain embeddings. Cognitive Search doesn't generate embeddings, so your solution should include calls to Azure OpenAI or other models that can create a vector representation of your image, audio, text, and other content. Add a *vector field* to your index definition on Cognitive Search. Load the index with a documents payload that includes the embeddings. Your index is now ready to query.
41
41
42
42
On the query side, in your client application, collect the query input. Add a step that converts the input into a vector, and then send the vector query to your index on Cognitive Search for a similarity search. Cognitive Search returns documents with the requested `k` nearest neighbors (kNN) in the results.
0 commit comments