Worked through it in Colab, filling in the blanks across a few code cells.
Start by clarifying the evaluation goals and metrics, then implement modular functions for data loading, model inference, and metric computation. Use a configuration-driven design to easily swap models and metrics, and validate with a small test set before scaling.
Pro tip: Write unit tests for each evaluation component and log intermediate results to catch issues early, especially when dealing with API rate limits or inconsistent model outputs.
Ask clarifying questions about the evaluation task, dataset, and desired metrics (e.g., accuracy, F1, BLEU). Confirm the expected input/output formats and any constraints like API rate limits.
Outline separate functions for loading data, calling the LLM API, parsing responses, and computing metrics. Ensure each component is testable and configurable.
Write code to load the evaluation dataset, handle missing values, and format inputs as required by the LLM. Include error handling for malformed data.
Create a function to call the LLM API with retries and rate limiting, then parse the raw responses into a structured format suitable for metric computation.
Implement metric calculations, aggregate results, and output a summary report. Include logging and visualization if needed.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.