Skip to main content
You will run an offline experiment with evaluate(): execute a function on a test dataset, score each output with a custom evaluator, and review aggregated results in the HoneyHive Experiments dashboard. For the full evaluation model, see evaluation introduction. Time: ~5 minutes

Step 1: Set up dependencies and credentials

Install dependencies and configure your environment:
Go to Settings > Project > API Keys and click Create API Key. Copy the key from the modal - it will only be shown once. Set your environment variables:
If you have existing code with HoneyHiveTracer.init(), you don’t need it here - evaluate() handles tracing automatically.

Step 2: Define the function to evaluate

Write the function you want to evaluate. Here we’ll build an intent classifier:

Step 3: Create a test dataset

Define test cases with inputs and expected outputs:

Step 4: Write an evaluator

Evaluators score your function’s outputs against ground truth:
Evaluator signature: (outputs, inputs, ground_truth). Returns a score (typically 0.0 to 1.0). This evaluator runs in your own code during evaluate(), with no server-side setup.

Step 5: Run the experiment

Run the experiment with evaluate():
You’ll see a results table printed to the console with scores for each datapoint.

Step 6: View results in the dashboard

Go to app.us.honeyhive.ai and open Experiments to see your run, scores, and individual traces.
Experiment results showing intent classification accuracy

First, set your environment variables:

What did you learn?

  • Define a function that receives a datapoint and returns outputs
  • Create a dataset with inputs and ground truths
  • Write an evaluator that scores outputs automatically
  • Run an experiment with evaluate() and view results in the dashboard
evaluate() traces each datapoint automatically, so you do not need a separate tracer setup for experiments.

What should you do next?

Compare Experiments

Run a second experiment with a different prompt and compare results side-by-side

Evaluator Types

Code evaluators, LLM-as-judge, and human review

Run with HoneyHive Datasets

Reuse datasets stored in HoneyHive with dataset_id

Server-Side Evaluators

Run evaluators on HoneyHive infrastructure