From 2cab40b6e027ac9818669c47d300cb2dd92ac7bd Mon Sep 17 00:00:00 2001 From: Wenjie Zhang Date: Wed, 24 Dec 2025 00:03:59 +0800 Subject: [PATCH] =?UTF-8?q?fix(RAGEvaluationTab):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=8C=87=E6=A0=87=E5=80=BC=E6=A0=BC=E5=BC=8F=E5=8C=96=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E4=B8=AD=E7=99=BE=E5=88=86=E6=AF=94=E8=BD=AC=E6=8D=A2?= =?UTF-8?q?=E7=9A=84=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将val < 1改为val <= 1以确保所有0.0-1.0范围的检索指标都能正确转换为百分比 --- docs/latest/changelog/roadmap.md | 1 - web/src/components/RAGEvaluationTab.vue | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/latest/changelog/roadmap.md b/docs/latest/changelog/roadmap.md index df4782d2..2fd44b79 100644 --- a/docs/latest/changelog/roadmap.md +++ b/docs/latest/changelog/roadmap.md @@ -22,7 +22,6 @@ - 目前的知识库的图片存在公开访问风险 - 工具传递给模型的时候,使用英文,但部分模型不支持中文函数名(如gpt-4o-mini) - 首页加载的问题 -- lightrag 类型的图谱的节点数量统计有问题 ### 新增 - 新增对于上传附件的智能体中间件,详见[文档](https://xerrors.github.io/Yuxi-Know/latest/advanced/agents-config.html#%E6%96%87%E4%BB%B6%E4%B8%8A%E4%BC%A0%E4%B8%AD%E9%97%B4%E4%BB%B6) diff --git a/web/src/components/RAGEvaluationTab.vue b/web/src/components/RAGEvaluationTab.vue index 9b44069d..3bf54373 100644 --- a/web/src/components/RAGEvaluationTab.vue +++ b/web/src/components/RAGEvaluationTab.vue @@ -941,7 +941,8 @@ const getMetricShortName = (key) => { // 格式化指标值 const formatMetricValue = (val) => { if (typeof val !== 'number') return '-'; - if (val < 1) return (val * 100).toFixed(1) + '%'; + // 检索指标(recall, precision, f1 等)范围是 0.0-1.0,统一转换为百分比 + if (val <= 1) return (val * 100).toFixed(1) + '%'; return val.toFixed(3); };