Skip to content

[Finance Evidence] Persist provenance for structured financial tool results #29

Closed

Description

@helsome

Background

#13 主要建立 claim ↔ evidence 的研究证据关系,#20 解决网页/文档来源的 provenance 和 drift。但金融 Copilot 中大量事实并不来自网页 passage,而来自 quote/fundamental/history 等结构化 API/tool result。

例如回答“某公司当前 PE、营收增长率、昨日收盘价是多少”时,只记录 provider=xxx 或一个工具名称远远不够。必须能够回答:这个数字来自哪个 provider、哪个标的、什么查询条件、什么时间口径、经过了什么 normalization/转换?

Related: #13 #20 #22 #24

Requirements

为所有进入回答/报告证据链的 structured financial result 建立 Financial Evidence Envelope,至少按适用场景记录:

  • stable evidence id;
  • run / tool call id;
  • canonical instrument id;
  • provider / dataset / capability identity;
  • query parameters(去除 secret);
  • metric/field identity;
  • original provider value + normalized value;
  • unit/currency/period/as_of/retrieved_at;
  • adjustment semantics;
  • cache hit / stale status;
  • fallback/reconciliation metadata;
  • provider response/result 的最小可审计 snapshot 或 hash;
  • normalization/transform version。

Lineage

如果一个最终指标由多个步骤产生,例如:

provider raw data -> currency conversion -> normalization -> derived ratio -> Copilot claim

需要能够保留最小必要 lineage,而不是只记录最终 number。

Integration

Acceptance Criteria

  • quote、fundamental、historical data 至少各能生成 structured evidence record。
  • Copilot 中的关键金融数字能反查 provider、instrument、as_of、unit/currency 和 tool call。
  • normalized/converted value 能追踪到原始 provider value。
  • cache/fallback/reconciliation 发生时 lineage 不丢失。
  • evidence 在应用重启、conversation reload 后仍可查询。
  • export 后仍保留 machine-readable provenance,且不包含 API key/secret。
  • [Deep Research] Add claim–evidence verification and bidirectional citation traceability #13 verifier 能消费 structured evidence 或通过统一 abstraction 识别它。
  • PR 必须用真实 provider 跑一次 Copilot 问答,至少产生 3 个金融事实,并逐个展示从最终文本反查到原始 structured tool result 的 lineage。

Non-goals

  • 不要求永久保存供应商的完整原始响应;遵守许可和数据最小化原则,保留足够审计信息即可。

Activity

  1. TINGyu123644 commented on Sep 11, 2026

    @TINGyu123644

    认领这个 issue 👋

    我来负责这个任务:为结构化金融工具结果建立 Financial Evidence Envelope,实现完整的 provenance 持久化与 lineage 追踪。

    我会按照 acceptance criteria 逐步推进:

    1. 先设计 Financial Evidence Envelope 的数据结构(evidence id、provider、instrument、query params、metric、original/normalized value、as_of/retrieved_at、adjustment、cache/fallback、snapshot hash、transform version 等字段)
    2. 为 quote / fundamental / historical data 三类工具结果接入 evidence record 生成
    3. 实现 lineage 追踪:从 raw data → currency conversion → normalization → derived ratio → claim 的完整链路
    4. 与 [Deep Research] Add claim–evidence verification and bidirectional citation traceability #13 claim-evidence、[Research] Persist source provenance snapshots and detect citation source drift #20 source UI、[Eval] Integrate Langfuse tracing and evaluation for Agent / Deep Research runs #14 trace、[Privacy] Centralize redaction and data minimization for logs, diagnostics, traces, and eval artifacts #19 redaction 做集成对齐
    5. 确保证evidence 在应用重启和 conversation reload 后仍可查询,export 后保留 machine-readable provenance 且不含 secret

    PR 中会用真实 provider 跑一次 Copilot 问答,展示至少 3 个金融事实从最终文本反查到原始 structured tool result 的 lineage。

    如果有任何优先级调整或额外要求,请随时告诉我。

  2. gmll-star commented on Sep 11, 2026

    @gmll-star
    Contributor

    认领

  3. github-actions commented on Sep 11, 2026

    @github-actions

    @gmll-star 已认领该 Issue,并已自动设为 Assignee。提交 PR 时请在描述中写 Closes #29。

  4. added
    claimed
    on Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

claimed

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions