-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(evals): add status
enum for evaluation scores
#2169
base: main
Are you sure you want to change the base?
Conversation
status
enum for evaluation scores
js/plugins/evaluators/src/types.ts
Outdated
|
||
export interface BaseGenkitMetricConfig { | ||
type: GenkitMetric; | ||
statusOverrideFn?: (score: Score) => EvalStatusEnum; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pavelgj I made this override method to use the score and get a new status. should we make this even more generic and just pass in the full datapoint
?
This is part of the plugin API so should be easy to fix.... I think?
js/plugins/evaluators/src/index.ts
Outdated
function fillScores( | ||
dataPoint: BaseEvalDataPoint, | ||
score: Score, | ||
statusOverrideFn?: (s: Score) => EvalStatusEnum |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this fn need to know the metric? and maybe original status as well? so that one could do something like:
statusOverrideFn = ({score, originalStatus, metric}) => {
if (metric === 'faithfulness') {
return ...;
}
return originalStatus;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- originalStatus is available in the score object
- Since this is configured per metric, I think the metric field is redundant.
I like the idea of using an object for future expansion, so I added that.
Fixes #2252
Checklist (if applicable):