Skip to main content
This page covers judge-family modules only. Framework bridges (agent-judge-spring-ai, agent-judge-langchain4j, agent-judge-koog, agent-judge-agent-client) are documented in the API Reference.

agent-judge-core

Zero external dependencies. These judges work in any Java project.

FileExistsJudge

Verifies that a file exists in the workspace.
The file path is resolved relative to context.workspace().

FileContentJudge

Verifies that a file’s content matches expected criteria. Supports three matching modes:
Produces three granular checks, so on failure you can distinguish β€œfile not found” from β€œfile found but content wrong.”

SupersetDiffJudge

Verifies that the workspace files are a superset of the expected files β€” the agent added content without removing existing files.
Reads the reference directory from context.metadata().get("expectedDir") (a Path or String). Abstains if the key is missing. Extra files in the workspace are allowed β€” this is superset semantics, not exact match.

agent-judge-exec

Requires agent-judge-exec dependency. Executes real processes in the workspace.

BuildSuccessJudge

Runs a Maven or Gradle build and checks the exit code.

CommandJudge

Executes an arbitrary shell command and verifies the exit code.

ClassVersionJudge

Validates Java class file bytecode version.

CoveragePreservationJudge

Parses JaCoCo XML report and checks that line coverage hasn’t dropped more than a threshold compared to a baseline.
Abstains if baselineCoverage is missing from metadata. Fails if no JaCoCo report is found.

CoverageImprovementJudge

Measures coverage improvement as a continuous score, normalized to [0, 1].

agent-judge-file

Requires agent-judge-file dependency. Compares agent output files against reference implementations using structural/semantic comparison.

FileComparisonJudge

Composite judge that dispatches to the appropriate comparator based on file type.
Reads the reference directory from context.metadata().get("expectedDir") (a Path) and compares each file against the workspace.

JavaSemanticJudge

AST-based Java file comparison using JavaParser. Ignores whitespace, comments, and import ordering β€” compares structure, not formatting.

MavenSemanticJudge

Semantic comparison of Maven POM files. Compares dependency lists, plugin configurations, and properties without requiring identical XML formatting.

XmlSemanticJudge

Structure-aware XML comparison. Normalizes whitespace and attribute ordering before comparison.

TextFileJudge

Plain text comparison with whitespace normalization.

agent-judge-llm

Requires agent-judge-llm dependency and Spring AI on the classpath.

CorrectnessJudge

Uses an LLM to evaluate whether the agent accomplished its goal.
Sends the goal and agent output to the LLM, asks for a YES/NO determination with reasoning.

LLMJudge (Abstract Base)

Template method base class for building custom LLM judges. Subclass and implement two methods:
The base class handles LLM invocation β€” you focus on prompt design and response parsing. See Writing Custom Judges for a complete walkthrough.

agent-judge-rag

Requires agent-judge-rag dependency. LLM-powered judges for evaluating retrieval-augmented generation pipelines. All RAG judges use the RagContext metadata convention: RAG judges return ABSTAIN when required metadata is missing rather than producing misleading verdicts.

FaithfulnessJudge

Evaluates whether every claim in the answer is grounded in the provided context. An answer that is factually correct but not supported by the given context is considered unfaithful.

ContextualRelevanceJudge

Evaluates whether the retrieved context is relevant to the question. A natural first-tier judge in a CascadedJury β€” if the context is irrelevant, evaluating faithfulness or hallucination is meaningless.

HallucinationJudge

Detects specific claims in the answer that are not supported by the context. Unlike FaithfulnessJudge which asks β€œis the answer grounded?”, this judge asks β€œwhat specifically was made up?” with per-claim analysis. The most expensive RAG judge β€” a natural final-tier judge in a CascadedJury.

RAG Jury Example

Compose the three RAG judges into a cascaded jury for cost-efficient evaluation:
If the context isn’t relevant, the grounding tier never runs β€” saving tokens.