Skip to main content
The prime eval command provides powerful evaluation capabilities for testing environments against various language models through Prime Inference or other OpenAI-compatible providers. You can run evaluations locally or launch them as hosted evaluations on the platform with --hosted. This guide covers both workflows, model selection, and best practices.

Quick Start: Running Your First Evaluation

Prerequisites

  1. Python 3.10–3.13 — Required for the Prime CLI and verifiers
  2. Install Prime CLI — Follow the installation guide
  3. Set up API keys — Configure your Prime API key via prime login; if you plan to use another provider, also export the provider key you will reference with --api-key-var
  4. Install an environment — Use prime env install owner/environment

Basic Evaluation

Local prime eval runs are automatically uploaded to the platform after each run. Use --skip-upload to disable this.

Hosted Evaluation Quick Start

If your environment is already published to the Environments Hub, you can run it remotely on Prime-managed infrastructure:
Use --follow to stream hosted logs until completion:
See Hosted Evaluations for the full dashboard and CLI workflow.

Using the prime eval Command

Basic Syntax

This is a shorthand for prime eval run ENVIRONMENT. Both forms work identically.

Available Models

To see all available models for evaluation:
Example models:
Model availability and pricing may change. Always run prime inference models to get the current list with pricing.

Core Parameters

environment
string
required
Environment to evaluate. Supported forms:
  • Full slug (e.g., primeintellect/gsm8k) — recommended for hosted runs and Hub environments
  • Short name (e.g., gsm8k) — local-first resolution for installed environments
  • TOML config path (e.g., configs/eval/gsm8k.toml) — for config-driven runs
--model, -m
string
Model to use for evaluation. Default: openai/gpt-4.1-miniSee prime inference models for all available models.
--num-examples, -n
integer
Number of examples to evaluate. Default: 5
--rollouts-per-example, -r
integer
Number of rollouts per example for statistical significance. Default: 3

Advanced Options

--max-concurrent, -c
integer
Maximum concurrent requests to the inference API. Default: 32
--max-retries
integer
Maximum number of automatic retries with exponential backoff when rollouts fail due to transient infrastructure errors (e.g., sandbox timeouts, API failures).
--max-tokens, -t
integer
Maximum tokens to generate per request. If unset, uses model default.
--temperature, -T
number
Sampling temperature (0.0–2.0). Higher values = more randomness.
--sampling-args, -S
string
JSON string with additional sampling arguments.Example: '{"enable_thinking": false, "max_tokens": 256}'
--env-args, -a
string
Environment-specific arguments as JSON.Example: '{"difficulty": "hard"}'

Output and Storage Options

--verbose, -v
boolean
Enable verbose output for detailed logging.
--save-results, -s
boolean
Save evaluation results to disk. Default: true
--save-every, -f
integer
Save dataset every N rollouts. Useful for checkpointing. Default: 1
--save-to-hf-hub, -H
boolean
Save results to Hugging Face Hub.
--hf-hub-dataset-name, -D
string
Specify Hugging Face Hub dataset name.
--skip-upload
boolean
Skip uploading results for local evaluations (local runs upload by default).

Hosted Evaluation Options

--hosted
boolean
Run the evaluation on the platform instead of locally. Requires a published environment.
--follow
boolean
Follow hosted evaluation status and stream logs until completion. Only valid with --hosted.
--poll-interval
number
Polling interval in seconds for hosted status and log streaming. Only valid with --hosted.
--timeout-minutes
integer
Optional timeout in minutes for a hosted evaluation. Default: 1440 (24 hours). Min: 120. Max: 1440.
--allow-sandbox-access
boolean
Allow sandbox read/write access for hosted evaluations.
--allow-instances-access
boolean
Allow hosted evaluations to create and manage instances.
--allow-tunnel-access
boolean
Allow hosted evaluations to create and manage tunnels from inside the sandbox. This adds tunnel scopes to the temporary PRIME_API_KEY.
--custom-secrets
string
JSON object of additional secrets to inject into a hosted run.
--eval-name
string
Custom display name for a hosted evaluation.
--api-base-url and --api-key-var from the model configuration section also work with --hosted. When you use a custom endpoint for a hosted run, provide the referenced API key inside the remote sandbox via an environment secret or --custom-secrets.

End-to-End Example

Here’s a complete workflow from installation to viewing results:
Example output:

Using TOML Configs for Multi-Environment Evals

For reproducible evals, you can pass a TOML config file instead of individual CLI flags:
Local TOML configs can define one or more [[eval]] entries, which makes them useful for benchmark suites and multi-environment comparisons:
When you use a TOML config, per-eval settings in [[eval]] override global defaults at the top of the file. For the full config schema, precedence rules, and advanced options like ablations and endpoint registries, see Verifiers Evaluation.

Hosted Evaluations from the CLI

Hosted eval runs are useful when you want the platform to execute the environment remotely and keep logs on the platform.
Hosted runs can also target a custom OpenAI-compatible endpoint:
When --api-base-url is set on a hosted run, Prime still hosts the evaluation sandbox, but model billing comes from your external provider instead of Prime Inference. See Hosted Evaluations for the full hosted billing details. You can also launch a hosted run from a TOML file:
Hosted run management commands:

Managing Evaluation Results

List Evaluations

Get Evaluation Details

View Samples

Push Local Results

If you ran evaluations offline or with --skip-upload, you can push results later:

Model Selection Guide

When choosing models for evaluation, consider:
  • Task complexity — Harder tasks benefit from larger, reasoning-capable models
  • Cost — Smaller models are significantly cheaper for large-scale evals
  • Throughput — Some models handle high concurrency better than others

Self-hosting with vLLM

For most users, we recommend Prime Inference for easier setup. Consider self-hosting only for specialized requirements or very large-scale evaluations.
Self-hosting makes sense when you:
  • Need specific model variants or custom fine-tuned models
  • Require maximum cost efficiency for very large evaluations (1M+ examples)
  • Are testing smaller models not available via API

Configuring for Self-Hosted Models

High Performance (MoE with small active parameters):
Balanced Performance:

vLLM Configuration Example

Environment-Specific Dependencies

Some environments may require additional dependencies beyond the base installation. Check the environment’s documentation or use prime env info to see requirements:
If an environment needs specific packages (e.g., sympy for math verification), install them before running evaluations.

Troubleshooting

Common Issues

Error: “Rate limit exceeded” or 429 responsesSolution: Reduce concurrency
Error: “Insufficient balance” or payment requiredSolution: Add funds to your Prime Intellect account or use cheaper models
Error: Environment not found or installation failuresSolution: Verify environment exists and reinstall
Error: Installation failures or import errorsSolution: Ensure you’re using Python 3.10–3.13

Performance Tips

  1. Start Small: Begin with -n 5 to test your setup
  2. Monitor Costs: Check token usage before large evaluations
  3. Use Appropriate Models: Match model capability to task complexity
  4. Optimize Concurrency: Balance speed vs. rate limits (default 32 is usually good)
  5. Save Results: Results auto-save and upload by default

Integration with Other APIs

You can use other OpenAI-compatible API providers:

Next Steps

Environments Hub

Learn more about creating and managing environments

Inference API Reference

Detailed API documentation for inference endpoints

Prime CLI Reference

Complete CLI command reference

Creating Environments

Build your own evaluation environments