2020 )
2121}
2222
23- # LLM-judge evaluators (general_question, guardrail, dashboard_summary) require the
24- # [llm-judge] extra. Their modules are imported lazily on first use so the CLI
23+ # LLM-judge evaluators (general_question, guardrail, dashboard_summary, knowledge_question)
24+ # require the [llm-judge] extra. Their modules are imported lazily on first use so the CLI
2525# starts without openai.
26+ #
27+ # knowledge_question reuses GeneralQuestionEvaluator directly: both are free-text-rubric,
28+ # LLM-judged prose answers -- knowledge_question just covers platform/product/policy facts
29+ # instead of LDM-grounded ones. `ItemReport.test_kind` is tagged from the dataset item's own
30+ # `test_kind` field (see runner.py), not from the evaluator class, so sharing one class
31+ # across both kinds does not mislabel results.
2632_LAZY_EVALUATOR_MODULES : dict [str , str ] = {
2733 "general_question" : "gooddata_eval.core.evaluators.general_question" ,
2834 "guardrail" : "gooddata_eval.core.evaluators.guardrail" ,
2935 "dashboard_summary" : "gooddata_eval.core.evaluators.summary" ,
36+ "knowledge_question" : "gooddata_eval.core.evaluators.general_question" ,
3037}
3138_LAZY_EVALUATOR_CLASSES : dict [str , str ] = {
3239 "general_question" : "GeneralQuestionEvaluator" ,
3340 "guardrail" : "GuardrailEvaluator" ,
3441 "dashboard_summary" : "DashboardSummaryEvaluator" ,
42+ "knowledge_question" : "GeneralQuestionEvaluator" ,
3543}
3644
3745
@@ -57,9 +65,9 @@ def _openai_available() -> bool:
5765def supported_test_kinds () -> set [str ]:
5866 """Return all supported test_kind values.
5967
60- LLM-judge kinds (general_question, guardrail) are excluded when the
61- [llm-judge] extra (openai) is not installed — those items are skipped
62- rather than erroring out mid-run.
68+ LLM-judge kinds (general_question, guardrail, dashboard_summary,
69+ knowledge_question) are excluded when the [llm-judge] extra (openai) is
70+ not installed — those items are skipped rather than erroring out mid-run.
6371 """
6472 kinds = set (_EAGER_EVALUATORS )
6573 if _openai_available ():
0 commit comments