Skip to main content
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 ask
  • context: The context relevant to the question
  • response: 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 upon
  • evals: The evaluations you want to perform on your data
You can find the list of all available evaluations here.
6

Get your results