DeepEvaldeepeval 4.2.8 · Python 3.10+
Dashboard
0%
1
Curious builder0 XP earned · 300 to level 2
0 daysFinish a lesson to begin
Badge collection0 of 6 unlocked
34 small wins to finish your pathNext lesson →

Installation and setup

DeepEval installs from PyPI as one package, deepeval, and its judged metrics need an API key for a hosted model: this course uses one free key from Groq.

Last updated: 05 Oct, 2026 · DeepEval 4.2.8

You need Python 3.10 or later. Check yours with python --version. DeepEval brings everything else the course uses with it: the openai package, which talks to Groq because Groq speaks the same API, and pytest, which runs the test files later on.

Installing DeepEval with pip, uv or Colab

pip install "deepeval==4.2.8"

Install it inside a virtual environment or a uv project, so DeepEval's pinned dependencies do not clash with other projects on your machine.

Checking the installed version

Example
import deepeval

print(deepeval.__version__)

DeepEval sends anonymous usage data by default. Set DEEPEVAL_TELEMETRY_OPT_OUT=1 in your environment to turn it off.

Getting a Groq key

Open the Groq console, sign in, go to API Keys, create a key with a name, and copy it. The free plan needs no card. It limits how many tokens each model may use per minute and per day, which matters once a metric makes several judge calls; the judge built in Custom judge model waits and retries when it hits the minute limit.

Setting the key

export GROQ_API_KEY=gsk_...

DeepEval also loads a .env.local or .env file from the current folder when it is imported. The TechNest app file in this course does not import DeepEval, so set the key in your shell as above and every file sees it.

Checking the key with a real call

The course uses two Groq models: qwen/qwen3.8-27b writes the TechNest bot's answers, and openai/gpt-oss-120b is the judge. One call to each proves the key works and both models answer.

ExampleAPI key
import os

from openai import OpenAI

groq = OpenAI(api_key=os.environ["GROQ_API_KEY"], base_url="https://api.groq.com/openai/v1")
for model in ["qwen/qwen3.8-27b", "openai/gpt-oss-120b"]:
    reply = groq.chat.completions.create(
        model=model,
        messages=[{"role": "user", "content": "Reply with the single word: ready"}],
    )
    print(model, "->", reply.choices[0].message.content.strip())
  • Each line is one model's reply, so GROQ_API_KEY works for both.
  • base_url points the openai client at Groq. The rest of the call is the same as for OpenAI, which is why the judge later reuses this client.

pip vs uv vs Colab

pipuvColab
Installs intoThe active Python environmentThe project's own environmentThe notebook's runtime
Key set withexport or $env:export or $env:Secrets and userdata.get
Best forA quick startA project you keepNothing installed on your machine
Watch out. By default every DeepEval metric judges with an OpenAI model and stops with OpenAI API key is not configured when there is no OpenAI key. This course never sets one: each metric gets the Groq judge passed in as model=, as Custom judge model shows.
Try it yourself
  • Run the version check and confirm it prints 4.2.8.
  • Change the prompt to Reply with the single word: judge and run the key check again.
  • Unset the key (unset GROQ_API_KEY), run the key check, and read the KeyError it stops with.

Little by little, you're building something great.