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/cognitive-search-how-to-debug-skillset.md
+46-15Lines changed: 46 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,11 @@ Debug sessions work with all generally available data sources and most preview d
40
40
41
41
1. Select the indexer that drives the skillset you want to debug. Copies of both the indexer and skillset are used to create the session.
42
42
43
-
1. Choose a document. The session will default to the first document in the data source, but you can also choose which document to step through.
43
+
1. Choose a document. The session will default to the first document in the data source, but you can also choose which document to step through.
44
+
45
+
If your document resides in a blob container in the same storage account used to cache your debug session, you can copy the document URL from the blob property page in the portal.
46
+
47
+
:::image type="content" source="media/cognitive-search-debug/copy-blob-url.png" alt-text="Screenshot of the URI property in blob storage." border="true":::
44
48
45
49
1. Optionally, specify any indexer execution settings that should be used to create the session. Any indexer options that you specify in a debug session have no effect on the indexer itself.
46
50
@@ -52,33 +56,39 @@ The debug session begins by executing the indexer and skillset on the selected d
52
56
53
57
## Start with errors and warnings
54
58
55
-
Indexer execution history in the portal gives you the full error and warning list for all documents. In a debug session, the errors and warnings will be limited to one document. As a best practice, resolve problems with inputs before moving on to outputs.
59
+
Indexer execution history in the portal gives you the full error and warning list for all documents. In a debug session, the errors and warnings will be limited to one document. You'll work through this list, make your changes, and then return to the list to verify whether issues are resolved.
60
+
61
+
To view the messages, select a skill in **AI Enrichment > Skill Graph** and then select **Errors/Warnings** in the details pane.
62
+
63
+
As a best practice, resolve problems with inputs before moving on to outputs.
56
64
57
-
To determine whether a modification resolves an error, follow these steps:
65
+
To prove whether a modification resolves an error, follow these steps:
58
66
59
67
1. Select **Save** in Skill Details to preserve your changes.
60
68
61
69
1. Select **Run** in the session window to invoke skillset execution using the modified definition.
62
70
63
-
1. Return to **Errors and warnings** to see if the count is reduced. The list is not refreshed until you open the tab.
71
+
1. Return to **Errors/Warnings** to see if the count is reduced. The list will not be refreshed until you open the tab.
64
72
65
-
## Check field mappings
73
+
## View content of enrichment nodes
74
+
75
+
AI enrichment pipelines extract or infer information and structure from source documents, creating an enriched document in the process. An enriched document is first created during document cracking and populated with a root node (`/document`) plus nodes for any content that is directly ported from the data source (such as a document key) and metadata. Additional nodes are created by skills during skill execution, where each skill output adds a new node to the enrichment tree.
66
76
67
-
If you're missing output, check the field mappings that specify how content moves out of the pipeline and into a search index.
77
+
Enriched documents are internal, but a debug session gives you access to the content produced during skill execution. To view the content or output of each skill, follow these steps:
68
78
69
79
1. Start with the default views: **AI enrichment > Skill Graph**, with the graph type set to **Dependency Graph**.
70
80
71
-
1. Select **Field Mappings** near the top. You should find at least the document key that uniquely identifies and associates each search document in the search index with it's source document in the data source.
81
+
1. Select a skill.
72
82
73
-
If you are importing raw content straight from the data source, bypassing enrichment, you should find those fields in **Field Mappings**.
83
+
1. In the details pane to the right, select **Executions**, select an OUTPUT, and then open the Expression Evaluator (**`</>`**) to view the expression and it's result.
74
84
75
-
1. Select **Output Field Mappings** at the bottom of the graph. Here you will find mappings from skill outputs to target fields in the search index. Unless you used the Import Data wizard, output field mappings are defined manually and could be incomplete or mistyped.
85
+
:::image type="content" source="media/cognitive-search-debug/enriched-doc-output-expression.png" alt-text="Screenshot of a skill execution showing output values." border="true":::
76
86
77
-
Verify that the fields in **Output Field Mappings** exist in the search index as specified, checking for spelling and [enrichment node path syntax](cognitive-search-concept-annotations-syntax.md).
87
+
1. Alternatively, open **AI enrichment > Enriched Data Structure** to scroll down the list of nodes. The list includes potential and actual nodes, with a column for output, and another column that indicates the upstream object used to produce the output.
78
88
79
-
:::image type="content" source="media/cognitive-search-debug/output-field-mappings.png" alt-text="Screenshot of the Output Field Mappings node and details." border="true":::
If the field mappings are correct, check individual skills for configuration and content. If a skill fails to produce output, it might be missing a property or parameter, which can be determined through error and validation messages.
84
94
@@ -88,11 +98,32 @@ The following steps show you how to get information about a skill.
88
98
89
99
1. In **AI enrichment > Skill Graph**, select a skill. The Skill Details pane opens to the right.
90
100
91
-
1.Select **Executions** to show which inputs and outputs were used during skill execution.
101
+
1.Edit a skill definition using either approach:
92
102
93
-
:::image type="content" source="media/cognitive-search-debug/skill-input-output-detection.png" alt-text="Screenshot of Skill graph, details, and execution tab inputs and outputs." border="true":::
103
+
+**Skill Settings** if you prefer a visual editor
104
+
+**Skill JSON Editor** to edit the JSON document directly
94
105
95
-
1. Select **`</>`** Expression Evaluator to show the values returned by the skill.
106
+
1. Check the [path syntax for referencing nodes](cognitive-search-concept-annotations-syntax.md) in an enrichment tree. Inputs are usually one of the following:
107
+
108
+
+`/document/content` for chunks of text. This node is populated from the blob's content property.
109
+
+`/document/merged_content` for chunks of text in skillets that include Text Merge skill.
110
+
+`/document/normalized_images/*` for text that is recognized or inferred from images.
111
+
112
+
## Check field mappings
113
+
114
+
If skills produce output but the search index is empty, check the field mappings that specify how content moves out of the pipeline and into a search index.
115
+
116
+
1. Start with the default views: **AI enrichment > Skill Graph**, with the graph type set to **Dependency Graph**.
117
+
118
+
1. Select **Field Mappings** near the top. You should find at least the document key that uniquely identifies and associates each search document in the search index with it's source document in the data source.
119
+
120
+
If you are importing raw content straight from the data source, bypassing enrichment, you should find those fields in **Field Mappings**.
121
+
122
+
1. Select **Output Field Mappings** at the bottom of the graph. Here you will find mappings from skill outputs to target fields in the search index. Unless you used the Import Data wizard, output field mappings are defined manually and could be incomplete or mistyped.
123
+
124
+
Verify that the fields in **Output Field Mappings** exist in the search index as specified, checking for spelling and [enrichment node path syntax](cognitive-search-concept-annotations-syntax.md).
125
+
126
+
:::image type="content" source="media/cognitive-search-debug/output-field-mappings.png" alt-text="Screenshot of the Output Field Mappings node and details." border="true":::
0 commit comments