에이전트 평가 파서 도구
사용자 지정 메트릭에 대한 스크립트에서 에이전트 평가 파서 도구의 출력을 사용하여 효과적인 에이전트 워크플로우의 기준을 사용자 지정합니다.
파서 도구 개요
에이전트 평가 파서 도구는 에이전트 워크플로우 또는 에이전트의 실행 로그에서 구조적 실행 데이터를 추출합니다. 도구로 수집된 정보를 사용하여 스크립트를 사용하여 에이전트 워크플로우를 평가하는 사용자 지정 메트릭을 만들 수 있습니다.
파서 도구는 객체 내에서 output.payload 다음을 포함하는 구조화된 에이전트 워크플로우 실행 데이터를 반환합니다.
- executionInputs: 에이전트 및 도구의 이름과 지침 및 초기 사용자 발언과 같은 초기 워크플로우 설정 정보를 포함하는 JSON 객체
- executionOutputs: AI 에이전트 작업 및 도구 실행 결과가 포함된 JSON 객체
- executionMessages: 사용자용 대화 플로우 및 시스템 응답의 JSON 객체 배열
- executionPlanDetails: 상태, sys_ids 및 구성 값과 같은 실행 메타데이터의 JSON 객체
{
"output": {
"payload": {
"executionInputs": { ... },
"executionOutputs": { ... },
"executionMessages": [ ... ],
"executionPlanDetails": { ... }
}
}
}
파서 도구의 출력에 액세스
테스트 및 개발에 대한 전체 파서 도구 출력을 보려면 다음 단계를 수행합니다.
- 사용자 지정 메트릭 안내 설정에서 스크립트 편집기 뷰로 이동합니다.
- 테스트 실행을 선택합니다.
- 테스트가 완료될 때까지 기다립니다.
- 테스트 결과의 도구 섹션에서 전체 JSON 출력을 봅니다.
사용자 지정 메트릭을 디자인하기 전에 파서 도구의 출력을 검토하면 특정 논리를 구현하기 전에 데이터 구조를 검사할 수 있습니다.
executionInputs 데이터 구조
executionInputs 속성에는 다음 구조의 JSON 객체가 포함되어 있습니다.
"executionInputs": {
"agenticWorkflow": "(name of agentic workflow)",
"description": "(descriptions for agentic workflow)",
"instructions": "(list of steps for agentic workflow)",
"utterance": "(initial user utterance)",
"agents": [
{
"name": "(AI agent name)",
"instructions": "(list of steps for AI agent)",
"tools": [
{
"name": "(tool name)",
"description": "(tool description)",
"executionMode": "(execution mode, either Autonomous or Supervised)",
"inputs": { ... }
},
{ ... }, ...
]
},
{ ... }, ...
]
}
executionOutputs 데이터 구조
executionOutputs 속성에는 다음 구조의 JSON 객체가 포함되어 있습니다.
"executionOutputs": {
"agents": [
{
"name": "(AI agent name)",
"subTask": { ... },
"tools": [
{
"name": "(tool name)",
"inputs": { ... },
"output": { ... }
}
]
},
{ ... }, ...
]
}
executionMessages 데이터 구조
executionOutputs 속성에는 다음 구조의 JSON 객체 배열이 포함되어 있습니다.
"executionMessages": [
{
"role": "(Message sender, either 'agent' or 'user')",
"message": "(Content of message)",
"order": "(Sequence number indicating order of message in the conversation)"
},
{ ... }, ...
]
executionPlanDetails 데이터 구조
executionPlanDetails 특성에는 다음과 같은 구조의 JSON 개체가 포함되어 있습니다.
"executionPlanDetails": {
"state": "(Current execution status)",
"runType": "(Type of execution)",
"conversationId": "(sys_id of conversation)",
"relatedTask": "(sys_id of the associated task or record)",
"relatedTaskTable": "(Table name where the related task is stored)",
"context": { ... } (May be null)
"builtInTools": [ { ... } ]
}
이 섹션에서는 워크플로우 성능을 추적하고, 문제를 디버깅하고, 실행과 특정 작업 또는 대화의 상관 관계를 지정하기 위한 실행 메타데이터를 제공합니다.
runType의 가능성은 다음과 같습니다.
- API
- 채팅
- 평가
- 테스트
- 트리거
메트릭 스크립트에서 파서 도구 출력 사용
파서 도구 데이터는 매개변수를 통해 메트릭 스크립트에서 사용할 수 있습니다 context . 다음 코드를 사용하여 구조화된 데이터에 액세스합니다.
// Access the parser tool output from context
var parserToolOutput = context['AgenticExecutionParserTool.output'];
if (typeof parserToolOutput == "string") {
parserToolOutput = JSON.parse(parserToolOutput);
}
var parserToolPayload = parserToolOutput.payload;
var parserToolStatus = parserToolOutput.status;
// Extract individual sections from payload
var inputs = parserToolPayload.executionInputs;
var outputs = parserToolPayload.executionOutputs;
var messages = parserToolPayload.executionMessages;
var planDetails = parserToolPayload.executionPlanDetails;