Perform A/B testing on your data with UpTrain
chunk_size
parameter that limits the number of tokens in the context
passed to the model.
We will only look at the code that is specific to performing experiments. We will not be looking at the entire process of extracting the context and generating the response. To learn more about that, please refer to the Data Driven Experimentation Demo.
APIClient
constructor.
question
: The question you want to askcontext
: The context relevant to the questionresponse
: The response to the questionchunk_size
: The limit on the number of tokens in the contextevaluate_experiments
method to do this. This method takes the following arguments:
project_name
: The name of your projectdata
: The data you want to log and evaluateevals
: The evaluations you want to perform on your dataexp_columns
- A list of all the columns that act as identifiers to indicate which experiment the row belongs to. You can enter multiple column names here.