Get started with UpTrain in a few simple steps
Install UpTrain
Run the following commands in your terminal to install UpTrain:
Import required libraries
Create your data
You can define your data as a simple dictionary with the following keys:
question
: The question you want to askcontext
: The context relevant to the questionresponse
: The response to the questionRun Evaluations
Create an instance of the EvalLLM
class and pass your OpenAI API key to the constructor.
Evaluate your data
Now that we have our data, we can evaluate it using UpTrain. We use the evaluate
method to do this. This method takes the following arguments:
data
: The data you want to evaluate uponevals
: The evaluations you want to perform on your dataYou can find the list of all available evaluations here.
Get your results