Skip to content

Notebook proposal: exporting RAG eval results as a portable EvalPort suite/ResultSet #589

Description

@adhabnr-ux

Hi — per CONTRIBUTING.md's guidance to open an issue before a PR, I wanted to check scope first.

I maintain EvalPort (Apache 2.0), an open JSON spec for portable LLM evaluation datasets — test cases, graders, suites, and results that can move between eval frameworks (Ragas, DeepEval, LangSmith, Inspect AI, MLflow, and others) without losing meaning.

I looked at notebooks/generative-ai/ (question-answering.ipynb, chatbot.ipynb) and the folder structure in notebooks/README.md before writing this. There's no dedicated evals folder yet, so the idea would be a self-contained notebook (per your "notebook should be self-contained" guidance) that:

  1. Runs a small Elasticsearch-backed RAG pipeline like question-answering.ipynb already does.
  2. Wraps the queries/expected answers as an EvalPort test suite (plain JSON — id, graders, test_cases).
  3. Grades the actual answers and exports a ResultSet, validated against EvalPort's own schema.

Rough shape of the export step:

from openeval.validate import validate_suite, validate_result_set

suite = {
    "version": "1.0.0",
    "id": "es-rag-eval",
    "graders": [{"id": "gr1", "type": "exact_match"}],
    "test_cases": [
        {"id": "tc1", "input": "What is...", "expected_output": "...", "graders": ["gr1"]}
    ],
}
assert validate_suite(suite).valid
# ... run the RAG pipeline, grade the outputs, build a ResultSet the same way ...

The value for readers would be: once the notebook's results are EvalPort JSON, they're directly comparable to a Ragas or LangSmith run of the same test cases, without hand-rolling a converter. This is a genuinely small addition — I'm not asking for a new top-level category, just checking whether a notebook like this would be a welcome addition to notebooks/generative-ai/ (or wherever you'd place it), and whether you'd rather see it target example-apps/ instead given it's a workflow rather than a pure how-to. Happy to follow the pre-commit/nbtest conventions if there's interest.

Spec: https://github.com/adhabnr-ux/evalport/blob/main/spec/SPEC.md

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions