Learn how to create a local metric in Python to use in your experiments
Install Required Dependencies
Create a .env file, and add the following values
Create a file for your experiment called experiment.py.
Create a scorer function
"Terse"
, "Temperate"
, or "Talkative"
, depending on how many words the model outputs. Add this code to your experiment.py
file.Create an aggregator function
"Terrible"
. Add this code to your experiment.py
file.Create the local metric configuration
str
. We give it a name (“Terseness”), then assign the Scorer and Aggregator. Add this code to your experiment.py
file.Create a dataset
experiment.py
file.Call the LLM
experiment.py
file.Add code to run the experiment
Run the experiment code
View the experiment