-
Notifications
You must be signed in to change notification settings - Fork 63
Open
Milestone
Description
Feature Request: Allow scorer functions to return arrays of scores
Problem
Currently, scorer functions can only return a single Score object. However, some use cases involve LLM graders that assess multiple criteria in a single call and return multiple pass/fail results.
Use Case
I have an LLM grader that performs a one-shot assessment of multiple criteria and returns a pass/fail for each criterion. For example, evaluating if a response is accurate, complete, and clear - all in a single LLM call for efficiency.
Currently, I need to either:
- Make separate LLM calls for each criterion (inefficient and costly)
- Write custom logic to split the results into multiple scorer calls
- Use only a single aggregate score
Proposed Solution
Allow scorers to return either a single Score or an array of Score[], which would be flattened into the final scores array.
This appears to be achievable with a simple .flat() here:
evalite/packages/evalite/src/evalite.ts
Line 89 in e04b48f
| const scores = await Promise.all( |
Score | Score[]).Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels