- はじめに
- UiPath Agents の利用を開始する
- LangGraph を使用した UiPath Agents の利用を開始する
- Studio Web でローコード エージェントを構築する
- UiPath エージェントにツールを追加する
- Getting Started with UiPath Maestro Flow
エージェントを評価する
評価のトレースをローカルで実行し、Studio Web に流入する結果を確認する
手順 8 - 評価テストを作成する
評価では、適切なタイミングで新しいツールを呼び出すかどうかなど、さまざまな入力に対するエージェントのパフォーマンスをテストします。この uipath-agents スキルには、評価フレームワークの完全なリファレンスが含まれています。このようなリファレンスには、評価器の種類、評価セットのスキーマ、ディレクトリ構造の規則、LLM の審査員の評価器に gpt-4.1 (mini ではない) を使用するなどのベスト プラクティスが含まれています。コーディング エージェントはこれを使用して、短いプロンプトから正しい評価器の設定とテスト セットを生成します。
コーディング エージェントに依頼してください。
Create an evaluation set for the intake classifier agent with 5 test cases:
1. A clearly trivial request (e.g., deliver a letter) - no creature named, get_challenge_rating should not be called
2. A standard request (e.g., escort a caravan) - no creature named, get_challenge_rating should not be called
3. A heroic request naming a goblin (e.g., clear a goblin stronghold) - get_challenge_rating should be called exactly once, querying for a goblin, and no other creature
4. A legendary request naming a dragon (e.g., slay a dragon) - get_challenge_rating should be called exactly once, querying for a dragon, and no other creature
5. An edge case that's ambiguous on difficulty but also names no specific creature - get_challenge_rating should not be called; this tests that the agent doesn't over-call the tool just because a case is hard to classify
Use both a semantic similarity evaluator (to check the output) and a trajectory evaluator (to check whether get_challenge_rating was called, and with what search term, matching the expectations above).
Include evaluator config files in evaluations/evaluators/ and the eval set, named smoke-test.json, in evaluations/eval-sets/. Use gpt-4.1-2025-04-14 as the model in the evaluator configs. Each evaluator config must include a populated defaultEvaluationCriteria - use {"expectedOutput": {}} for the semantic evaluator and {"expectedAgentBehavior": ""} for the trajectory evaluator. Empty {} fails schema validation.
Create an evaluation set for the intake classifier agent with 5 test cases:
1. A clearly trivial request (e.g., deliver a letter) - no creature named, get_challenge_rating should not be called
2. A standard request (e.g., escort a caravan) - no creature named, get_challenge_rating should not be called
3. A heroic request naming a goblin (e.g., clear a goblin stronghold) - get_challenge_rating should be called exactly once, querying for a goblin, and no other creature
4. A legendary request naming a dragon (e.g., slay a dragon) - get_challenge_rating should be called exactly once, querying for a dragon, and no other creature
5. An edge case that's ambiguous on difficulty but also names no specific creature - get_challenge_rating should not be called; this tests that the agent doesn't over-call the tool just because a case is hard to classify
Use both a semantic similarity evaluator (to check the output) and a trajectory evaluator (to check whether get_challenge_rating was called, and with what search term, matching the expectations above).
Include evaluator config files in evaluations/evaluators/ and the eval set, named smoke-test.json, in evaluations/eval-sets/. Use gpt-4.1-2025-04-14 as the model in the evaluator configs. Each evaluator config must include a populated defaultEvaluationCriteria - use {"expectedOutput": {}} for the semantic evaluator and {"expectedAgentBehavior": ""} for the trajectory evaluator. Empty {} fails schema validation.
手順 9 - 評価を実行する
評価セットをローカルで実行します。
uip codedagent eval agent evaluations/eval-sets/smoke-test.json --workers 3 --output-file eval-results.json
uip codedagent eval agent evaluations/eval-sets/smoke-test.json --workers 3 --output-file eval-results.json
評価フレームワークによって、各テスト ケースがエージェントを介して実行され、結果がスコアリングされます。
| スコア | 評価項目 |
|---|---|
| Semantic similarity (意味的類似性) | エージェントの出力が期待される出力にどの程度一致しているか |
| エージェントの軌跡 | エージェントが呼び出すべき get_challenge_rating いつ (そしていつだけ) 呼び出したか |
軌道は今、ここで何か意味があります。このツールを導入すると、5 つのケースすべてで軌跡スコアが 1.0 に近いことが予想されます: 些細なケース、標準的なケース、あいまいなケースではツール呼び出しがなく、ゴブリンとドラゴンのケースでは正しくターゲットを絞ったツール呼び出しが 1 つだけです。低いスコアは、エージェントがツールを呼び出すべきでないときに呼び出したか、行うべき呼び出しをスキップしたか、間違ったクリーチャーを調べたかを示しており、最終層がたまたま正しいかどうかだけではありません。
意味的類似性の場合、0.8 を超えるスコアは一般的に堅実です。Trajectory が特定の何かを追跡しているので、同じことが期待されます。eval-results.json を確認して、エージェントのパフォーマンスを確認します。
次の手順で Studio Web に接続した後、CLI から uip codedagent eval run を実行すると、結果が Studio Web に自動的にアップロードされます。評価セットは [ 評価セット ] タブの [実行] に表示されます。
Studio Web の [評価を実行] ボタンは同じものではありません。このボタンをクリックすると、Python ランタイムのサポートが必要な Cloud ロボットの実行がトリガーされます。このラボの範囲外にある、より複雑な設定です。代わりに CLI からの uip codedagent eval run を使用してください。どちらの方法でも、結果は Studio Web に表示されます。
ローカルでの評価結果を確認したら、次のセクションに進むでプロジェクトを Studio Web に接続する準備が整いました。