fix(RAGEvaluationTab): 修复指标值格式化逻辑中百分比转换的条件

将val < 1改为val <= 1以确保所有0.0-1.0范围的检索指标都能正确转换为百分比
This commit is contained in:
Wenjie Zhang 2025-12-24 00:03:59 +08:00
parent 4eb2c4977e
commit 2cab40b6e0
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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);
};