Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:AISecurityLab Hackagent Build Panel

From Leeroopedia
Knowledge Sources
Domains Evaluation, Configuration
Last Updated 2026-10-29 00:00 GMT

Overview

Concrete function binding judge specs to model instances as a Panel, failing rather than shrinking the panel if a judge cannot connect, provided by the HackAgent evaluation package.

Description

build_panel() takes a sequence of JudgeSpec objects, a model resolver callable, and aggregation/threshold settings. For each spec, it calls the resolver to get a CompletionModel, wraps it as a ModelJudge (with kind, name, system_prompt, threshold), and returns a Panel. If a judge cannot be connected, it raises rather than silently dropping the judge. Judge names are deduplicated (e.g. harmbench, harmbench#2).

Usage

  • Campaign resolution: resolve_campaign calls build_panel() to construct the evaluation panel from judge specs.

Code Reference

Source Location

Signature

def build_panel(
    specs: Sequence[JudgeSpec],
    models: Callable[[JudgeSpec], CompletionModel],
    *,
    aggregation: str = "majority",
    threshold: float = 7.0,
) -> Optional[Panel]: ...

Import

from hackagent.evaluation.config import build_panel

Usage Examples

Build a Panel from Judge Specs

from hackagent.evaluation.config import build_panel

panel = build_panel(
    specs=[judge_spec1, judge_spec2],
    models=lambda spec: connect(spec),
    aggregation="majority",
    threshold=7.0,
)

Related Pages

Implements Principle

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment