+
+ Name
+ updateFormField('name', data.value)}
+ placeholder="Enter evaluator name"
+ disabled={mode === 'edit'}
+ style={{ width: '100%' }}
+ />
+
+
+
+ Template
+ updateFormField('template', data.optionValue as EvaluatorTemplate)}
+ style={{ width: '100%' }}
+ >
+ Custom Prompt
+ Tool Call Trajectory
+ Semantic Similarity
+
+
+
+ {/* Model configuration - not needed for ToolCallTrajectory */}
+ {formData.template !== 'ToolCallTrajectory' && (
+ <>
+
+ Agent model type
+ updateFormField('agentModelType', data.optionValue as string)}
+ style={{ width: '100%' }}
+ >
+ AzureOpenAI
+ FoundryAgentService
+
+
+
+
+ Deployment ID (optional)
+ updateFormField('deploymentId', data.value)}
+ placeholder="Enter deployment identifier"
+ style={{ width: '100%' }}
+ />
+
+
+
+ Model connection reference (optional)
+ updateFormField('modelReferenceName', data.value)}
+ placeholder="Enter model connection reference name"
+ style={{ width: '100%' }}
+ />
+
+
+
+ Deployment model name (optional)
+ updateFormField('modelName', data.value)}
+ placeholder="Enter deployment model name"
+ style={{ width: '100%' }}
+ />
+
+ >
+ )}
+
+ {/* Ground truth fields */}
+ {(formData.template === 'ToolCallTrajectory' || formData.template === 'SemanticSimilarity') && (
+ <>
+
updateFormField('useGroundTruthRun', data.value === 'groundTruth')}
+ >
+
+
+
+
+ {formData.useGroundTruthRun && (
+ <>
+
+ Ground truth run ID
+ updateFormField('groundTruthRunId', data.value)}
+ placeholder="Enter ground truth run identifier"
+ style={{ width: '100%' }}
+ />
+
+
+ Ground truth agent action (optional)
+ updateFormField('groundTruthAgentActionName', data.value)}
+ placeholder="Enter ground truth agent action name"
+ style={{ width: '100%' }}
+ />
+
+ >
+ )}
+ >
+ )}
+
+ {/* CustomPrompt: Instructions */}
+ {formData.template === 'CustomPrompt' && (
+
+ Instructions
+
+ )}
+
+ {/* ToolCallTrajectory: Expected Tool Calls */}
+ {formData.template === 'ToolCallTrajectory' && !formData.useGroundTruthRun && (
+
+
Expected Tool Calls
+
+ {formData.expectedToolCalls.map((toolCall, index) => (
+
+
+ Tool Call #{index + 1}
+ }
+ size="small"
+ onClick={() => {
+ const newToolCalls = formData.expectedToolCalls.filter((_, i) => i !== index);
+ updateFormField('expectedToolCalls', newToolCalls);
+ }}
+ />
+
+
{
+ const newToolCalls = [...formData.expectedToolCalls];
+ newToolCalls[index] = { ...toolCall, name: data.value };
+ updateFormField('expectedToolCalls', newToolCalls);
+ }}
+ placeholder="Tool name"
+ size="small"
+ style={{ width: '100%' }}
+ />
+
+ ))}
+
}
+ size="small"
+ onClick={() => {
+ updateFormField('expectedToolCalls', [...formData.expectedToolCalls, createDefaultToolCallFormItem()]);
+ }}
+ >
+ Add Tool Call
+
+
+
+ )}
+
+ {/* ToolCallTrajectory: Optional settings */}
+ {formData.template === 'ToolCallTrajectory' && (
+ <>
+
+
+ Threshold (optional)
+ updateFormField('threshold', data.value)}
+ placeholder="e.g., 0.8"
+ style={{ width: '100%' }}
+ />
+
+
+ Comparison Method
+ updateFormField('comparisonMethod', data.optionValue as ComparisonMethod)}
+ style={{ width: '100%' }}
+ >
+ Exact
+ In-order
+ Any-order
+ Precision
+ Recall
+
+
+
+
updateFormField('shouldCompareArgs', !!data.checked)}
+ label="Compare Arguments"
+ />
+ >
+ )}
+
+ {/* SemanticSimilarity: Expected response */}
+ {formData.template === 'SemanticSimilarity' && !formData.useGroundTruthRun && (
+
+ Expected Chat Response
+
+ )}
+