Skip to main content
Composite evaluators are advanced custom evaluators that can access and leverage the results of other evaluators to perform sophisticated evaluations. Unlike standard evaluators that operate independently, composite evaluators build upon previously computed evaluator values to create more nuanced and context-aware assessments.

What are composite evaluators?

A composite evaluator is a custom evaluator that has access to other evaluators computed on the current step or any of its child steps. This allows you to:
  • Combine multiple evaluator scores into a single comprehensive evaluation
  • Apply conditional logic based on evaluator values
  • Create hierarchical evaluations that aggregate scores across sessions, traces, and spans
  • Build context-aware evaluators that only calculate when certain conditions are met
Composite evaluators use the required_metrics parameter to specify which evaluators they depend on. These required evaluators are guaranteed to be computed before the composite evaluator runs, and their values are accessible via the step_object.metrics dictionary.

Common use cases

Conditional evaluation

Calculate an evaluator only when another evaluator meets certain criteria: Example: Only calculate adherence if the input prompt is correct Required evaluators: SplunkAOEvaluators.correctness, SplunkAOEvaluators.context_adherence

Hierarchical aggregation

Aggregate evaluator values across different levels of your application hierarchy: Example: Calculate average evaluator scores across all spans in a session Required evaluators: SplunkAOEvaluators.context_adherence

Multi-evaluator analysis

Combine multiple evaluators to detect specific patterns or issues: Example: Check for PII and count occurrences if found Required evaluators: SplunkAOEvaluators.output_pii

Cross-span evaluation

Use evaluators across different span types in a trace: Example: Combine retriever and LLM evaluators for RAG evaluation Required evaluators: SplunkAOEvaluators.context_relevance, SplunkAOEvaluators.context_adherence

Specifying required evaluators

The required_metrics parameter tells Splunk Agent Observability which evaluators must be computed before your composite evaluator runs. This ensures the evaluator values are available when your scorer function executes. You specify required evaluators when creating your code-based custom evaluator:
  • In the UI: Select evaluators from the “Required Evaluators” dropdown (see how)
  • In the Python SDK: Pass the required_metrics parameter

Splunk Agent Observability preset evaluators

For Splunk Agent Observability’s built-in evaluators, use the SplunkAOEvaluators enum. For example, you might select:
  • SplunkAOEvaluators.context_adherence
  • SplunkAOEvaluators.context_adherence_luna
  • SplunkAOEvaluators.correctness

Custom evaluators

For your own custom evaluators, reference them by name as strings. You can also mix custom evaluators with Splunk Agent Observability preset evaluators:
  • "My Custom Evaluator" (string for custom evaluator)
  • "Compliance Check" (string for custom evaluator)
  • SplunkAOEvaluators.output_pii (Splunk Agent Observability preset evaluator)

Accessing evaluator values

Once you’ve specified required evaluators, access them through the step_object.metrics dictionary:

Boolean vs. float evaluators

Different Splunk Agent Observability evaluators return different value types:
  • Boolean evaluators (e.g. correctness, context_adherence) are evaluated by multiple judges and return a list[int] at the root level, where each element is 0 (false) or 1 (true) — one value per judge.
  • Float evaluators (e.g. completeness) return a single float between 0 and 1.
When using a boolean evaluator in your composite scorer, you must handle the list:

Complete example: multi-level session evaluator

This example demonstrates a comprehensive composite evaluator that aggregates scores from all hierarchy levels. Required evaluators to select (in UI dropdown or SDK parameter):
  • SplunkAOEvaluators.conversation_quality
  • SplunkAOEvaluators.action_completion
  • SplunkAOEvaluators.agent_efficiency
  • SplunkAOEvaluators.action_completion_luna
  • SplunkAOEvaluators.action_advancement
  • SplunkAOEvaluators.context_adherence
  • SplunkAOEvaluators.context_relevance
  • SplunkAOEvaluators.tool_error_rate

Best practices

Be specific with required evaluators

Only include evaluators you actually use. This improves performance and makes your evaluator’s dependencies clear:

Use appropriate step types

Match your composite evaluator’s step type to where the required evaluators exist:
  • Session: Can access session, trace, and span evaluators
  • Trace: Can access trace and span evaluators
  • Span: Can only access evaluators on that specific span

Execution restrictions

Composite evaluators depend on the successful completion of their required_metrics:
  • While any required evaluator is not yet final (e.g., queued or computing), the composite evaluator remains queued.
  • If any required evaluator finishes without a successful final status (e.g., failed, not computed, or not applicable), the composite evaluator raises an error that includes the failed statuses of those required evaluators.
  • Evaluators not listed in required_metrics do not affect the composite evaluator—only the required ones gate execution.

Creating composite evaluators

Composite evaluators can be created in two ways:
  1. Splunk Agent Observability UI: Use the custom code-based evaluators editor and select required evaluators from the “Required Evaluators” dropdown
  2. Python SDK: Add the required_metrics parameter when creating code-based evaluators
Composite evaluators are only supported for code-based custom evaluators. LLM-as-a-judge evaluators do not support the required_metrics parameter.

Create composite evaluators in the UI

Learn how to create composite evaluators using the Splunk Agent Observability UI

Python SDK reference

View Python SDK documentation for evaluators

Custom evaluators overview

Learn about custom code-based evaluators in Splunk Agent Observability

Next steps

Custom code-based evaluators

Learn how to create custom code-based evaluators in Splunk Agent Observability

Evaluators overview

Explore Splunk Agent Observability’s comprehensive evaluators framework

Run experiments with evaluators

Learn how to use evaluators in experiments