> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom Evaluator Agent-as-Judge Evaluation

> Score agent output with AgentAsJudgeEval using a strict custom evaluator_agent instead of the default judge.

Demonstrates using a custom evaluator agent for judging.

```python agent_as_judge_custom_evaluator.py theme={null}
"""
Custom Evaluator Agent-as-Judge Evaluation
==========================================

Demonstrates using a custom evaluator agent for judging.
"""

from agno.agent import Agent
from agno.eval.agent_as_judge import AgentAsJudgeEval
from agno.models.openai import OpenAIChat

# ---------------------------------------------------------------------------
# Create Agent
# ---------------------------------------------------------------------------
agent = Agent(
    model=OpenAIChat(id="gpt-5.6-luna"),
    instructions="Explain technical concepts simply.",
)

# ---------------------------------------------------------------------------
# Create Evaluator Agent
# ---------------------------------------------------------------------------
custom_evaluator = Agent(
    model=OpenAIChat(id="gpt-5.6-luna"),
    description="Strict technical evaluator",
    instructions="You are a strict evaluator. Only give high scores to exceptionally clear and accurate explanations.",
)

# ---------------------------------------------------------------------------
# Create Evaluation
# ---------------------------------------------------------------------------
evaluation = AgentAsJudgeEval(
    name="Technical Accuracy",
    criteria="Explanation must be technically accurate and comprehensive",
    scoring_strategy="numeric",
    threshold=8,
    evaluator_agent=custom_evaluator,
)

# ---------------------------------------------------------------------------
# Run Evaluation
# ---------------------------------------------------------------------------
if __name__ == "__main__":
    response = agent.run("What is machine learning?")
    result = evaluation.run(
        input="What is machine learning?",
        output=str(response.content),
        print_results=True,
    )
    print(f"Score: {result.results[0].score}/10")
    print(f"Passed: {result.results[0].passed}")
```

## Run the Example

<Snippet file="create-venv-step.mdx" />

**1. Install dependencies**

```bash theme={null}
uv pip install -U agno openai
```

**2. Export your OpenAI API key**

```bash Mac/Linux theme={null}
export OPENAI_API_KEY="your_openai_api_key_here"
```

```bash Windows theme={null}
$Env:OPENAI_API_KEY="your_openai_api_key_here"
```

**3. Run the example**

Save the code above as `agent_as_judge_custom_evaluator.py`, then run:

```bash theme={null}
python agent_as_judge_custom_evaluator.py
```

Full source: [cookbook/09\_evals/agent\_as\_judge/agent\_as\_judge\_custom\_evaluator.py](https://github.com/agno-agi/agno/blob/v3.0.4/cookbook/09_evals/agent_as_judge/agent_as_judge_custom_evaluator.py)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.