Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions tests/server/services/tutor/evaluation/anchor-corpus.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,16 @@ function validSource(): TutorQualityCorpusSource {
}

describe("Tutor Quality anchor corpus contract", () => {
it("contains two judge-enabled strategy cases for each learning phase", () => {
it("contains at least two judge-enabled strategy cases for each learning phase", () => {
const source = parseYaml(readFileSync(fileURLToPath(new URL("../../../../../evals/tutor-quality/anchor-corpus.yaml", import.meta.url)), "utf8")) as TutorQualityCorpusSource;
const strategyCases = source.scenarios.filter(({ id }) => id.startsWith("strategy-"));
const counts = Object.fromEntries(["LEARN", "DEEPEN", "EXPAND"].map((phase) => [
phase,
strategyCases.filter(({ expected }) => expected?.learningPhase === phase).length,
]));

expect(Object.values(counts).every((count) => count >= 2 && count <= 3)).toBe(true);
// R-AUT-1: a lower bound for coverage, never a case count; new cases are corpus data only.
expect(Object.values(counts).every((count) => count >= 2)).toBe(true);
expect(strategyCases.every(({ turns, judge, expected }) => (
turns.some(({ kind }) => kind === "dialog")
&& expected?.learningPhase !== undefined
Expand Down
Loading