高度な Tester と Tool-Step Standards
release 判断が最終回答だけでなく、Agent の tool 利用方法に依存する場合だけ、このガイドを使います。
まず通常の評価と改善を行います。reviewer が必須 tool、argument、result を確認する必要がある場合にここへ進みます。
Custom Tester を設定する
Tester 管理で目的を絞り、evaluation model を選び、system prompt を書きます。Prompt では {input}、{output}、{tool_steps}、{expected_output}、{rubric} を使えます。
tool behavior が判断対象の場合だけ {tool_steps} を含めます。この placeholder を prompt に入れていない既存 Tester は tool steps を受け取りません。
tool の使い方が失敗原因なら tool steps を確認する
失敗は最終的な文章だけが原因とは限りません。Agent が間違った Knowledge Base を検索した、query が弱すぎた、必要な tool を使わなかった、取得した result を無視した、ということもあります。
case detail では、AI response の上に Tool Steps が表示されます。step を展開すると、次を確認できます。
- どの tool が呼ばれたか
- どの arguments が送られたか
- どの result が返ったか
この evidence を使って、修正すべき場所が Instructions、tool の When to Use、または元の Knowledge Base なのかを判断します。
tool behavior を評価する evaluator を作る場合は、evaluator system prompt に {tool_steps} を含めてください。既存の evaluator は、この placeholder が明示されていない限り tool steps を使いません。
standard には canonical tool type を入れると、evaluator が tool step と安定して照合できます。
| English name | 中文名稱 | Canonical tool type |
|---|---|---|
| Search Knowledge Base | 搜尋知識庫 | consultant_retrieve_context_objs |
| List Knowledge Base Files | 列出知識庫檔案 | consultant_list_kb_files |
| Read Knowledge Base File Lines | 讀取知識庫檔案行數 | consultant_get_context_obj_lines |
| Search Web | 搜尋網頁 | consultant_search_web |
| Fetch Web Page Content | 讀取網頁內容 | consultant_fetch_web_content |
| Call Agent | 呼叫其他 Agent | consultant_call_agent |
| Request Form | 要求填寫表單 | consultant_request_form |
| Payment | 建立付款 | consultant_payment |
| Memory | 記住使用者資訊 | consultant_memory |
| HTTP Request | 呼叫 HTTP API | consultant_http_request |
| Generate Image | 產生圖片 | consultant_generate_image |
Knowledge Base 検索用 standard の例:
Required tool:
- Search Knowledge Base (`consultant_retrieve_context_objs`)
Parameter requirements:
- The question should ask about refund policy, refund conditions, or 退費政策.
- The keywords should include refund-related terms.
Result requirements:
- The result should contain refund-related policy information.
Final answer requirements:
- The response should be grounded in the retrieved policy result.
特定の Knowledge Base file を見つけて読む standard の例:
Required tools:
- List Knowledge Base Files (`consultant_list_kb_files`)
- Read Knowledge Base File Lines (`consultant_get_context_obj_lines`)
Parameter requirements:
- `list_kb_files.pattern` should target the expected file name or path.
- `get_context_obj_lines.knowledge_node_id` should come from the file list result.
- The requested line range should be narrow enough to inspect the relevant section.
Result requirements:
- The file result should contain the policy, procedure, or source section needed to answer.
Final answer requirements:
- The response should use the file content, not only general knowledge.
Web research 用 standard の例:
Required tools:
- Search Web (`consultant_search_web`)
- Fetch Web Page Content (`consultant_fetch_web_content`) when a search result must be opened before answering
Parameter requirements:
- The search question and keywords should match the user's requested topic.
- The fetched URL should come from a relevant search result.
Result requirements:
- The fetched content should contain evidence for the final answer.
Final answer requirements:
- The response should not claim facts that are missing from the fetched content.
別の Agent に渡す standard の例:
Required tool:
- Call Agent (`consultant_call_agent`)
Parameter requirements:
- `agent_name` should match the specialist agent responsible for the request.
- `query` should include the user's key need and enough context for the specialist agent.
Final answer requirements:
- The response should use the specialist agent's result or clearly explain the handoff outcome.
公開前の確認
- Tester prompt に実際に必要な placeholder が含まれている。
- Standard は画面表示名だけでなく canonical tool type を使っている。
- 少数の結果を人が確認し、judge の pass/fail 解釈が reviewer と一致する。
- Judge model または prompt を変えたら代表的な case を再実行する。