Rakam Eval CLI
A CLI for running LLM evaluations and tracking quality over time.
Quick Start
A typical workflow is:
- Write eval function
edit eval/my_eval.py
- Run evaluation
rakam eval run
- View results
rakam eval show
Installation
pip install rakam-systems-cli
Writing Evaluations
Create an eval/ directory in your project. Each evaluation function must:
- Be decorated with
@eval_run - Return an
EvalConfigobject
# eval/examples.py
from rakam_systems_cli.decorators import eval_run
from rakam_systems_tools.evaluation.schema import (
EvalConfig,
TextInputItem,
ClientSideMetricConfig,
ToxicityConfig,
)
@eval_run
def test_simple_text_eval():
"""A simple text evaluation showcasing a basic client-side metric."""
return EvalConfig(
component="text_component_1",
label="demo_simple_text",
data=[
TextInputItem(
id="txt_001",
input="Hello world",
output="Hello world",
expected_output="Hello world",
metrics=[ClientSideMetricConfig(name="relevance", score=1)],
)
],
metrics=[ToxicityConfig(name="toxicity_demo", include_reason=False)],
)
User Guide
Listing evaluations
rakam eval list evals
This shows all functions decorated with @eval_run in the eval/ directory.
Listing runs
This shows all runs hosted on the evaluation server.
rakam eval list runs
Comparing runs
Compare two runs to see what changed:
# Compare by IDs
rakam eval compare --id 42 --id 45
# Save comparison to file
rakam eval compare --id 42 --id 45 -o comparison.json
Command Reference
Full command reference (click to expand)
rakam eval list evals
Usage: rakam eval list evals [OPTIONS] [DIRECTORY]
List evaluations (functions decorated with @eval_run).
╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│ directory [DIRECTORY] Directory to scan (default: ./eval) │
│ [default: eval] │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --recursive -r Recursively search for Python files │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────╯
rakam eval list runs
Usage: rakam eval list runs [OPTIONS]
List runs (newest first).
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --limit -l INTEGER Max number of runs [default: 20] │
│ --offset INTEGER Pagination offset [default: 0] │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────╯
rakam eval run
Usage: rakam eval run [OPTIONS] [DIRECTORY]
Execute evaluations (functions decorated with @eval_run).
╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│ directory [DIRECTORY] Directory to scan (default: ./eval) │
│ [default: eval] │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --recursive -r Recursively search for Python files │
│ --dry-run Only list functions without executing them │
│ --save-runs Save each run result to a JSON file │
│ --output-dir PATH Directory where run results are saved │
│ [default: eval_runs] │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────╯
rakam eval show
Usage: rakam eval show [OPTIONS]
Show a run by ID or tag. Without arguments, shows the most recent run.
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --id -i INTEGER Run ID │
│ --tag -t TEXT Run tag │
│ --raw Print raw JSON instead of formatted output │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────╯
rakam eval compare
Usage: rakam eval compare [OPTIONS]
Compare two evaluation runs.
Default: unified git diff
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --tag -t TEXT Run tag │
│ --id -i INTEGER Run ID │
│ --summary Show summary diff only │
│ --side-by-side Show side-by-side diff (git) │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────╯
rakam eval tag
Usage: rakam eval tag [OPTIONS]
Assign a tag to a run or delete a tag.
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --id -i INTEGER Run ID │
│ --tag -t TEXT Tag to assign to the run │
│ --delete TEXT Delete a tag │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────╯
rakam eval metrics list
Usage: rakam eval metrics list [OPTIONS] [DIRECTORY]
List all metric types used by loaded eval configs.
╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│ directory [DIRECTORY] Directory to scan (default: ./eval) │
│ [default: eval] │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --recursive -r Recursively search for Python files │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────╯
Documentation
For the full user guide, see the official documentation.
License
See main project LICENSE file.
Release files for rakam-systems-cli 0.2.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| rakam_systems_cli-0.2.7.tar.gz | 16.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rakam_systems_cli-0.2.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.3 kB
Release files / rakam_systems_cli-0.2.7.tar.gz
| Download URL | rakam_systems_cli-0.2.7.tar.gz |
|---|---|
| Size | 16.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7c423055e41b87a60d6e729a60fd26d6877045d278d499945b80124ae4c21cb4
|
|
BLAKE2b-256 checksum How to use checksums |
1675a59cb659c77d654f70af747997e724a79ba822e7557e3a706842dd526edc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / rakam_systems_cli-0.2.7-py3-none-any.whl
| Download URL | rakam_systems_cli-0.2.7-py3-none-any.whl |
|---|---|
| Size | 21.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
54bf349ce284c4eb1eac00e0ded9d7a866cb5569c4e86b0e5638439a4ae50550
|
|
BLAKE2b-256 checksum How to use checksums |
78293a03c45f2e70c23ab7c8372eeed8cea85f4ef801649461c457eec681795e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|