chloejsnpm i chloejs

Reference

chloejs/scorers

How a run is marked: what it did, and what it said.

How a run is marked. Imported as "chloejs/scorers", by whatever runs the evals: the tool calls a turn made, and what somebody said should have happened. Both name a type called Expected, so each keeps its own name.

callsexpectationsExpectedCallsExpectedOutcomeMark

callsfunction

export function calls(result: Result, expected: Expected): Mark

Marks a run on the tools it used, which is arithmetic and asks nobody.

chloe/scorers/calls.ts:30

expectationsfunction

export async function expectations(
  prompt: string,
  result: Result,
  expected: Expected,
  model: string,
): Promise<Mark>

Marks what a run said against what it should have said, by asking a model to judge it.

chloe/scorers/expectations.ts:35

ExpectedCallsinterface

export interface Expected {
  mustCall?: string[];
  mustNotCall?: string[];
  /** Tools it may use, but only once in a run. Restarting twice is why this exists. */
  atMostOnce?: string[];
}

Which tools a run should have used, must not have used, and may use only once.

chloe/scorers/calls.ts:16

ExpectedOutcomeinterface

export interface Expected {
  situation?: string;
  should?: string[];
  shouldNot?: string[];
}

The situation a case sets up, and what the agent should and should not have done about it.

chloe/scorers/expectations.ts:15

Markinterface

export interface Mark {
  score: number;
  reason: string;
}

A score between zero and one, and why it came out that way.

chloe/scorers/calls.ts:24