---
schema_version: "1"
id: 1429313aec3f0976a44ed80eb915c09e860b84bb3374a708153dbad343b890de
title: Einstein AI Connector 1.2 のエージェント操作の設定
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/einstein-ai-connector/1.2/configuring-agent-operations.md
canonical_url: https://docs.mulesoft.com/jp/einstein-ai-connector/1.2/configuring-agent-operations
source_site: docs.mulesoft.com
content_type: documentation
content_hash: e08d873d165843099f3e31bbce51476b56680acf62597569f0e656a2728c6143
description: MuleSoft Documentation Site
release: "1.2"
latest: true
---
# Einstein AI Connector 1.2 のエージェント操作の設定

## [](#agent-define-prompt-template-操作の設定)Agent Define Prompt Template 操作の設定

**Agent define prompt template**​ 操作を使用して、任意の LLM と統合する場合に使用する特定のプロンプトテンプレートを定義します。これにより、応答を生成したり、情報を抽出したり、他のプロンプトを呼び出したり、テキストベースのタスクを実行したりする自然言語プロンプトを作成できます。

Unresolved include directive in modules/ROOT/pages/configuring-agent-operations.adoc - include::connectors::partial$t-configure-operations.adoc\[\] \* **Template (テンプレート)**

\+ 操作のプロンプトテンプレートを入力します。 \* **Instructions (手順)**

\+ タスクの目標の概要を説明する手順を LLM に提供します。 \* **Dataset (データセット)**

\+ 指定したテンプレートと手順を使用して評価する LLM のデータセットを指定します。 Unresolved include directive in modules/ROOT/pages/configuring-agent-operations.adoc - include::connectors::partial$einstein-ai-chat-config-properties-partial.adoc\[\]

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

```xml
<ms-einstein-ai:agent-define-prompt-template
  doc:name="Agent define prompt template"
  doc:id="f1c29c39-eac9-468c-9c46-4109a66303ec"
  config-ref="Einstein_AI"
  template="#[payload.template]"
  instructions="#[payload.instructions]"
  dataset="#[payload.dataset]"
/>
```

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

この操作の応答には、メイン LLM 応答を含む JSON ペイロードが含まれます。また、トークン利用状況などの属性がメインペイロード内ではなくメタデータ (属性) の一部として含まれます。この追加のメタデータは、アプリケーション全体でトークン利用状況を追跡したり、LLM の採用に関連付けられるコストを管理したりするのに特に役立ちます。

応答の例を次に示します。

```json
{
  "response": "{\n  \"type\": \"positive\",\n  \"response\": \"Thank you for your positive feedback on the training last week. We are glad to hear that you had a great experience. Have a nice day!\"\n}"
}
```

この操作では、メイン JSON ペイロード内に含まれない属性も返されます。これには、トークン利用状況に関する情報が含まれます。次に例を示します。

```json
{
  "tokenUsage": {
      "outputCount": 9,
      "totalCount": 18,
      "inputCount": 9
  },
  "additionalAttributes": {}
}
```

- `tokenUsage`
    
    属性として返されるトークン利用状況メタデータ
- `outputCount`
    
    出力の生成で使用されたトークン数
- `totalCount`
    
    入力と出力で使用されたトークンの合計数
- `inputCount`
    
    入力の処理で使用されたトークン数

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

- [Using Anypoint Code Builder to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-acb)
- [Studio を使用したコネクタの設定](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio)
- [Einstein AI Connector リファレンス](https://docs.mulesoft.com/jp/einstein-ai-connector/1.2/einstein-ai-connector-reference)
- [Einstein AI - 追加設定情報](https://docs.mulesoft.com/jp/einstein-ai-connector/1.2/einstein-ai-additional-config)
- [MuleSoft ヘルプセンター](https://help.mulesoft.com)