- 概要
- UiPath Agents の利用を開始する
- LangGraph を使用した UiPath Agents の利用を開始する
- はじめに
- 環境をセットアップする
- エージェントを構築する
- エージェントを評価する
- Studio Web に接続
- Studio Web でローコード エージェントを構築する
- UiPath エージェントにツールを追加する
評価のトレースをローカルで実行し、Studio Web に流入する結果を確認する
エージェントをローカルで実行し、エントリ ポイントを登録したら、エージェントを実行して評価セットを構築する準備が整います。
手順 6 - エージェントをローカルで実行する
コーディング エージェントが作成したサンプル入力ファイルを使用してエージェントを実行します。
uip codedagent run agent --file input.json
uip codedagent run agent --file input.json
エージェントが要求を分類し、推論とともに層を返すのがわかります。
入力をインラインで渡すこともできます。これらの例では、Bash の一重引用符構文を使用します。PowerShell を使用している場合は、代わりに JSON ファイルで --file を使用します。
uip codedagent run agent '{"description": "Clear the rats out of the inn cellar"}'
uip codedagent run agent '{"description": "Clear the rats out of the inn cellar"}'
いくつかの異なる入力を試して、分類が妥当であることを確認します。
uip codedagent run agent '{"description": "Slay the ancient red dragon terrorizing the countryside"}'
uip codedagent run agent '{"description": "Slay the ancient red dragon terrorizing the countryside"}'
手順 7 - 評価テストを作成する
評価では、さまざまな入力にわたってエージェントのパフォーマンスがどの程度良好であるかをテストします。この 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., delivering a letter)
2. A standard request (e.g., escort a caravan)
3. A heroic request (e.g., clear a goblin stronghold)
4. A legendary request (e.g., slay a dragon)
5. An edge case with ambiguous difficulty
Use both a semantic similarity evaluator (to check the output) and a
trajectory evaluator (to check the agent's reasoning path).
Include evaluator config files in evaluations/evaluators/ and the eval
set 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., delivering a letter)
2. A standard request (e.g., escort a caravan)
3. A heroic request (e.g., clear a goblin stronghold)
4. A legendary request (e.g., slay a dragon)
5. An edge case with ambiguous difficulty
Use both a semantic similarity evaluator (to check the output) and a
trajectory evaluator (to check the agent's reasoning path).
Include evaluator config files in evaluations/evaluators/ and the eval
set 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.
手順 8 - 評価を実行する
評価セットをローカルで実行します。
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 (意味的類似性) | エージェントの出力が期待される出力にどの程度一致しているか |
| エージェントの軌跡 | エージェントが期待どおりの推論パスをたどったかどうか |
このエージェントの軌跡スコアは 0.0 であると予想されます。軌跡評価器は、エージェントの 推論パス、つまりエージェントがどのツールを呼び出したか、どのような順序で、ノード間でどのようにルーティングしたかを判断します。この分類器はツールの呼び出しを行わず、ノードは 1 つであるため、すべてのテスト ケースのスコアは 0.0 です。この単一ノード分類器では、意味的類似性スコアを使用します。
意味的類似性の場合、0.8 を超えるスコアは一般的に堅実です。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 に接続する準備が整いました。