Skip to main content
DeepEval is an open-source LLM evaluation framework that plugs into pytest, so judge-model calls run as part of your normal test suite and CI pipeline.

Prerequisites

Setup

1

Install DeepEval

2

Export your SambaCloud API key

3

Point DeepEval's judge model at SambaCloud

Use DeepEval’s OpenAIModel class with a custom base_url — this is the same class DeepEval uses for real OpenAI, just redirected:
See DeepEval’s OpenAI model reference for the full parameter list. The older GPTModel name works identically but is deprecated in favor of OpenAIModel as of DeepEval 4.x.

Example: score a test case

test_sambanova.py
Output
The reason string is generated by the judge model, so it explains the score rather than restating it.

Example: run as a pytest CI check

This is DeepEval’s main use case: judge-model calls inside your normal test suite.
test_ci_example.py
Run it with DeepEval’s own CLI (its documented command, backed by pytest under the hood):
Output (abridged)
Plain pytest test_ci_example.py -v also works, since DeepEval is a pytest plugin, but deepeval test run is the documented command and adds the richer test-result table shown above.
DeepEval itself needs no login or API key to run evaluations locally — deepeval login is optional and only needed for Confident AI’s cloud dashboard. The only credential required for the examples on this page is your SambaCloud API key, passed to OpenAIModel.

Troubleshooting

Use OpenAIModel instead — same constructor, same base_url support, just the current name as of DeepEval 4.x.
Export the key before running: export SAMBANOVA_API_KEY="your-key". Verify with echo $SAMBANOVA_API_KEY.
Check metric.reason — it’s generated by the judge model itself and explains exactly what it penalized, which is more useful than the score alone for figuring out whether the issue is your prompt, your test case, or the judge model’s interpretation.

Additional resources