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:- The metric receives the dataset item (input, output, context, expected)
- A structured prompt is constructed for the specific metric
- The prompt is sent to the judge LLM
- The LLM returns a structured response with a score and rationale
- 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 aScoreResult:
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 evaluations —
evaluate()runs metrics on a dataset - Trace evaluations —
evaluate_trace()extracts data from a trace and evaluates - Failure Analysis — FA uses metric scores as evidence for failure classification
- Trends —
get_trends()tracks metric scores over time - Comparisons —
compare_runs()compares metrics across evaluation runs