Skip to main content
ExuluEval defines a single evaluation function: a name, an execute callback that scores a completed agent run on a 0–100 scale, and an optional queue for background execution. Evals you register on ExuluApp are merged with the platform’s built-in LLM-as-judge eval and appear in the evals workbench, where administrators create test cases and trigger eval runs. See Evals for the UI side.
Evals require Redis (REDIS_HOST + REDIS_PORT). Without Redis, app.create() skips eval registration entirely — including the evals you pass and the built-in ones. Confirm Redis is reachable before relying on eval runs.

What an eval gives you

0–100 score contract

run() enforces the range — scores outside 0–100 throw immediately, so upstream code can always treat the return value as a valid percentage.

Full conversation access

execute receives the complete UIMessage[] array including tool calls, so you can score tool usage, response content, and conversation flow.

Test case structure

Structured test cases carry expected_output, expected_tools, expected_knowledge_sources, and expected_agent_tools for richly typed assertions.

LLM-as-judge flag

Declare llm: true to signal that the eval calls a language model internally — the platform UI uses this to warn about cost and latency.

Queue support

Pass a queue and IMP can run eval jobs in the background via BullMQ. Requires the Enterprise Edition license.

Config params

An optional config array lets administrators pass runtime parameters (for example, a list of required keywords or a judge agent ID) without modifying code.

Minimal example

Register it on the app:

Scoring approaches

Compare the response text to testCase.expected_output directly — ideal for deterministic outputs like dates, numbers, or codes.

Running an eval

Call run() to execute the eval against a resolved agent run:
run() invokes execute, validates that the returned number is in [0, 100], and throws a descriptive error if it is not — so any score that reaches the caller is always valid.

Next steps

Configuration

Every constructor option: id, llm, execute, config, and queue.

API reference

The run() method, score-range enforcement, and public properties.