What does this release gate print?

from LLM application evals
Node 24 intermediate 3 min

What does this release gate print?

JavaScript
const rows = [
  { score: 1.0, weight: 3, hard: false },
  { score: 0.8, weight: 1, hard: false },
  { score: 0.0, weight: 1, hard: true },
];

const points = rows.reduce(
  (sum, row) => sum + row.score * row.weight,
  0,
);
const weights = rows.reduce((sum, row) => sum + row.weight, 0);
const averagePass = points / weights >= 0.75;
const hardPass = rows.filter((row) => row.hard).every((row) => row.score === 1);

console.log(averagePass, hardPass, averagePass && hardPass);
Open in playground
Report an error