LoslegenKostenlos loslegen

Filtering datasets for evaluation

You are building a training and evaluation pipeline for your company's health care chatbot, which is used by hospitals to onboard new patients.

Your task is to create a pipeline to load the MedQuad-MedicalQnADataset to evaluate an LLM on its ability to answer medical questions. You are asked to load the dataset in the ds variable, and only include the first 500 samples of the train split of the dataset stored in dataset_name as your evaluation set.

Diese Übung ist Teil des Kurses

Fine-Tuning with Llama 3

Kurs anzeigen

Anleitung zur Übung

  • Import necessary functions and classes from datasets.
  • Load the dataset in the ds variable.
  • Manipulate ds to include the first 500 samples of the train split of the dataset stored in dataset_name as your evaluation set.

Interaktive Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

# Load neccesary imports from library
from datasets import ____, ____

# Load the training split of the dataset
ds = load_dataset(dataset_name, split=____)

# Filter for the first 500 samples of the dataset
filtered_ds = ____
Code bearbeiten und ausführen