# Online Evaluation Rules

> Monitor and evaluate production processes effectively with Opik's comprehensive online evaluation rules.

<div>
  <iframe src="https://www.loom.com/embed/e79c927b96414955ab722dea74b6ea42?sid=10dc8363-47a1-42a1-9757-306084186977" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen />
</div>

## Continuous Production Monitoring with Real-Time Evaluation

This video introduces [production monitoring](https://www.comet.com/docs/opik/production/production_monitoring) through Opik's [online evaluation rules](https://www.comet.com/docs/opik/production/rules), enabling continuous quality assessment of your LLM applications once they're deployed. Unlike batch [evaluations](https://www.comet.com/docs/opik/evaluation/overview) used during development, [online evaluation rules](https://www.comet.com/docs/opik/production/rules) automatically score production [traces](https://www.comet.com/docs/opik/tracing/log_traces) in near real-time as they're logged to Opik. You'll learn to create custom [LLM-as-a-judge](https://www.comet.com/docs/opik/evaluation/metrics/g_eval) [metrics](https://www.comet.com/docs/opik/evaluation/metrics/overview) for helpfulness and [moderation](https://www.comet.com/docs/opik/evaluation/metrics/moderation) that provide ongoing insights into production performance.

## Key Highlights

* **Real-Time Production Scoring**: Automatic [evaluation](https://www.comet.com/docs/opik/evaluation/overview) of production [traces](https://www.comet.com/docs/opik/tracing/log_traces) as they occur, moving beyond development-time batch [evaluations](https://www.comet.com/docs/opik/evaluation/overview) to continuous [monitoring](https://www.comet.com/docs/opik/production/production_monitoring)
* **Dual Metric Types**: Choose between [LLM-as-a-judge](https://www.comet.com/docs/opik/evaluation/metrics/g_eval) [metrics](https://www.comet.com/docs/opik/evaluation/metrics/overview) for sophisticated [evaluation](https://www.comet.com/docs/opik/evaluation/overview) and code [metrics](https://www.comet.com/docs/opik/evaluation/metrics/overview) for programmatic scoring based on your needs
* **Custom [Evaluation](https://www.comet.com/docs/opik/evaluation/overview) Prompts**: Create tailored [prompts](https://www.comet.com/docs/opik/prompt_engineering/prompt_management) using mustache/handlebar notation to inject input/output variables for context-aware scoring
* **Flexible Scoring Scales**: Configure different scoring ranges (1-10 for helpfulness, 0-1 for [moderation](https://www.comet.com/docs/opik/evaluation/metrics/moderation)) with customizable output types (integer, float, boolean)
* **Variable Mapping System**: Map [evaluation](https://www.comet.com/docs/opik/evaluation/overview) variables to specific fields in your data structure, ensuring accurate context injection for scoring
* **Comprehensive Score Tracking**: View [evaluation](https://www.comet.com/docs/opik/evaluation/overview) results directly in [trace](https://www.comet.com/docs/opik/tracing/log_traces) views with associated reasoning explanations for each score decision
* **Multiple Rule Support**: Run multiple [evaluation rules](https://www.comet.com/docs/opik/production/rules) simultaneously (helpfulness, [moderation](https://www.comet.com/docs/opik/evaluation/metrics/moderation), etc.) for multi-dimensional quality assessment
* **Production Benefits**: Continuous [monitoring](https://www.comet.com/docs/opik/production/production_monitoring), performance degradation detection, development-production feedback loops, and problematic pattern identification
* **Actionable Insights**: Each score includes AI reasoning (e.g., "correctly identifies Paris as capital") enabling understanding of [evaluation](https://www.comet.com/docs/opik/evaluation/overview) decisions