eval.py: Floor sanity check
A minimal smoke test. It confirms your predictions parse and have the right shape. It does NOT score recommendation quality.
For deeper scoring (keyword matching, multi-tier reasoning, fixture
citations), bring your own evaluator that compares each prediction
against the handcrafted_recommendation.json in the matching scenario
folder.
Usage
python eval.py --predictions sample_predictions.json
What it checks
- The file parses as JSON.
- There is a top-level
predictionsarray. - Each prediction has the required fields.
- Each
finding_typeis one of the three allowed values. - Each
primary_tieris one of the allowed tier names (or null). - Each
action_categoryis one of the allowed values. - Each
specific_changeis at least 20 characters.
What it does NOT check
- Whether the recommendation engages with the right evidence.
- Whether multi-tier scenarios cite both tiers.
- Whether named fixtures from the metadata are referenced.
- Whether cost or projection numbers are reasonable.
Those checks are quality assessments. They depend on what you want to score for and how strict you want to be. The dataset ships the gold answers; the scoring method is up to you.
Exit codes
0: all predictions passed the Floor check.1: at least one prediction failed at least one check.2: usage error (missing file, malformed JSON).