AgentJudgeFactory
Create and update prompt-based Agent Judges on the Judgment platform. Access via `client.agentJudges`.
Create and update prompt-based Agent Judges on the Judgment platform.
Access via client.agentJudges.
const judge = await client.agentJudges.create({
name: "helpfulness",
prompt: "Rate the assistant's helpfulness from 0 to 1.",
model: "gpt-5.2",
scoreType: "numeric",
});
await client.agentJudges.update({
judgeId: judge.judgeId,
prompt: "Updated rubric prompt.",
});create()
Create a new Agent Judge (prompt-based scorer).
async function create(options: { name: string; prompt: string; model: string; scoreType: ScoreType; description?: string; judgeDescription?: string;...): Promise<AgentJudge | null>Parameters
options
required:{ name: string; prompt: string; model: string; scoreType: ScoreType; description?: string; judgeD...
Returns
Promise<AgentJudge | null> - The newly created AgentJudge, or null if the project is unresolved.
update()
Update an existing Agent Judge.
Passing any of prompt, model, categories, minScore, or
maxScore writes a new version of the underlying prompt scorer.
When targetMajorVersion / targetMinorVersion are omitted, the
server auto-bumps the latest version's minor by 1 — matching the
UI's default "save" behaviour.
async function update(options: { judgeId: string; prompt?: string; model?: string; scoreType?: ScoreType; description?: string; judgeDescription?: s...): Promise<AgentJudge | null>Parameters
options
required:{ judgeId: string; prompt?: string; model?: string; scoreType?: ScoreType; description?: string; ...
Returns
Promise<AgentJudge | null> - The updated AgentJudge, or null if the project is unresolved.
Last updated on