Skip to main content
The osmosis-ai CLI provides two main commands: preview for inspecting configurations and eval for running evaluations.

Installation

The CLI is accessible via three aliases:

Global Usage


Commands

preview

Inspect and validate rubric configurations or dataset files.

Usage

Options

Examples

Preview a rubric configuration:
Preview a dataset:

Output

The command will:
  • Validate the file structure
  • Display parsed contents in a readable format
  • Show count summary (number of rubrics or records)
  • Report any validation errors

eval

Evaluate a dataset against a rubric configuration.

Usage

Required Options

Optional Parameters

Examples

Basic evaluation:
Multiple runs for variance analysis:
Custom output location:
Compare against baseline:
Custom configuration file:

Configuration Files

Rubric Configuration (YAML)

The rubric configuration file defines evaluation criteria and model settings.

Structure

Required Fields

  • version: Configuration schema version (currently 1)
  • rubrics: List of rubric definitions

Rubric Definition Fields

Model Info Fields

Auto-Discovery

If you don’t specify --config, the CLI searches for rubric_configs.yaml in:
  1. Same directory as the data file
  2. Current working directory
  3. ./examples/ subdirectory

Dataset Format (JSONL)

Each line in the JSONL file represents one evaluation record.

Minimal Example

Complete Example

Field Reference


Output Format

Console Output

During evaluation, you’ll see:

JSON Output File

The output JSON file contains detailed results:

Supported Providers

Provider Configuration Example


Advanced Usage

Baseline Comparison

Compare new evaluations against a baseline to detect regressions:
The output will include delta statistics showing improvements or regressions.

Variance Analysis

Run multiple evaluations per record to measure score consistency:
Useful for:
  • Understanding rubric stability
  • Detecting ambiguous criteria
  • A/B testing different prompts

Batch Processing

Process multiple datasets:

Custom Cache Location

Override the default cache directory:

Error Handling

Common Errors

API Key Not Found

Solution: Set the environment variable:

Rubric Not Found

Solution: Check your rubric_configs.yaml and ensure the rubric ID matches exactly.

Invalid JSONL Format

Solution: Validate your JSONL file. Each line must be valid JSON.

Model Not Found

Solution: Use a valid model identifier for your chosen provider.

Timeout Error

Solution: Increase the timeout in your model configuration:

Best Practices

Writing Effective Rubrics:
  • Be specific and measurable
  • Include clear criteria and examples
  • Test with sample data before large-scale evaluation
Dataset Preparation:
  • Include diverse examples with relevant metadata
  • Validate JSONL syntax before evaluation
  • Keep solution_str concise but complete
Performance Optimization:
  • Process datasets in batches for cost efficiency
Cost Management:
  • Start with small samples to test rubrics
  • Monitor API usage through provider dashboards

Troubleshooting

Debug Mode:
Verify Installation:
Test Setup:
Check Results:

Next Steps

Quick Start

New to the CLI? Start with the quick start guide

Decorators & API

Learn about programmatic usage with Python decorators