MCPcopy Create free account
hub / github.com/NousResearch/hermes-agent-self-evolution / EvalExample

Class EvalExample

evolution/core/dataset_builder.py:21–40  ·  view source on GitHub ↗

A single evaluation example.

Source from the content-addressed store, hash-verified

19
20@dataclass
21class EvalExample:
22 """A single evaluation example."""
23 task_input: str # What the user asks
24 expected_behavior: str # Rubric — what a good response looks like
25 difficulty: str = "medium" # easy, medium, hard
26 category: str = "general" # Category for stratified eval
27 source: str = "synthetic" # synthetic, sessiondb, golden
28
29 def to_dict(self) -> dict:
30 return {
31 "task_input": self.task_input,
32 "expected_behavior": self.expected_behavior,
33 "difficulty": self.difficulty,
34 "category": self.category,
35 "source": self.source,
36 }
37
38 @classmethod
39 def from_dict(cls, d: dict) -> "EvalExample":
40 return cls(**{k: v for k, v in d.items() if k in cls.__dataclass_fields__})
41
42
43@dataclass

Calls

no outgoing calls