Skip to main content
Valiqor’s evaluation engine measures AI output quality using a combination of heuristic metrics (fast, deterministic) and LLM judge metrics (semantic, context-aware). This page explains what each metric measures, how scoring works, and how quality grades are assigned.

Metrics Overview

Valiqor ships with 17 built-in metrics across two categories:

4 Heuristic Metrics

Fast, deterministic checks that don’t require an LLM. Ideal for format validation, exact matching, and string comparison.

13 LLM Judge Metrics

Semantic evaluation using an LLM as a judge. Used for quality, relevance, hallucination detection, and task adherence.

Heuristic Metrics

These metrics run locally without any LLM calls. They return a score between 0.0 and 1.0: Usage example:

LLM Judge Metrics

These metrics use an LLM to evaluate output quality semantically. Each metric sends a structured prompt to the judge model and receives a normalized score (0.0–1.0) with an explanation.

Quality & Relevance

Factual Accuracy

RAG-Specific

Specialized


How LLM Judging Works

Each LLM judge metric follows this flow:
  1. The metric receives the dataset item (input, output, context, expected)
  2. A structured prompt is constructed for the specific metric
  3. The prompt is sent to the judge LLM
  4. The LLM returns a structured response with a score and rationale
  5. The score is normalized to the 0.0–1.0 range
The judge model defaults to gpt-4o but can be configured. You can use your own OpenAI API key via the openai_api_key parameter — see BYOK for details.

Score Results

Each metric evaluation produces a ScoreResult:

Aggregation & Quality Grades

When evaluating a dataset with multiple items and metrics, Valiqor computes aggregate scores:

Aggregation

  • Per-metric average: Mean of all item scores for each metric
  • Overall quality: Mean of all per-metric averages

Quality Grades

The overall quality score is mapped to a letter grade: The default quality threshold is 0.7 (Grade C). Scores below this trigger insights and recommendations in the evaluation result.

Metric Configuration

You can customize which metrics to run and configure them per-project:

Quality Threshold

The default quality threshold is 0.7 (Grade C). Scores below this trigger insights and recommendations in the evaluation result. You can adjust this threshold per-project.

Dataset Format

Evaluation datasets are lists of dictionaries. Required and optional fields depend on the metrics being used:

Where Metrics Are Used

Evaluation metrics appear throughout Valiqor:
  • Standalone evaluationsevaluate() runs metrics on a dataset
  • Trace evaluationsevaluate_trace() extracts data from a trace and evaluates
  • Failure Analysis — FA uses metric scores as evidence for failure classification
  • Trendsget_trends() tracks metric scores over time
  • Comparisonscompare_runs() compares metrics across evaluation runs
See the Evaluations workflow for complete usage examples.