

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# Amazon Augmented AI의 인적 루프 활성화 조건에 대한 JSON 스키마
<a name="a2i-human-fallback-conditions-json-schema"></a>

`HumanLoopActivationConditions`은 [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateFlowDefinition.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateFlowDefinition.html) API의 입력 파라미터입니다. 이 파라미터는 JSON 형식의 문자열입니다. JSON은 통합 AI 서비스 API(예: `Rekognition.DetectModerationLabels` 또는 `Textract.AnalyzeDocument`)의 응답에 대해 이러한 조건을 평가할 때 인적 루프가 생성되는 조건을 모델링합니다. 이 응답을 추론이라고 합니다.** 예를 들어, Amazon Rekognition에서는 연결된 신뢰도 점수와 함께 조절 레이블의 추론을 전송합니다. 이 예제에서 추론은 이미지에 적합한 레이블에 대한 모델의 최적 추정치입니다. Amazon Textract의 경우 추론은 텍스트 블록(키-값 페어) 간의 연결(예: 텍스트 블록 내의 콘텐츠뿐만 아니라 양식에서 `Name:`과 `Sue` 간의 연결) 또는 단어 블록 간의 연결(예: 'Name')에 대해 수행됩니다.****

다음은 JSON에 대한 스키마입니다. 최상위 수준에서 `HumanLoopActivationConditions`에는 JSON 배열, `Conditions`가 있습니다. 이 배열의 각 멤버는 독립적인 조건이며, `true`로 평가되면 Amazon A2I에서 인적 루프가 생성됩니다. 이렇게 독립적인 각 조건은 단순한 조건 또는 복잡한 조건이 될 수 있습니다. 간단한 조건에는 다음과 같은 속성이 포함됩니다.
+ `ConditionType`: 이 속성은 조건의 유형을 식별합니다. Amazon A2I와 통합되는 각각의 AWS AI 서비스 API는 허용되는 자체 `ConditionTypes` 세트를 정의합니다.
  + Rekognition `DetectModerationLabels` - 이 API는 `ModerationLabelConfidenceCheck` 및 `Sampling` `ConditionType` 값을 지원합니다.
  + Textract `AnalyzeDocument` - 이 API는 `ImportantFormKeyConfidenceCheck`, `MissingImportantFormKey`, 및 `Sampling` `ConditionType` 값을 지원합니다.
+ `ConditionParameters` - 이는 조건을 파라미터화하는 JSON 객체입니다. 이 객체의 허용되는 속성 집합은 `ConditionType`의 값에 따라 달라집니다. 각 `ConditionType`은 자체 `ConditionParameters` 집합을 정의합니다.

`Conditions` 배열의 멤버는 복잡한 조건을 모델링할 수 있습니다. 이 작업은 `And` 및 `Or` 논리 연산자를 사용하여 단순 조건을 논리적으로 연결하고 토대가 되는 단순 조건을 중첩하여 수행됩니다. 최대 두 단계의 중첩이 지원됩니다.

```
{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "definitions": {
        "Condition": {
            "type": "object",
            "properties": {
                "ConditionType": {
                    "type": "string"
                },
                "ConditionParameters": {
                    "type": "object"
                }
            },
            "required": [
                "ConditionType"
            ]
        },
        "OrConditionArray": {
            "type": "object",
            "properties": {
                "Or": {
                    "type": "array",
                    "minItems": 2,
                    "items": {
                        "$ref": "#/definitions/ComplexCondition"
                    }
                }
            }
        },
        "AndConditionArray": {
            "type": "object",
            "properties": {
                "And": {
                    "type": "array",
                    "minItems": 2,
                    "items": {
                        "$ref": "#/definitions/ComplexCondition"
                    }
                }
            }
        },
        "ComplexCondition": {
            "anyOf": [
                {
                    "$ref": "#/definitions/Condition"
                },
                {
                    "$ref": "#/definitions/OrConditionArray"
                },
                {
                    "$ref": "#/definitions/AndConditionArray"
                }
            ]
        }
    },
    "type": "object",
    "properties": {
        "Conditions": {
            "type": "array",
            "items": {
                "$ref": "#/definitions/ComplexCondition"
            }
        }
    }
}
```

**참고**  
사용자 지정 작업 유형에 통합된 인적 검토 워크플로에는 인적 루프 활성화 조건을 사용할 수 없습니다. `HumanLoopActivationConditions` 파라미터는 사용자 지정 작업 유형에 대해 비활성화됩니다.

**Topics**
+ [Amazon Textract의 인적 루프 활성화 조건 JSON 스키마 사용](a2i-json-humantaskactivationconditions-textract-example.md)
+ [Amazon Rekognition의 인적 루프 활성화 조건 JSON 스키마 사용](a2i-json-humantaskactivationconditions-rekognition-example.md)