fix: distinguish external knowledge probe failures from empty results

Validate Dify and RAGFlow outcomes, normalize FastGPT URLs, and report response envelopes, score structures and actual rerank state. Align integration documentation with official APIs and archive 33 redacted read-only requests with strict HTTPS verification.

Validation: 43 focused tests, typecheck and lint passed. Full test runs exceeded 60s and 240s without a summary; this limitation is recorded in the feature progress document.
This commit is contained in:
mesalogo
2026-09-10 22:19:30 +08:00
parent d9114c20bf
commit 4483c92b57
10 changed files with 2255 additions and 74 deletions
+28
View File
@@ -15,6 +15,34 @@
## 验证证据
2026-09-10 官方 API 核对与真实实例复测:
- 官方资料链接与版本差异见[技术设计第 9 节](./external-knowledge-technical-design.md#9-provider-映射)。
已修正 Dify 默认配置优先级、FastGPT 端点响应与数组评分说明、RAGFlow 新旧候选数参数边界。
- 使用现有本地测试配置与脚本默认查询,执行基础 14 次、扩展 19 次,共 33 次只读请求,
其中检索 17 次。未调用远端内容写入、聊天或生成端点;检索所用 Embedding、重排及审计
用量由远端服务处理,不据此推断底层模型调用次数。
- 两轮均在独立 Node 进程显式设置 `NODE_TLS_REJECT_UNAUTHORIZED=1`。两个 Dify 实例与
FastGPT 的 HTTPS 请求通过严格证书校验;RAGFlow 使用 HTTP。
- [基础报告](./external-knowledge-probe-2026-09-10-strict.json)和
[扩展报告](./external-knowledge-probe-2026-09-10-extended.json)保留脱敏状态、数量、字段结构
和耗时。每个实例只对目录选出的一个库执行检索,未遍历全部库。
| 实例 | 目录与详情 | 检索结果 |
| --- | --- | --- |
| Dify 0.15.8 | 目录 3 项;详情 HTTP 405 | 默认与显式当前配置请求均成功,均为 0 条;非空结果尚未验证 |
| Dify 1.17.0 | 目录 1 项;详情成功 | 默认与显式当前配置均为 3 条非空结果 |
| FastGPT,版本未确认 | 根目录 1 个 Dataset;详情 HTTP 200、业务码 200 | 向量 8 条、全文 2 条、混合 7 条、混合加重排 9 条;重排响应明确为启用;检索包装为 `data.list`,`score` 为数组 |
| RAGFlow,版本未确认 | 目录 29 项;详情成功;18 项配置图谱、16 项有完成证据 | 基础 2 条、图谱 3 条、知识编译开关 2 条;请求均 HTTP 200、业务码 0,但没有知识编译配置证据 |
- 修正探测脚本将 Dify/RAGFlow 失败记成零命中的问题,增加实际调用与成功标记,统一
FastGPT 地址规范化并记录分数结构、响应中的重排状态。未修改产品客户端;旧 FastGPT
检索数组包装、数组评分映射及上一轮发现的取消分类问题仍待处理。
- 三组探测测试共 43 项通过,包含两份新报告的脱敏与只读操作检查;`npm run typecheck`、`npm run lint` 通过。
`npm test` 先后达到 60 秒和 240 秒执行时限,均未输出汇总,全量回归尚未完成。
- 本轮未验证真实 401/403/404/429、超时、取消、Scoped Key、分页、元数据过滤或候选数
参数效果。探测脚本不打包到桌面或 GoodBuddy Agent,本次未改变远程 Runtime 生产路径。
2026-09-09 外部知识库适配基础验证:
- 使用本机未入库的测试配置累计执行 107 次只读请求,其中更新后的最终归档脚本执行 19 次;脚本