-
Notifications
You must be signed in to change notification settings - Fork 623
Add docs for writing custom evaluators #14
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
Conversation
2020b3f to
20ae1ea
Compare
| async (datapoint: BaseDataPoint) => { | ||
| const score = await deliciousnessScore(judge, datapoint, judgeConfig); | ||
| return { | ||
| testCaseId: datapoint.testCaseId, |
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.
Thought: Can we avoid requiring the plugin writer to have to write this boilerplate testCaseId: datapoint.testCaseId?
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.
I don't know if we can at the moment because it's the way that we map all the additional metadata from the input dataset into the final scored result.
|
|
||
| Now, define the function that will take an example which includes `output` as is required by the prompt and score the result. Genkit test cases include `input` and `output` as required fields, with optional fields for `context`. It is the responsibility of the evaluator to validate that all fields required for evaluation are present. | ||
|
|
||
| This example leverages `handlebars` to hydrate the prompt and `zod` to format and validate the response. |
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.
We should probably update the evaluators to use dotprompt instead.
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.
Totally agree!
No description provided.