Skip to content

[geaflow/ai-memory] Define provenance model for facts, chunks, and evidence #842

Open

Description

@kitalkuyo-gita

Priority: P0
Difficulty: Starter

Context: Citation-aware answers and deletion propagation require source lineage. Existing subgraph verbalization does not provide claim-level provenance.

Scope:

  • Add ProvenanceRef and SourceSpan contracts.
  • Link extracted facts to document, chunk, extractor version, and schema version.
  • Add JSON examples.

Constraints:

  • Do not implement answer generation.
  • Do not store full raw private text inside provenance objects.

Acceptance Criteria:

  • Every extracted fact fixture can point back to source document and chunk.
  • Missing provenance fails validation for extracted facts.

Suggested paths:

  • geaflow-ai/src/main/java/org/apache/geaflow/ai/provenance

Activity

  1. E2ern1ty commented on Aug 22, 2026

    @E2ern1ty
    Contributor

    Hi, I'd like to pick up this issue.

    Plan:

    • Add ProvenanceRef and SourceSpan contracts under geaflow-ai/src/main/java/org/apache/geaflow/ai/provenance, linking facts to document, chunk, extractor version and schema version
    • Add JSON examples showing how extracted facts point back to their source document and chunk
    • Add validation so that extracted facts missing provenance fail explicitly, without embedding raw document text in provenance objects

    I'll open a PR soon. Happy to adjust the contract shape if reviewers prefer a different structure.

  2. E2ern1ty commented on Aug 22, 2026

    @E2ern1ty
    Contributor

    Submitted an initial implementation in #843. Feedback welcome - happy to adjust the contract shape if reviewers prefer a different structure.

  3. kitalkuyo-gita commented on Aug 24, 2026

    @kitalkuyo-gita
    MemberAuthor

    Submitted an initial implementation in #843. Feedback welcome - happy to adjust the contract shape if reviewers prefer a different structure.

    Okay, I'm taking a weekend off. I'm glad you're willing to take on this issue; I'll review your PR in the next day or two.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions