現在表示中:Foundry (クラシック) ポータルのバージョン - 新しい Foundry ポータルのバージョンに切り替える
Note
Microsoft Foundry SDK for evaluation および Foundry ポータルはパブリック プレビュー段階ですが、API はモデルとデータセットの評価に一般提供されています (エージェントの評価はパブリック プレビューのままです)。 この記事でマークされている Azure AI Evaluation SDK とエバリュエーター (プレビュー) は、現在、あらゆる場所でパブリック プレビュー段階にあります。
エージェントは強力な生産性向上のアシスタントです。 彼らは計画を立て、意思決定を行い、行動を実行します。 エージェントは通常、 会話の中でユーザーの意図を推理し、ユーザーの要求を満たす ための適切なツールを選択し 、指示に従って タスクを完了 します。 Microsoft Foundryは、エージェント固有のエバリューエーターをエージェント型ワークフロー向けにサポートしています:
Azure AI agents の評価
エージェントはメッセージを発信し、入力を提供するには通常、これらのメッセージを解析して関連情報を抽出する必要があります。 Azure AI Agent Serviceを使ってエージェントを構築する場合、このサービスは評価用のネイティブ統合を提供し、エージェントのメッセージを直接受け取ります。 例としては 「AIエージェントの評価」を参照してください。
エージェント型ワークフローに特有の IntentResolution、 ToolCallAccuracy、 TaskAdherenceに加え、包括的な組み込み評価ツール群を使ってこれらのワークフローの品質や安全性の側面も評価できます。 Foundryは当社のコンバーターからAzure AIエージェントメッセージの評価者リストをサポートしています:
-
品質:
IntentResolution、ToolCallAccuracy、TaskAdherence、Relevance、Coherence、そしてFluency -
安全:
CodeVulnerabilities、Violence、Self-harm、Sexual、HateUnfairness、IndirectAttack、そしてProtectedMaterials
この記事では、 IntentResolution、 ToolCallAccuracy、 TaskAdherenceの例を掲載しています。 Azure AIエージェントメッセージを持つ他の評価者の例については、評価Azure AIエージェントを参照してください。
AI支援評価者向けモデル構成
参考までに、以下のコードスニペットでは、AI支援評価者は大規模言語モデルジャッジ(LLM-judge)のモデル構成を使用しています。
import os
from azure.ai.evaluation import AzureOpenAIModelConfiguration
from dotenv import load_dotenv
load_dotenv()
model_config = AzureOpenAIModelConfiguration(
azure_endpoint=os.environ["AZURE_ENDPOINT"],
api_key=os.environ.get("AZURE_API_KEY"),
azure_deployment=os.environ.get("AZURE_DEPLOYMENT_NAME"),
api_version=os.environ.get("AZURE_API_VERSION"),
)
評価モデルのサポート
Azure AIエージェントサービスは、評価者に応じてLLM審査員向けにAzureOpenAIまたはOpenAI
| Evaluators | 審判モデルとしての推論モデル(例:Azure OpenAI / OpenAIのoシリーズモデル) | 非推論モデルを裁判官として使う(例:gpt-4.1 または gpt-4o) | To enable |
|---|---|---|---|
IntentResolution、 TaskAdherence、 ToolCallAccuracy、 ResponseCompleteness、 Coherence、 Fluency、 Similarity、 Groundedness、 Retrieval、 Relevance |
Supported | Supported | エッサリュエーターを初期化する際、追加のパラメータを is_reasoning_model=True 設定してください |
| Other evaluators | Not Supported | Supported | -- |
洗練された推論を必要とする複雑な評価には、推論性能とコスト効率のバランスを取った強力な推論モデル( 4.1-mini )を用いましょう。
Intent resolution
IntentResolutionEvaluator システムがユーザーの要求をどれだけ正確に識別し理解しているかを測定します。 この理解には、ユーザーの意図をどれだけ正確に把握し、明確化のための質問をし、エンドユーザーにその能力範囲を思い出させるかが含まれます。 スコアが高いほど、ユーザーの意図をより正確に特定できることを示します。
意図解決例
from azure.ai.evaluation import IntentResolutionEvaluator
intent_resolution = IntentResolutionEvaluator(model_config=model_config, threshold=3)
intent_resolution(
query="What are the opening hours of the Eiffel Tower?",
response="Opening hours of the Eiffel Tower are 9:00 AM to 11:00 PM."
)
意図分解能出力
数値スコアはリッカート尺度(整数1から5)を用いており、スコアが高いほど良いです。 数値的な閾値(デフォルトは3)が与えられた場合、評価者はスコアが閾値以上であれば 合格 とされ、そうでなければ 不合格 となります。 理由やその他のフィールドを使うことで、なぜスコアが高いのか低いのかを理解するのに役立ちます。
{
"intent_resolution": 5,
"intent_resolution_result": "pass",
"intent_resolution_threshold": 3,
"intent_resolution_reason": "The response provides the opening hours of the Eiffel Tower clearly and accurately, directly addressing the user's query. It includes specific times, which fully resolves the user's request for information about the opening hours.",
}
Foundry Agent Service外でエージェントを構築する場合、このエッシュエーターはエージェントメッセージに典型的なスキーマを受け入れます。 サンプルノートブックを探求するには、意図 解決(Intent Resolution)をご覧ください。
ツールコール精度
ToolCallAccuracyEvaluator エージェントが実行中に行うツールコールの正確性と効率を測定します。 以下に基づいて1から5までのスコアが示されます:
- 使用されたツールの関連性と有用性
- ツールコールで使用されるパラメータの正確性
- 欠席または過剰な通話回数
ツール呼び出し評価のサポート
ToolCallAccuracyEvaluator 以下のツールに対してエージェントサービスでの評価をサポートします:
- File Search
- Azure AI 検索
- Bing Grounding
- Bing Custom Search
- SharePoint Grounding
- Code Interpreter
- Fabric データ エージェント
- OpenAPI
- 関数ツール (ユーザー定義ツール)
エージェント実行でサポートされていないツールが使用された場合、評価者は パス を出力し、ツールの評価はサポートされていないことを説明します。 このアプローチにより、これらのケースを簡単に除外できます。 評価を可能にするために、サポートされていないツールをユーザー定義ツールとしてラップすることを推奨します。
ツールコール精度の例
from azure.ai.evaluation import ToolCallAccuracyEvaluator
tool_call_accuracy = ToolCallAccuracyEvaluator(model_config=model_config, threshold=3)
# provide the agent response with tool calls
tool_call_accuracy(
query="What timezone corresponds to 41.8781,-87.6298?",
response=[
{
"createdAt": "2025-04-25T23:55:52Z",
"run_id": "run_DmnhUGqYd1vCBolcjjODVitB",
"role": "assistant",
"content": [
{
"type": "tool_call",
"tool_call_id": "call_qi2ug31JqzDuLy7zF5uiMbGU",
"name": "azure_maps_timezone",
"arguments": {
"lat": 41.878100000000003,
"lon": -87.629800000000003
}
}
]
},
{
"createdAt": "2025-04-25T23:55:54Z",
"run_id": "run_DmnhUGqYd1vCBolcjjODVitB",
"tool_call_id": "call_qi2ug31JqzDuLy7zF5uiMbGU",
"role": "tool",
"content": [
{
"type": "tool_result",
"tool_result": {
"ianaId": "America/Chicago",
"utcOffset": None,
"abbreviation": None,
"isDaylightSavingTime": None
}
}
]
},
{
"createdAt": "2025-04-25T23:55:55Z",
"run_id": "run_DmnhUGqYd1vCBolcjjODVitB",
"role": "assistant",
"content": [
{
"type": "text",
"text": "The timezone for the coordinates 41.8781, -87.6298 is America/Chicago."
}
]
}
],
tool_definitions=[
{
"name": "azure_maps_timezone",
"description": "local time zone information for a given latitude and longitude.",
"parameters": {
"type": "object",
"properties": {
"lat": {
"type": "float",
"description": "The latitude of the location."
},
"lon": {
"type": "float",
"description": "The longitude of the location."
}
}
}
}
]
)
# alternatively, provide the tool calls directly without the full agent response
tool_call_accuracy(
query="How is the weather in Seattle?",
tool_calls=[{
"type": "tool_call",
"tool_call_id": "call_CUdbkBfvVBla2YP3p24uhElJ",
"name": "fetch_weather",
"arguments": {
"location": "Seattle"
}
}],
tool_definitions=[{
"id": "fetch_weather",
"name": "fetch_weather",
"description": "Fetches the weather information for the specified location.",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "The location to fetch weather for."
}
}
}
}
]
)
ツールコール精度の出力
数値スコアはリッカートスケール(整数1から5)で行われます。 スコアが高いほど良いです。 数値の閾値(デフォルトは3)が与えられた場合、評価者はスコアが>=閾値なら合格、そうでなければ失敗も出力します。 理由やツールコールの詳細フィールドを使って、なぜスコアが高いのか低いのかを理解しましょう。
{
"tool_call_accuracy": 5,
"tool_call_accuracy_result": "pass",
"tool_call_accuracy_threshold": 3,
"details": {
"tool_calls_made_by_agent": 1,
"correct_tool_calls_made_by_agent": 1,
"per_tool_call_details": [
{
"tool_name": "fetch_weather",
"total_calls_required": 1,
"correct_calls_made_by_agent": 1,
"correct_tool_percentage": 100%,
"tool_call_errors": 0,
"tool_call_success_result": "pass"
}
],
"excess_tool_calls": {
"total": 0,
"details": []
},
"missing_tool_calls": {
"total": 0,
"details": []
}
}
}
Azure AI Agent Serviceの外でエージェントを構築する場合、このエバリューエーターはエージェントメッセージに典型的なスキーマを受け入れます。 サンプルノートについては 「ツールコールの正確さ」を参照してください。
Task adherence
エージェントシステムなどのタスク指向AIシステムでは、エージェントが非効率的または範囲外のステップを踏むのではなく、タスクを完了する軌道を維持しているかどうかを評価することが重要です。
TaskAdherenceEvaluator エージェントの応答が割り当てられたタスクにどれだけ適合しているかを測定し、タスク指示や利用可能なツールに基づいています。 タスク命令はシステムメッセージとユーザークエリから抽出されます。 スコアが高いほど、タスク解決におけるシステム指示へのより確実な遵守を示します。
タスク遵守の例
from azure.ai.evaluation import TaskAdherenceEvaluator
task_adherence = TaskAdherenceEvaluator(model_config=model_config)
task_adherence(
query="What are the best practices for maintaining a healthy rose garden during the summer?",
response="Make sure to water your roses regularly and trim them occasionally."
)
タスクの遵守出力
評価者はそれ以外の方法で 合格 か 不合格 を出力します。 理由欄を使ってスコアの背後にある理由を理解しましょう
{
"task_adherence_result": "fail",
"task_adherence_reason": "The response partially addresses the query by mentioning relevant practices but lacks critical details and depth, making it insufficient for a comprehensive understanding of maintaining a rose garden in summer."
}
Azure AI Agent Service以外でエージェントを構築する場合、このエバリューエーターはエージェントメッセージに典型的なスキーマを受け入れます。 サンプルノートについては 「タスクの遵守」を参照してください。