Problem Statement
As AI agents increasingly assist with knowledge base curation tasks (adding evidence, fixing ontology terms, validating references, etc.), there's a growing need to track provenance — which agent/model made what changes, when, and ideally why.
Without provenance, we lose:
- Auditability: Which claims were AI-generated vs human-curated?
- Reproducibility: What model version produced this content?
- Trust calibration: Users may want to weight AI-curated content differently
- Debugging: When something is wrong, tracing back to the source helps identify systematic issues
Key Design Tensions
1. Completeness vs File Bloat
Complete audit trail: Every edit, every model call, every intermediate step
- Pros: Full traceability, can reconstruct exact history
- Cons: Can massively inflate file sizes, noise obscures signal
Minimal provenance: Just first creation + last edit timestamps
- Pros: Clean files, easy to read
- Cons: Loses intermediate history, can't tell if file was edited 2 times or 200
Questions to consider:
- Should intermediate edits be recorded at all?
- If so, should there be size/count thresholds for filtering?
- Is "initial + most recent" a reasonable compromise for most use cases?
2. Storage Pattern: Inline vs Sidecar
Inline (appended to curated file):
# ... disease content ...
curation_history:
- timestamp: "2025-12-01T08:00:00Z"
model: claude-opus-4-5
action: CREATED
- Pros: Self-contained, travels with the data, can't get out of sync
- Cons: Pollutes the "content" file, schema changes needed, harder to aggregate across files
Sidecar files (e.g., kb/disorders/.provenance/Asthma.jsonl):
- Pros: Keeps content files clean, can be more detailed, easier to process programmatically
- Cons: Can drift out of sync, extra files to manage, less portable
Hybrid approaches:
- Minimal inline (just a hash/signature) + detailed sidecar
- Content-addressable references to external provenance store
3. Agent Self-Logging vs Post-Hoc Extraction
Agent records its own provenance during curation:
# Agent writes this as part of the edit
curation_history:
- timestamp: "2025-12-01T08:00:00Z"
model: claude-opus-4-5
description: "Added PMID:12345678 evidence for phenotype claim"
- Pros: Can include rich context (why the change was made), immediate
- Cons: Agents may forget, be inconsistent, or hallucinate provenance; adds complexity to prompts
Deterministic extraction from execution logs:
- Parse Claude Code traces, GitHub Actions logs, etc.
- Extract successful file operations after the fact
- Pros: Can't be "forgotten", deterministic, no prompt complexity
- Cons: Less context (no "why"), depends on log availability and format
4. Deployment Context Differences
Local Claude Code usage:
- Rich traces available in
~/.claude/projects/
- Full conversation context, tool calls, timestamps
- But: Local-only, not version controlled, ephemeral
GitHub Actions / CI-based agents:
- Logs available in Actions UI
- But: Harder to programmatically extract, different format
- May need explicit logging steps in workflow
Hybrid workflows (local dev + CI):
- How to maintain consistent provenance across contexts?
Open Questions
- What's the minimal viable provenance that provides value without excessive overhead?
- Should provenance be part of the data schema or a separate concern?
- How do we handle provenance when multiple agents collaborate on the same file?
- Should provenance be human-readable (YAML) or optimized for machines (JSONL)?
- How do we handle the case where logs are unavailable (e.g., deleted, different machine)?
- Are there existing standards we should align with? (W3C PROV, PAV ontology, C2PA for content credentials?)
Related Work
- W3C PROV-O - Provenance ontology
- PAV Ontology - Provenance, Authoring, Versioning
- C2PA - Content Credentials for media provenance
- OMIM's change history model (appended to entries)
Next Steps
- Survey existing approaches in related projects
- Define minimal provenance requirements for ai4curation use cases
- Prototype and compare inline vs sidecar approaches
- Document recommended patterns
/cc @cmungall
Problem Statement
As AI agents increasingly assist with knowledge base curation tasks (adding evidence, fixing ontology terms, validating references, etc.), there's a growing need to track provenance — which agent/model made what changes, when, and ideally why.
Without provenance, we lose:
Key Design Tensions
1. Completeness vs File Bloat
Complete audit trail: Every edit, every model call, every intermediate step
Minimal provenance: Just first creation + last edit timestamps
Questions to consider:
2. Storage Pattern: Inline vs Sidecar
Inline (appended to curated file):
Sidecar files (e.g.,
kb/disorders/.provenance/Asthma.jsonl):Hybrid approaches:
3. Agent Self-Logging vs Post-Hoc Extraction
Agent records its own provenance during curation:
Deterministic extraction from execution logs:
4. Deployment Context Differences
Local Claude Code usage:
~/.claude/projects/GitHub Actions / CI-based agents:
Hybrid workflows (local dev + CI):
Open Questions
Related Work
Next Steps
/cc @cmungall