Package dev.dokimos.server.judge
Class JudgeScorer
java.lang.Object
dev.dokimos.server.judge.JudgeScorer
Drives a single judge scoring: builds the prompt from a criteria and the selected parameters, calls
the underlying
JudgeLM, and parses the response. A failed parse yields a non-successful
outcome with the failure reason rather than throwing; an HTTP failure propagates as a
JudgeCallException so the worker can apply retry logic.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordThe result of scoring one item: a numeric score, the judge's reasoning, and the pass decision. -
Constructor Summary
ConstructorsConstructorDescriptionJudgeScorer(JudgeLM judge, String criteria, List<EvalTestCaseParam> params, double minScore, double maxScore, Double threshold) -
Method Summary
Modifier and TypeMethodDescriptionScores one item.
-
Constructor Details
-
JudgeScorer
public JudgeScorer(JudgeLM judge, String criteria, List<EvalTestCaseParam> params, double minScore, double maxScore, Double threshold)
-
-
Method Details
-
score
Scores one item.- Parameters:
input- the rendered input valueexpectedOutput- the rendered expected output valueactualOutput- the rendered actual output value- Returns:
- the score, reason, and pass/fail decision
- Throws:
JudgeCallException- if the underlying judge call fails
-