Skip to content

Conversation

@bzorn
Copy link
Contributor

@bzorn bzorn commented Jun 6, 2025

Introduced groundtruth/compliance metrics and new evaluation prompt file.

Introduced groundtruth/compliance metrics and new evaluation prompt file.
@bzorn bzorn requested review from Copilot and pelikhan June 6, 2025 19:01
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces groundtruth-based scoring in the evaluation prompt and extends test data structures to include groundtruth information.

  • Add a new prompt file (use_groundtruth_rules.prompty) that defines evaluation guidelines incorporating a groundtruth value.
  • Update testrun.mts and resolvers.mts to propagate groundtruth and groundtruthModel properties.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/prompts/use_groundtruth_rules.prompty New evaluation prompt file defining groundtruth-based scoring and compliance checks
src/genaisrc/src/testrun.mts Added optional groundtruth and groundtruthModel fields to the test result structure
src/genaisrc/src/resolvers.mts Extended resolver arguments to include groundtruth and groundtruthModel properties

bzorn added 2 commits June 6, 2025 20:15
Improved test result consistency, prompt file error, and command args.
Standardizes metric key separator with METRIC_SEPARATOR and adds a test script.
scenario,
input,
output,
groundtruth: groundtruth,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

grouptruth,

if the variable and the field are the same, you can just put the variable and typescript does the rest

dbg(`evaluating ${metrics.length} metrics with eval model(s) %O`, eModel)
for (const metric of metrics) {
const key = metricName(metric)+"|em|"+eModel
const key = metricName(metric)+METRIC_SEPARATOR+eModel
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

run the linter

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not using JSON to serialize a key?

@pelikhan
Copy link
Member

pelikhan commented Jun 6, 2025

Refactor groundtruth parsing / mangling into functions (probably new file) to avoide repeating parsing code in various places.

Copy link
Member

@pelikhan pelikhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refactor key parsing code

bzorn added 3 commits June 6, 2025 22:15
Added full CLI and script parameter documentation, improved model suggestions, fixed groundtruth model handling, and clarified output formatting in reports.
Refactored runTests options for clarity; normalized groundtruth checks.
- Introduces example-use and test-collection-review docs, updates scripts, fixes CLI usage.
@bzorn bzorn merged commit da90957 into dev Jun 6, 2025
4 checks passed
@bzorn bzorn deleted the new-metric-with-groundtruth branch June 6, 2025 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants