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/chat-completion-skill-example-usage.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -117,7 +117,7 @@ This section supplements the [skill reference](cognitive-search-defining-skillse
117
117
Once the basic framework of your skillset is created and Azure AI services is configured, you can focus on each individual image skill, defining inputs and source context, and mapping outputs to fields in either an index or knowledge store.
118
118
119
119
> [!NOTE]
120
-
> For an example skillset that combines image processing with downstream natural language processing, see [REST Tutorial: Use REST and AI to generate searchable content from Azure blobs](cognitive-search-tutorial-blob.md). It shows how to feed skill imaging output into entity recognition and key phrase extraction.
120
+
> For an example skillset that combines image processing with downstream natural language processing, see [REST Tutorial: Use REST and AI to generate searchable content from Azure blobs](tutorial-skillset.md). It shows how to feed skill imaging output into entity recognition and key phrase extraction.
Copy file name to clipboardExpand all lines: articles/search/cognitive-search-concept-image-scenarios.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -166,7 +166,7 @@ This section supplements the [skill reference](cognitive-search-predefined-skill
166
166
Once the basic framework of your skillset is created and Azure AI services is configured, you can focus on each individual image skill, defining inputs and source context, and mapping outputs to fields in either an index or knowledge store.
167
167
168
168
> [!NOTE]
169
-
> For an example skillset that combines image processing with downstream natural language processing, see [REST Tutorial: Use REST and AI to generate searchable content from Azure blobs](cognitive-search-tutorial-blob.md). It shows how to feed skill imaging output into entity recognition and key phrase extraction.
169
+
> For an example skillset that combines image processing with downstream natural language processing, see [REST Tutorial: Use REST and AI to generate searchable content from Azure blobs](tutorial-skillset.md). It shows how to feed skill imaging output into entity recognition and key phrase extraction.
Copy file name to clipboardExpand all lines: articles/search/includes/tutorials/skillset-csharp.md
+35-31Lines changed: 35 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,25 +1,21 @@
1
1
---
2
-
title: 'Tutorial: Skillsets Using C#'
3
-
titleSuffix: Azure AI Search
4
-
description: Use C# and the Azure SDK for .NET to create skillsets. This skillset applies AI transformations and analyses to create searchable content from images and unstructured text.
# C# Tutorial: Use skillsets to generate searchable content in Azure AI Search
21
-
22
-
Learn how to use the [Azure SDK for .NET](https://www.nuget.org/packages/Azure.Search.Documents/) to create an [AI enrichment pipeline](cognitive-search-concept-intro.md) for content extraction and transformations during indexing.
18
+
Learn how to use the [Azure SDK for .NET](https://www.nuget.org/packages/Azure.Search.Documents/) to create an [AI enrichment pipeline](../../cognitive-search-concept-intro.md) for content extraction and transformations during indexing.
23
19
24
20
Skillsets add AI processing to raw content, making it more uniform and searchable. Once you know how skillsets work, you can support a broad range of transformations, from image analysis to natural language processing to customized processing that you provide externally.
25
21
@@ -35,17 +31,17 @@ In this tutorial, you:
35
31
36
32
This tutorial uses C# and the [**Azure.Search.Documents**](/dotnet/api/overview/azure/search.documents-readme) client library to create a data source, index, indexer, and skillset.
37
33
38
-
The [indexer](search-indexer-overview.md) drives each step in the pipeline, starting with content extraction of sample data (unstructured text and images) in a blob container on Azure Storage.
34
+
The [indexer](../../search-indexer-overview.md) drives each step in the pipeline, starting with content extraction of sample data (unstructured text and images) in a blob container on Azure Storage.
39
35
40
-
Once content is extracted, the [skillset](cognitive-search-working-with-skillsets.md) executes built-in skills from Microsoft to find and extract information. These skills include Optical Character Recognition (OCR) on images, language detection on text, key phrase extraction, and entity recognition (organizations). New information created by the skillset is sent to fields in an [index](search-what-is-an-index.md). Once the index is populated, you can use the fields in queries, facets, and filters.
36
+
Once content is extracted, the [skillset](../../cognitive-search-working-with-skillsets.md) executes built-in skills from Microsoft to find and extract information. These skills include Optical Character Recognition (OCR) on images, language detection on text, key phrase extraction, and entity recognition (organizations). New information created by the skillset is sent to fields in an [index](../../search-what-is-an-index.md). Once the index is populated, you can use the fields in queries, facets, and filters.
41
37
42
38
## Prerequisites
43
39
44
40
+ An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
@@ -78,7 +74,7 @@ Once content is extracted, the [skillset](cognitive-search-working-with-skillset
78
74
79
75
### Azure AI services
80
76
81
-
Built-in AI enrichment is backed by Azure AI services, including Language service and Azure AI Vision for natural language and image processing. For small workloads like this tutorial, you can use the free allocation of 20 transactions per indexer. For larger workloads, [attach an Azure AI Services multi-region resource to a skillset](cognitive-search-attach-cognitive-services.md) for Standard pricing.
77
+
Built-in AI enrichment is backed by Azure AI services, including Language service and Azure AI Vision for natural language and image processing. For small workloads like this tutorial, you can use the free allocation of 20 transactions per indexer. For larger workloads, [attach an Azure AI Services multi-region resource to a skillset](../../cognitive-search-attach-cognitive-services.md) for Standard pricing.
Build and run the solution. Since this is your first request, check the Azure portal to confirm the data source was created in Azure AI Search. On the search service overview page, verify the Data Sources list has a new item. You might need to wait a few minutes for the Azure portal page to refresh.
240
236
241
-

237
+

242
238
243
239
### Step 2: Create a skillset
244
240
245
-
In this section, you define a set of enrichment steps that you want to apply to your data. Each enrichment step is called a *skill* and the set of enrichment steps, a *skillset*. This tutorial uses [built-in skills](cognitive-search-predefined-skills.md) for the skillset:
241
+
In this section, you define a set of enrichment steps that you want to apply to your data. Each enrichment step is called a *skill* and the set of enrichment steps, a *skillset*. This tutorial uses [built-in skills](../../cognitive-search-predefined-skills.md) for the skillset:
246
242
247
-
*[Optical Character Recognition](cognitive-search-skill-ocr.md) to recognize printed and handwritten text in image files.
243
+
*[Optical Character Recognition](../../cognitive-search-skill-ocr.md) to recognize printed and handwritten text in image files.
248
244
249
-
*[Text Merger](cognitive-search-skill-textmerger.md) to consolidate text from a collection of fields into a single "merged content" field.
245
+
*[Text Merger](../../cognitive-search-skill-textmerger.md) to consolidate text from a collection of fields into a single "merged content" field.
250
246
251
-
*[Language Detection](cognitive-search-skill-language-detection.md) to identify the content's language.
247
+
*[Language Detection](../../cognitive-search-skill-language-detection.md) to identify the content's language.
252
248
253
-
*[Entity Recognition](cognitive-search-skill-entity-recognition-v3.md) for extracting the names of organizations from content in the blob container.
249
+
*[Entity Recognition](../../cognitive-search-skill-entity-recognition-v3.md) for extracting the names of organizations from content in the blob container.
254
250
255
-
*[Text Split](cognitive-search-skill-textsplit.md) to break large content into smaller chunks before calling the key phrase extraction skill and the entity recognition skill. Key phrase extraction and entity recognition accept inputs of 50,000 characters or less. A few of the sample files need splitting up to fit within this limit.
251
+
*[Text Split](../../cognitive-search-skill-textsplit.md) to break large content into smaller chunks before calling the key phrase extraction skill and the entity recognition skill. Key phrase extraction and entity recognition accept inputs of 50,000 characters or less. A few of the sample files need splitting up to fit within this limit.
256
252
257
-
*[Key Phrase Extraction](cognitive-search-skill-keyphrases.md) to pull out the top key phrases.
253
+
*[Key Phrase Extraction](../../cognitive-search-skill-keyphrases.md) to pull out the top key phrases.
258
254
259
255
During initial processing, Azure AI Search cracks each document to extract content from different file formats. Text originating in the source file is placed into a generated `content` field, one for each document. As such, set the input as `"/document/content"` to use this text. Image content is placed into a generated `normalized_images` field, specified in a skillset as `/document/normalized_images/*`.
260
256
261
257
Outputs can be mapped to an index, used as input to a downstream skill, or both as is the case with language code. In the index, a language code is useful for filtering. As an input, language code is used by text analysis skills to inform the linguistic rules around word breaking.
262
258
263
-
For more information about skillset fundamentals, see [How to define a skillset](cognitive-search-defining-skillset.md).
259
+
For more information about skillset fundamentals, see [How to define a skillset](../../cognitive-search-defining-skillset.md).
264
260
265
261
### OCR skill
266
262
@@ -635,13 +631,13 @@ To learn more about index concepts, see [Create Index (REST API)](/rest/api/sear
635
631
636
632
### Step 4: Create and run an indexer
637
633
638
-
So far you have created a data source, a skillset, and an index. These three components become part of an [indexer](search-indexer-overview.md) that pulls each piece together into a single multi-phased operation. To tie these together in an indexer, you must define field mappings.
634
+
So far you have created a data source, a skillset, and an index. These three components become part of an [indexer](../../search-indexer-overview.md) that pulls each piece together into a single multi-phased operation. To tie these together in an indexer, you must define field mappings.
639
635
640
636
* The fieldMappings are processed before the skillset, mapping source fields from the data source to target fields in an index. If field names and types are the same at both ends, no mapping is required.
641
637
642
638
* The outputFieldMappings are processed after the skillset, referencing sourceFieldNames that don't exist until document cracking or enrichment creates them. The targetFieldName is a field in an index.
643
639
644
-
In addition to hooking up inputs to outputs, you can also use field mappings to flatten data structures. For more information, see [How to map enriched fields to a searchable index](cognitive-search-output-field-mapping.md).
640
+
In addition to hooking up inputs to outputs, you can also use field mappings to flatten data structures. For more information, see [How to map enriched fields to a searchable index](../../cognitive-search-output-field-mapping.md).
In Azure AI Search tutorial console apps, we typically add a 2-second delay before running queries that return results, but because enrichment takes several minutes to complete, we'll close the console app and use another approach instead.
787
783
788
-
The easiest option is [Search explorer](search-explorer.md) in the Azure portal. You can first run an empty query that returns all documents, or a more targeted search that returns new field content created by the pipeline.
784
+
The easiest option is [Search Explorer](../../search-explorer.md) in the Azure portal. You can first run an empty query that returns all documents, or a more targeted search that returns new field content created by the pipeline.
789
785
790
-
1. In Azure portal, in the search Overview page, select**Indexes**.
786
+
1. In the Azure portal, in the search service pages, expand **Search Management** >**Indexes**.
791
787
792
788
1. Find **`demoindex`** in the list. It should have 14 documents. If the document count is zero, the indexer is either still running or the page hasn't been refreshed yet.
793
789
794
-
1. Select **`demoindex`**. Search explorer is the first tab.
790
+
1. Select **`demoindex`**. Search Explorer is the first tab.
795
791
796
792
1. Content is searchable as soon as the first document is loaded. To verify content exists, run an unspecified query by clicking **Search**. This query returns all currently indexed documents, giving you an idea of what the index contains.
797
793
798
-
1. Next, paste in the following string for more manageable results: `search=*&$select=id, languageCode, organizations`
794
+
1. For more manageable results, switch to JSON view and set parameters to select the fields:
795
+
796
+
```json
797
+
{
798
+
"search": "*",
799
+
"count": true,
800
+
"select": "id, languageCode, organizations"
801
+
}
802
+
```
799
803
800
804
<aname="reset"></a>
801
805
@@ -809,7 +813,7 @@ The sample code for this tutorial checks for existing objects and deletes them s
809
813
810
814
This tutorial demonstrated the basic steps for building an enriched indexing pipeline through the creation of component parts: a data source, skillset, index, and indexer.
811
815
812
-
[Built-in skills](cognitive-search-predefined-skills.md) were introduced, along with skillset definition and the mechanics of chaining skills together through inputs and outputs. You also learned that `outputFieldMappings` in the indexer definition is required for routing enriched values from the pipeline into a searchable index on an Azure AI Search service.
816
+
[Built-in skills](../../cognitive-search-predefined-skills.md) were introduced, along with skillset definition and the mechanics of chaining skills together through inputs and outputs. You also learned that `outputFieldMappings` in the indexer definition is required for routing enriched values from the pipeline into a searchable index on an Azure AI Search service.
813
817
814
818
Finally, you learned how to test results and reset the system for further iterations. You learned that issuing queries against the index returns the output created by the enriched indexing pipeline. You also learned how to check indexer status, and which objects to delete before rerunning a pipeline.
815
819
@@ -824,4 +828,4 @@ You can find and manage resources in the Azure portal, using the All resources o
824
828
Now that you're familiar with all of the objects in an AI enrichment pipeline, let's take a closer look at skillset definitions and individual skills.
825
829
826
830
> [!div class="nextstepaction"]
827
-
> [How to create a skillset](cognitive-search-defining-skillset.md)
831
+
> [How to create a skillset](../../cognitive-search-defining-skillset.md)
0 commit comments