Update API docs: document judge_language in all score endpoints
- POST /api/score: add judge_language section with default/usage - POST /api/score/async: mention judge_language in docstring - POST /api/score/session_async: add to description string + JSON example - ScoreRequest / SessionScoreRequest: add judge_language to schema example - request_summary snapshots: include judge_language for observability Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -91,6 +91,12 @@ def score_sample(
|
||||
- `factual_correctness` — 回答与参考答案的事实准确性(需 ground_truth)
|
||||
- `semantic_similarity` — 回答与参考答案的语义相似度(需 ground_truth)
|
||||
|
||||
**中文评判 `judge_language`**:
|
||||
- 默认 `"en"`(使用英文评判 prompt)。
|
||||
- 传 `"zh"` 开启中文评判 prompt,提升对中文语料的判定一致性(架构设计 §10.5)。
|
||||
- 可通过 `.env` 设置 `RAGAS_JUDGE_LANGUAGE=zh` 作为全局默认,请求字段优先级更高。
|
||||
- 注意:`noise_sensitivity` 使用内置函数式 prompt,不受此参数影响,始终保持英文。
|
||||
|
||||
**推荐模型配置**:
|
||||
- `judge_model`: `gpt-5`
|
||||
- `embedding_model`: `text-embedding-3-small`
|
||||
|
||||
Reference in New Issue
Block a user