Install DeepEval
Setup A Python Environment (recommended)
Go to the root directory of your project and create a virtual environment (if you don’t already have one). In the CLI, run:
python3 -m venv venv
source venv/bin/activate
Run pip install deepeval
In your newly created virtual environment, run:
pip install -U deepeval
Login (Again) With Your API Key
By now, you should have your Confident AI API key from following the instructions on the previous page. You’ll need to log in with that API key in DeepEval to ensure all evaluations, datasets, and prompts stay in sync with your project on Confident AI.
To log in with your API key, run the following command in the CLI:
deepeval login --confident-api-key YOUR_API_KEY
Replace YOUR_API_KEY
with the API key you copied from the Confident AI dashboard.
You can also login by using the login_with_confident_api_key
method without going through the CLI if you’re in a notebook environment:
deepeval.login_with_confident_api_key("YOUR_API_KEY")
Once logged in, you’re ready to start using Confident AI with DeepEval for your LLM evaluations.
Set your data region (if required)
Confident AI’s data lives in the US by default, but if you’re a customer with a data residency in the EU, you’ll need to run this command to point deepeval
to use Confdient AI’s API endpoints on our EU servers and databases instead:
deepeval confident-set-url EU
This step is only required if you’ve created an account in the EU data region. For more information on data residency, click here.
What’s Next?
In the next section, we’ll quickly setup a prompt and dataset on Confident AI, so that we can start running LLM evaluations.