A structural guard for phoenix-evals criteria classification evaluators,
which produce one evaluation per criterion. phoenix-evals is not a runtime
dependency, so instanceof can't be used.
Criteria have an array of criterion objects as choices. Label-list
classification evaluators also carry an array choices, but of plain string
labels, so the items must be checked, not just that choices is an array.
A structural guard for phoenix-evals criteria classification evaluators, which produce one evaluation per criterion. phoenix-evals is not a runtime dependency, so
instanceofcan't be used.Criteria have an array of criterion objects as
choices. Label-list classification evaluators also carry an arraychoices, but of plain string labels, so the items must be checked, not just thatchoicesis an array.