構造化された出力のためにUI Agentsにプロンプトを与える例。

目標で必要な出力構造を定義してください。

例1:エージェントに出力構造を自分で決定させます。
Create a new invoice with the data: <data>. Return the Reference Number as a JSON.

例2:プロンプト内でスキーマを指定すると、エージェントがそれに従って出力をフォーマットします。
Open the product pricing page for “Pro Plan” in the web app. Extract pricing into the JSON schema below.
{
  "plan_name": "",  
  "currency": "", 
  "price": {  
    "monthly": "", 
    "annual": ""  
  },  
  "included_limits": [    
    {"name": "",   "value": ""}
  ]
}

例 3: 実行 アクションでフォーマット出力データ型を指定します。
Goal: get current weather in San Francisco
Output format JSON: {"temperature": "int", "unit": "str", "rain": "bool"}
注: 出力形式の JSON は、ネストされた JSON 構造をサポートしていません。