Skip to content

Commit 79eba16

Browse files
committed
Debug session concept and how-to
1 parent 860e816 commit 79eba16

11 files changed

+102
-87
lines changed

articles/search/cognitive-search-debug-session.md

Lines changed: 37 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Debug Sessions concepts
33
titleSuffix: Azure AI Search
4-
description: Debug Sessions, accessed through the Azure portal, provides an IDE-like environment where you can identify and fix errors, validate changes, and push changes to skillsets in an enrichment pipeline.
4+
description: Debug Sessions, accessed through the Azure portal, provides an IDE-like environment where you can identify and fix errors, validate changes, and push changes to skillsets in an Azure AI Search enrichment pipeline.
55

66
manager: nitinme
77
author: HeidiSteen
@@ -10,73 +10,76 @@ ms.service: cognitive-search
1010
ms.custom:
1111
- ignite-2023
1212
ms.topic: conceptual
13-
ms.date: 07/24/2024
13+
ms.date: 08/20/2024
1414
---
1515

1616
# Debug Sessions in Azure AI Search
1717

1818
Debug Sessions is a visual editor that works with an existing skillset in the Azure portal, exposing the structure and content of a single enriched document as it's produced by an indexer and skillset for the duration of the session. Because you're working with a live document, the session is interactive - you can identify errors, modify and invoke skill execution, and validate the results in real time. If your changes resolve the problem, you can commit them to a published skillset to apply the fixes globally.
1919

20-
This article explains how the editor is organized. Tabs and sections of the editor unpack different layers of the skillset so that you can examine skillset structure, flow, and the content it generates at run time.
20+
This article explains supported scenarios and how the editor is organized. Tabs and sections of the editor unpack different layers of the skillset so that you can examine skillset structure, flow, and the content it generates at run time.
2121

22-
## How a debug session works
22+
## Supported scenarios
2323

24-
When you start a session, the search service creates a copy of the skillset, indexer, and a data source containing a single document used to test the skillset. All session state is saved to a new blob container created by the Azure AI Search service in an Azure Storage account that you provide. The name of the generated container has a prefix of `ms-az-cognitive-search-debugsession`. The prefix is required because it mitigates the chance of accidentally exporting session data to another container in your account.
24+
+ Built-in skills for [AI enrichment](cognitive-search-concept-intro.md) (OCR, image analysis, Entity Recognition, Sentiment Analysis, Keyword Extraction)
2525

26-
A cached copy of the enriched document and skillset is loaded into the visual editor so that you can inspect the content and metadata of the enriched document, with the ability to check each document node and edit any aspect of the skillset definition. Any changes made within the session are cached. Those changes won't affect the published skillset unless you commit them. Committing changes will overwrite the production skillset.
26+
+ Built-in skills for [integrated vectorization](vector-search-integrated-vectorization.md), with data chunking through Text Split, and vectorization through an embedding skill
2727

28-
If the enrichment pipeline doesn't have any errors, a debug session can be used to incrementally enrich a document, test and validate each change before committing the changes.
28+
+ Custom skills used to integrate external processing that you provide.
2929

30-
## AI Enrichments tab > Skill Graph
30+
Compare the following images for the first two scenarios. Skills for applied AI enrichment can run sequentially or in parallel if there are no dependencies. Output field mappings send enriched or generated content from in-memory data structures to fields in an index.
3131

32-
The visual editor is organized into tabs and panes. This section introduces the components of the visual editor.
32+
:::image type="content" source="media/cognitive-search-debug/debug-session-flow-applied-ai.png" alt-text="Screenshot of a debug session for OCR and image analysis." lightbox="media/cognitive-search-debug/debug-session-flow-applied-ai.png":::
3333

34-
The **Skill Graph** provides a visual hierarchy of the skillset and its order of execution from top to bottom. Skills that are dependent upon the output of other skills are positioned lower in the graph. Skills at the same level in the hierarchy can execute in parallel. Color coded labels of skills in the graph indicate the types of skills that are being executed in the skillset (TEXT or VISION).
34+
Skills for integrated vectorization typically include Text Split and embeddings. A Text Split skills chunks a document into pages. Projection mappings control parent-chunk indexing. This skillset skips the parent index and creates an index with just chunked content, using metadata to identify the source of the chunk.
3535

36-
The **Skill Graph** is where you select which skill to debug or enhance. The details pane to the right is where you edit and explore.
36+
:::image type="content" source="media/cognitive-search-debug/debug-session-flow-integrated-vectorization.png" alt-text="Screenshot of a debug session for integrated vectorization." lightbox="media/cognitive-search-debug/debug-session-flow-integrated-vectorization.png":::
3737

38-
:::image type="content" source="media/cognitive-search-debug/skills-graph.png" alt-text="Screenshot of Skills Graph tab." border="true":::
38+
## Limitations
3939

40-
### Skill details pane
40+
Debug sessions work with all generally available [indexer data sources](search-data-sources-gallery.md) and most preview data sources, with the following exceptions:
41+
42+
+ SharePoint Online indexer.
4143

42-
Skill details are presented in a tabbed layout and include the following areas:
44+
+ Azure Cosmos DB for MongoDB indexer.
4345

44-
+ **Skill Settings**: a formatted version of the skill definition.
45-
+ **Skill JSON Editor**: the raw JSON document of the definition.
46-
+ **Executions**: the data corresponding to each time a skill was executed.
47-
+ **Errors and warnings**: the messages generated upon session start or refresh.
46+
+ For the Azure Cosmos DB for NoSQL, if a row fails during index and there's no corresponding metadata, the debug session might not pick the correct row.
4847

49-
On Executions or Skill Settings, select the **`</>`** symbol to open the [**Expression Evaluator**](#expression-evaluator) used for viewing and editing the expressions of the skills inputs and outputs.
48+
+ For the SQL API of Azure Cosmos DB, if a partitioned collection was previously non-partitioned, the debug session won't find the document.
5049

51-
Nested input controls in Skill Settings can be used to build complex shapes for [projections](knowledge-store-projection-overview.md), [output field mappings](cognitive-search-output-field-mapping.md) for a complex type field, or an input to a skill. When used with the Expression Evaluator, nested inputs provide an easy test and validate expression builder.
50+
+ For custom skills, a user-assigned managed identity isn't supported for a debug session connection to Azure Storage. As stated in the prerequisites, you can use a system managed identity, or specify a full access connection string that includes a key. For more information, see [Connect a search service to other Azure resources using a managed identity](search-howto-managed-identities-data-sources.md).
5251

53-
### Executions pane
52+
## How a debug session works
5453

55-
A skill can execute multiple times in a skillset for a single document. For example, the OCR skill executes once for each image extracted from a single document. The Executions pane displays the skill's execution history providing a deeper look into each invocation of the skill.
54+
When you start a session, the search service creates a copy of the skillset, indexer, and a data source containing a single document used to test the skillset. All session state is saved to a new blob container created by the Azure AI Search service in an Azure Storage account that you provide. The name of the generated container has a prefix of `ms-az-cognitive-search-debugsession`. The prefix is required because it mitigates the chance of accidentally exporting session data to another container in your account.
5655

57-
The execution history enables tracking a specific enrichment back to the skill that generated it. Clicking on a skill input navigates to the skill that generated that input, providing a stack-trace like feature. This allows identification of the root cause of a problem that might manifest in a downstream skill.
56+
A cached copy of the enriched document and skillset is loaded into the visual editor so that you can inspect the content and metadata of the enriched document, with the ability to check each document node and edit any aspect of the skillset definition. Any changes made within the session are cached. Those changes won't affect the published skillset unless you commit them. Committing changes will overwrite the production skillset.
5857

59-
When you debug an error with a custom skill, there's the option to generate a request for a skill invocation in the execution history.
58+
If the enrichment pipeline doesn't have any errors, a debug session can be used to incrementally enrich a document, test and validate each change before committing the changes.
6059

61-
## AI Enrichments tab > Enriched Data Structure
60+
## Debug session layout
6261

63-
The **Enriched Data Structure** pane shows the document's enrichments through the skillset, detailing the context for each enrichment and the originating skill. The Expression Evaluator can also be used to view the contents for each enrichment.
62+
The visual editor is organized into a surface area showing a progression of operations, starting with document cracking, followed by skills, mappings, and an index.
6463

65-
> :::image type="content" source="media/cognitive-search-debug/enriched-data-structure-display.png" alt-text="Screenshot of Enriched Data Structure tab.":::
64+
Select any skill or mapping, and a pane opens to side showing relevant information.
6665

67-
## Expression Evaluator
66+
:::image type="content" source="media/cognitive-search-debug/debug-session-skills-pane.png" lightbox="media/cognitive-search-debug/debug-sessions-skills-pane.png" alt-text="Screenshot showing a skill details pane with drilldown for more information.":::
6867

69-
**Expression Evaluator** shows the executable elements of the kil. It allows for editing the path and testing the results before updating any of the inputs or context for a skill or projection.
68+
Follow the links to drill further into skills processing. For example, the following screenshot shows the output of the first iteration of the Text Split skill.
7069

71-
You can open the evaluator from any node or element that shows the **`</>`** symbol, including parts of a dependency graph or nodes in an enrichment tree.
70+
:::image type="content" source="media/cognitive-search-debug/debug-session-skills-detail-expression-evaluator.png" lightbox="media/cognitive-search-debug/debug-session-skills-detail-expression-evaluator.png" alt-text="Screenshot showing a skill details pane with Expression Evaluator for a given output.":::
7271

73-
Expression Evaluator gives you full interactive access for testing skill context, inputs, and checking outputs.
72+
### Skill details pane
7473

75-
:::image type="content" source="media/cognitive-search-debug/expression-evaluator.png" alt-text="Screenshot of Expression Evaluator.":::
74+
Skill details have the following sections.
7675

77-
## Limitations
76+
+ **Iterations**: Show you how many times a skill executes. You can check the inputs and outputs of each one.
77+
+ **Skill Settings**: View or edit the JSON skillset definition.
78+
+ **Errors and warnings**: Shows the errors or warnings specific to this skill.
79+
80+
## Enriched Data Structure
7881

79-
Debug sessions feature doesn't support [SharePoint Online indexer](search-howto-index-sharepoint-online.md).
82+
The **Enriched Data Structure** pane slides out to the side when you select the blue show or hide arrow symbol. It's human readable representation of what the enriched document contains. Previous screenshots in this article show examples of the enriched data structure.
8083

8184
## Next steps
8285

0 commit comments

Comments
 (0)