Skip to main content

Implement MCQEval

Our built-in MCQEval framework serves as an evaluation task factory. To implement, define two components and let openbench take care of the rest!

Component 1: Map Your Dataset to MCQ Samples

Define a mapping for dataset records to fit the expected MCQSample format:
evals/openbookqa.py

Component 2: Define Your Eval Task

Given a record_to_mcq_sample function, MCQEval will spin up an InspectAI Task:
And that’s it! After registering your new MCQ task in the registry, you can run it with bench eval!

Additional Info

MCQEval accepts additional configuration parameters:
When called, MCQEval loads the dataset type (default hf) according to the provided mapping function, e.g.,
… defines a basic generation solver,
… creates a dynamic mcq scorer,
… and returns a packaged evaluation task.