---
schema_version: "1"
id: 799093981ae133ed0f29309b42cdd922b32e8dc8c8171120120f44c34d22665b
title: モデレーション操作の設定
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/mulesoft-inference-connector/1.0/configuring-moderation-operations.md
canonical_url: https://docs.mulesoft.com/jp/mulesoft-inference-connector/1.0/configuring-moderation-operations
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 2dd23b704ea071dea5f47337c5673c972c97943bdc192bc8cd5d65c2d6c33231
description: MuleSoft Documentation Site
release: "1.0"
latest: true
---
# モデレーション操作の設定

**\[Toxicity\] Detection by Text**​ 操作を設定します。

## [](#toxicity-detection-by-text-操作の設定)Toxicity Detection by Text 操作の設定

**\[Toxicity\] Detection by Text**​ 操作では、ユーザーまたは LLM による有害コンテンツを分類してスコア付けします。

**\[Toxicity\] Detection by Text**​ 操作を次のようなさまざまなシナリオで適用します。

- **有害な入力の検出**
    
    ユーザーによる有害な入力を検出してブロックし、LLM に送信しないようにします。
- **有害な応答の検出**
    
    ユーザーにより有害または攻撃的とみなされる可能性がある LLM 応答を除外します。

**\[Toxicity\] Detection by Text**​ 操作を設定する手順は、次のとおりです。

Unresolved include directive in modules/ROOT/pages/configuring-moderation-operations.adoc - include::connectors::partial$t-configure-operations.adoc\[\] \* **Text (テキスト)**

\+ 有害なコンテンツがないかを確認するテキスト。

この操作の XML を次に示します。

```xml
<ms-inference:toxicity-detection-text
  doc:name="Toxicity detection text"
  doc:id="b5770a5b-d3f9-47ba-acec-ab0bd41e4188"
  config-ref="OpenAIConfig">
    <ms-inference:text>
      <![CDATA[You are fat]]>
    </ms-inference:text>
</ms-inference:toxicity-detection-text>
```

### [](#出力設定)出力設定

この操作の応答には、有害検出および評価を含む JSON ペイロードが含まれます。応答の例を次に示します。

```json
{
  "payload": {
    "flagged": true,
    "categories": [
      {
        "illicit/violent": 0.0000025466403947055455,
        "self-harm/instructions": 0.00023480495744356635,
        "harassment": 0.9798945372458964,
        "violence/graphic": 0.000005920916517463734,
        "illicit": 0.000013552078562406772,
        "self-harm/intent": 0.0002233150331012493,
        "hate/threatening": 0.0000012029639084557005,
        "sexual/minors": 0.0000024300240743279605,
        "harassment/threatening": 0.0007499928075102617,
        "hate": 0.00720390551996062,
        "self-harm": 0.0004822186797755494,
        "sexual": 0.00012644219446392274,
        "violence": 0.0004960569708019355
      }
    ]
  }
}
```

## [](#関連情報)関連情報

- [MuleSoft Inference Connector の概要](https://docs.mulesoft.com/jp/mulesoft-inference-connector/1.0/)
- [MuleSoft Inference Connector リファレンス](https://docs.mulesoft.com/jp/mulesoft-inference-connector/1.0/mulesoft-inference-connector-reference)
- [MuleSoft ヘルプセンター](https://help.mulesoft.com)