Feature Request: Aggregate and/or Calculated Metrics
thomascleberg opened this issue · comments
It would be fantastic to be able to aggregate and/or apply logic over Metrics in a custom way.
For example, if you had a requirement that context be both relevant
and faithful
, it would be nice to be able to implement context-relevant
, context-faithful
, (context-relevant
> n AND context-faithful
> m), context-relevant
* context-faithful
et cetera.
Thanks for the suggestion @thomascleberg. Definitely interested in implementing this - will follow up once I open a PR
@thomascleberg WIP here: #670
This is now supported as of 0.53.0. Documentation here: https://promptfoo.dev/docs/configuration/expected-outputs/#creating-derived-metrics