AI Engineer Portal
Your personal operating system for career transition.
Private mode
Exercise
Create a golden dataset test suite
Create a Golden Dataset Test Suite
A golden dataset is a curated set of test cases you trust to detect regressions. Build the infrastructure to load, run, and report on a golden evaluation suite.
What you are building
Implement a GoldenSuite class that:
- Loads cases from JSONL -- each line has
case_id,input,expected, andcategoryfields. - Runs evaluation -- for each case, calls a
generate_fnand ascore_fn, records score and pass/fail. - Detects regressions -- accepts a baseline report dict and identifies any case where current score is more than 0.10 below the baseline score for the same
case_id. - Reports by category -- returns average score and pass rate broken down by category.
- Outputs a portable report -- returns a dict with
by_casescores suitable as the next run's baseline.
Constraints
- Use only the Python standard library.
score_fnsignature:(response: str, expected: str) -> floatreturning 0.0 to 1.0.generate_fnsignature:(input: str) -> str.- Pass threshold is configurable (default 0.7).
- Regression threshold is configurable (default 0.10).
Evaluation / medium / Step 9 of 36
Practice stage
Evaluation and review loops
Hint
Separate the scoring logic from the interpretation logic. Your goal is not just a number; it is a useful next action.
Next drill
Implement structured request tracingSuccess criteria
- - Produces a useful signal, not decorative output
- - Makes regression review easier
- - Would support a benchmark or observability loop
Review checklist
- - Would this output help decide what to fix next?
- - Are important failure modes visible?
- - Does the score hide any ambiguity I should record?
Related lessons
Practice
Generate a variation
Generate a new exercise variation to deepen understanding or practice a related concept.
Attempt history
Recent submissions
Before you submit, decide what a strong answer should make obvious to the reviewer.
No attempts yet.