promptflow-evals + portable eval datasets: worth a small EvalPort adapter?
Hi promptflow maintainers,
I've been reading through src/promptflow-evals/promptflow/evals/evaluators — QAEvaluator, RelevanceEvaluator, GroundednessEvaluator, CoherenceEvaluator, FluencyEvaluator, SimilarityEvaluator, F1ScoreEvaluator, ChatEvaluator, the BLEU/GLEU/METEOR/ROUGE family, plus the content-safety and XPIA evaluators. It's a genuinely strong, composable set. For example QAEvaluator.__call__(*, question, answer, context, ground_truth, **kwargs) fans out to GroundednessEvaluator/RelevanceEvaluator/CoherenceEvaluator/FluencyEvaluator/SimilarityEvaluator/F1ScoreEvaluator and returns {"gpt_groundedness": ..., "gpt_relevance": ..., "gpt_coherence": ..., "gpt_fluency": ..., "gpt_similarity": ..., "f1_score": ...}.
What's missing, as far as I can tell, is a portable format on the input/output side: the (question, answer, context, ground_truth) rows are promptflow-specific, so a QA eval dataset built to run through QAEvaluator can't easily be handed to a different eval framework — or shared with someone who doesn't use promptflow — without re-authoring it.
I maintain EvalPort (https://github.com/adhabnr-ux/evalport), a small open spec — JSON Schemas under spec/schemas/ (suite.json, testcase.json, resultset.json, grader.json) plus Python/TS SDKs — for exactly that: a portable TestSuite of TestCases (input/expected_output/context) and a ResultSet for scored outputs, deliberately framework-agnostic rather than another eval runner.
I'm not proposing this land inside promptflow-evals itself (per your CONTRIBUTING guidance on not adding new APIs without discussing first) — just checking whether a small, separately-maintained adapter would be useful to anyone here, e.g.:
# EvalPort TestSuite -> QAEvaluator call kwargs
def to_qa_rows(suite: evalport.TestSuite) -> list[dict]:
return [
{"question": tc.input, "context": tc.context, "ground_truth": tc.expected_output}
for tc in suite.test_cases
]
# QAEvaluator output dict -> EvalPort ResultSet
def from_qa_output(test_case_id: str, qa_output: dict) -> evalport.Result:
return evalport.Result(
test_case_id=test_case_id,
scores=qa_output, # gpt_groundedness, gpt_relevance, f1_score, ...
grader="promptflow.QAEvaluator",
)Spec: https://github.com/adhabnr-ux/evalport/blob/main/SPEC.md
If this sounds useful I'm happy to build and maintain it as a standalone evalport-promptflow package and just link it back here — if not, no worries at all, feel free to close this. Thanks for promptflow-evals, it's a well-built piece of the ecosystem.
Source: microsoft/promptflow