Skip to main content
Evals measure how well an agent responds — they score a completed conversation against a test case and return a number from 0 to 100. This tutorial builds an LLM-as-judge eval that scores agent responses for accuracy and completeness, registers it on the app, and connects it to a BullMQ queue for background execution.

Prerequisites

ExuluQueues and eval registration both require an Enterprise Edition license. Without a valid EXULU_ENTERPRISE_LICENSE, app.create() throws when it detects registered queues.

What you will build

A response_quality eval that uses an LLM to judge whether an agent’s response matches the expected output on three criteria: accuracy, completeness, and clarity.
1

Register the eval queue

Evals run as background jobs on the eval_runs queue. Register it in src/evals/index.ts:
src/evals/index.ts
The queue name "eval_runs" is conventional — you can name it anything. The platform’s built-in eval engine uses the same queue name, so using the same name consolidates eval jobs in one place.
2

Define the eval

An LLM-as-judge eval calls provider.generateSync() to score the response. Set llm: true to signal the platform that this eval incurs model cost:
src/evals/index.ts (continued)
A few things to note:
3

Register the eval on the app

src/exulu.ts
evals is an optional array on app.create(). Built-in evals are merged with yours — they coexist in the evals workbench.
4

Create test cases and run evals

After the server starts, go to Build → Evals in the admin interface. You will see response_quality listed alongside the platform’s built-in LLM-as-judge eval.
  1. Open Test cases and click New test case. Provide an input message and an expected output — for example, a question and the correct factual answer.
  2. Go to Runs and click New run. Select the agent, the test case(s), and enable response_quality. Set judge_model in the config section if you want a specific model.
  3. Click Run evals. The eval jobs are enqueued on eval_runs and processed by your worker. Results appear in the Runs tab with the 0–100 score and the full conversation.
For the UI side of evals, see Evals.
5

Call run() programmatically

You can invoke the eval directly from your own code — useful for CI pipelines or local debugging:
run() validates that the returned score is in [0, 100] and throws a descriptive error if it is not. Any score that reaches the caller is always valid.

What you built

  • response_quality — an LLM-as-judge ExuluEval that scores on accuracy, completeness, and clarity.
  • A dedicated eval_runs queue with background execution.
  • Registration via app.create({ evals }).

Next steps

Evals — overview

Create test cases, run evaluations, and interpret scores in the platform UI.

ExuluEval — configuration

Every constructor option: llm, execute, config, queue, and scoring patterns.

Queues and workers

Size eval queues and scope worker processes.