Getting Started
Quickstart
Get started with UpTrain in a few simple steps
1
Install UpTrain
Run the following commands in your terminal to install UpTrain:
2
Import required libraries
3
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 question
4
Run Evaluations
Create an instance of the EvalLLM
class and pass your OpenAI API key to the constructor.
You can find your OpenAI API key here.
5
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 data
You can find the list of all available evaluations here.
6
Get your results
Was this page helpful?