Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions libs/giskard-checks/src/giskard/checks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,14 @@

from giskard.agents import add_prompts_path

from . import builtin
from . import builtin, judges
from .builtin import (
BaseLLMCheck,
Conformity,
Equals,
FnCheck,
GreaterEquals,
GreaterThan,
Groundedness,
LesserThan,
LesserThanEquals,
LLMCheckResult,
LLMJudge,
NotEquals,
SemanticSimilarity,
StringMatching,
Expand All @@ -38,6 +33,13 @@
from .core.interaction import BaseInteractionSpec
from .generators.user import UserSimulator
from .interaction import InteractionSpec
from .judges import (
BaseLLMCheck,
Conformity,
Groundedness,
LLMCheckResult,
LLMJudge,
)
from .scenarios.builder import ScenarioBuilder, scenario
from .scenarios.runner import ScenarioRunner
from .settings import get_default_generator, set_default_generator
Expand All @@ -61,6 +63,7 @@
__all__ = [
# Modules
"builtin",
"judges",
# Core classes
"Check",
"CheckResult",
Expand Down
10 changes: 6 additions & 4 deletions libs/giskard-checks/src/giskard/checks/builtin/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
"""Built-in check implementations and helpers."""

from .base import BaseLLMCheck, LLMCheckResult
# Import judge checks from new location and re-export for backward compatibility
from ..judges import BaseLLMCheck, Conformity, Groundedness, LLMCheckResult, LLMJudge

# Import comparison checks (staying in builtin)
from .comparison import (
Equals,
GreaterEquals,
Expand All @@ -9,10 +12,9 @@
LesserThanEquals,
NotEquals,
)
from .conformity import Conformity

# Import other builtin checks (staying in builtin)
from .fn import FnCheck, from_fn
from .groundedness import Groundedness
from .judge import LLMJudge
from .semantic_similarity import SemanticSimilarity
from .string_matching import StringMatching

Expand Down
14 changes: 14 additions & 0 deletions libs/giskard-checks/src/giskard/checks/judges/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"""LLM-based judge checks for evaluating interactions."""

from .base import BaseLLMCheck, LLMCheckResult
from .conformity import Conformity
from .groundedness import Groundedness
from .judge import LLMJudge

__all__ = [
"BaseLLMCheck",
"LLMCheckResult",
"Conformity",
"Groundedness",
"LLMJudge",
]
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class Conformity[InputType, OutputType, TraceType: Trace]( # pyright: ignore[re
@override
def get_prompt(self) -> TemplateReference:
"""Return the Jinja2 template name for conformity evaluation."""
return TemplateReference(template_name="giskard.checks::checks/conformity.j2")
return TemplateReference(template_name="giskard.checks::judges/conformity.j2")

@override
async def get_inputs(self, trace: Trace[InputType, OutputType]) -> dict[str, str]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class Groundedness[InputType, OutputType, TraceType: Trace]( # pyright: ignore[

@override
def get_prompt(self) -> TemplateReference:
return TemplateReference(template_name="giskard.checks::checks/groundedness.j2")
return TemplateReference(template_name="giskard.checks::judges/groundedness.j2")

@override
async def get_inputs(self, trace: Trace[InputType, OutputType]) -> dict[str, str]:
Expand Down