Repository navigation
Description
Problem
Folio now has several independently useful evidence-related abstractions across finance data, Copilot, and Deep Research: FinancialFact, structured financial evidence, EvidenceRef, ResearchClaim, CitationSource, research documents, claim verification, and source provenance.
Each piece solves a real problem, but they are evolving in parallel. The near-term risk is not missing functionality; it is semantic fragmentation: the same underlying fact or source may acquire different identities and metadata depending on whether it came through a financial provider, a research document, a web/news result, or a Copilot tool result.
If this continues, citation rendering, claim verification, export, replay, Langfuse/eval, and source inspection will each need adapters between multiple overlapping evidence models.
Related: #13 #20 #24 #26 #29 #30 #32
Current state
Today Folio already has most of the building blocks:
- structured financial facts/evidence with provider, value and timing semantics;
- Deep Research claim/evidence mapping work;
- citation/source inspector work in progress;
- ResearchDocument / primary-source retrieval work in progress;
- source ranking/deduplication and provenance metadata;
- claim verifier core work in progress.
What is missing is one stable product-level contract that answers:
- What is a Source?
- What is an Evidence item/span/value?
- How does an Evidence item support one or more Claims?
- Which identity survives persistence, reload, export, streaming and evaluation?
- Which metadata is shared across web/document/financial/tool evidence, and which remains type-specific?
Expected direction
Define a versioned, additive evidence contract that all current evidence types can project into without deleting their domain-specific fields.
The target relationship should be conceptually:
Source
↓
Evidence
↔
Claim
↓
Answer / Research Report
At minimum, the shared layer should support the applicable subset of:
Source
- stable
sourceId; sourceType(structured_finance / filing / ir_document / news / web / local_document / tool / other);- provider / publisher identity;
- canonical URL or document identity when applicable;
- published/filed/retrieved timestamps;
- source authority / provenance metadata.
Evidence
- stable
evidenceId; sourceId;- evidence kind (structured value / text span / table row / tool result / other);
- canonical instrument and metric when applicable;
- value + unit/currency semantics when applicable;
- excerpt/span/location metadata for textual sources;
asOf/retrievedAt;- freshness / stale / conflict / unavailable state;
- original/source hash or snapshot reference when available.
Claim relation
- stable
claimId; - many-to-many
claim ↔ evidencemapping; - verification state (
supported,contradicted,insufficient_evidence, or equivalent); - no requirement that verifier-generated explanation becomes source evidence.
Compatibility
- existing FinancialFact / FinancialEvidence / ResearchClaim / EvidenceRef / CitationSource contracts should evolve additively where practical;
- do not require a large migration simply to rename existing domain types;
- provider-specific or document-specific metadata may remain nested/typed extensions;
- UI should consume the unified projection rather than inventing a separate evidence identity.
Non-goals
- Do not rebuild [Deep Research] Add claim–evidence verification and bidirectional citation traceability #13 claim verification inside this Issue.
- Do not rebuild [Research] Persist source provenance snapshots and detect citation source drift #20 source-drift detection.
- Do not require every source type to expose identical fields.
- Do not introduce a generic graph database solely for this abstraction.
- Do not block useful incremental PRs while this contract is being adopted.
Validation / acceptance criteria
- A documented versioned Source/Evidence/Claim contract exists in core/shared code, with clear identity and lifecycle semantics.
- At least three distinct evidence origins project into the same contract: one structured financial fact, one web/news source, and one document/filing source.
- The same
evidenceId/sourceIdremains stable through production-path assembly → persistence → reload. - A claim can reference multiple evidence items, and one evidence item can support multiple claims.
- Financial evidence retains provider/instrument/metric/unit/currency/as-of semantics; document/web evidence retains excerpt/location/provenance semantics.
- Citation/source-inspector code can consume the unified projection without fabricating URLs for structured financial data.
- Existing persisted records remain readable, or a bounded backward-compatible migration/reconstruction path is provided.
- Focused tests cover identity stability, many-to-many mapping, serialization/reload and mixed evidence types.
- Provide one reproducible integration example showing a single answer/report containing both structured financial evidence and textual source evidence under the unified contract.
Maintainer note
This is primarily a contract/consolidation Issue, not a request for a new evidence framework. Prefer the smallest additive model that lets existing subsystems converge.
Activity
Theater-ahyeon commentedon Sep 13, 2026
C:/Program Files/Git/claim 我来处理这个 issue。计划按「版本化增量契约」落地:在 core 定义 Source → Evidence ↔ Claim 统一类型,在 shared/evidence 增加对 FinancialEvidenceEnvelope / EvidenceRef / NewsItem 的确定性投影函数与序列化往返,不改动现有类型与持久化格式,附契约文档与聚焦测试。第一个 PR 只覆盖契约 + 三来源投影 + 集成示例,claim verifier / Source Inspector 的接入留给后续增量 PR。
feat(research): 持久化并重载 Deep Research 报告的统一证据 bundle
feat(evidence): 统一 Source → Evidence ↔ Claim 证据契约
feat(research): 持久化并重载 Deep Research 报告的统一证据 bundle
Merge pull request #104 from Theater-ahyeon/feat/unified-evidence-con…
Merge pull request #105 from Theater-ahyeon/feat/research-evidence-bu…