Add committed zh judge-prompt cache + enable in Siemens scenarios + docs

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
wangwei
2026-07-01 18:15:53 +08:00
co-authored by Copilot
parent 065b0e0f1a
commit 24a8688a34
14 changed files with 1670 additions and 3 deletions
+3 -1
View File
@@ -23,12 +23,14 @@ CACHE_ROOT = _REPO_ROOT / "configs" / "judge_prompts"
# Metric name -> prompt instance attribute names holding a BasePrompt.
# Verified against RAGAS 0.4.3 collections source; semantic_similarity has none.
# NOTE: noise_sensitivity's statement_prompt and faithfulness_prompt use function-based
# to_string() (ragas.prompt.metrics.common) without instruction/examples attributes,
# so they cannot be adapted with adapt() and are intentionally excluded here.
METRIC_PROMPT_ATTRS: dict[str, tuple[str, ...]] = {
"faithfulness": ("statement_generator_prompt", "nli_statement_prompt"),
"answer_relevancy": ("prompt",),
"context_recall": ("prompt",),
"context_precision": ("prompt",),
"noise_sensitivity": ("statement_prompt", "faithfulness_prompt"),
"factual_correctness": ("prompt", "nli_prompt"),
}