跳转至

File Evidence Ingestion Demo

核心问题

共享文件空间 / 云盘入口如何接入 Harness:员工上传 Word、PPT、Excel、压缩包、代码包、外部链接说明或业务专用格式后,系统不能直接摘要进知识库,也不能在不能解析时丢弃原始材料。

正确链路是先形成 Evidence:

uploaded file
  -> source snapshot + sha256 + permission + parser_hint + extraction_status
  -> parsed / pending_parse / needs_review / unsupported
  -> Knowledge-ready items 才进入 ContextDocument、Ontology artifact 或 Skill

当前 Demo

实现入口:

  • framework/connectors/evidence_ingestion.py
  • scripts/evidence_ingestion_demo.py
  • domain/orgreorg-demo/ingestion/shared-file-space-synthetic.json
  • vault/10-raw/synthetic-shared-file-space/

验证命令:

python scripts/evidence_ingestion_demo.py --write-report
python scripts/evidence_ingestion_demo.py --check-report

输出报告:

  • vault/50-outputs/file-evidence-ingestion-results.json
  • vault/50-outputs/file-evidence-ingestion-analysis.md

当前结论

  • 6 个 synthetic 上传物都能成为 Evidence-ready。
  • 只有 2 个已解析材料进入 Knowledge-ready。
  • DOCX 和 XLSX 当前保持 pending_parse,不伪装成已知识化。
  • 财务专用格式进入 unsupported,需要领域 adapter 或人工导出。
  • restricted 文件必须携带 PII 或 field mask,后续才能做权限披露和脱敏投影。

这个 Demo 的意义不是证明“文件能上传”,而是验证文件入口不会破坏 Evidence -> Ontology -> Runtime Projection 的主链路。