readLabels()
readLabels(
file,path,context):Promise<ReadLabels>
Defined in: eval/src/labels.ts:225
Read human labels of judge assertions from a JSONL, CSV or YAML file, by the
extension of the path as written. Each label has an id (the dataset row),
an assertion (an llm-judge assertion of the suite), a verdict of pass
or fail, and an optional note that is checked and never output. Values
are never interpolated and a parse error names a position, not a value.
Parameters
file
string
Real path of the label file, as returned by loadSuites
path
string
The same path relative to the project, for messages
context
Assertion ids of the suite
Returns
Promise<ReadLabels>
Labels by row and assertion, and findings for labels of other assertions
Throws
EvalError with code PS6603 for an unreadable, oversized or malformed file