Skip to main content

xz_knowledge_graph/types/
provenance.rs

1use serde::{Deserialize, Serialize};
2
3/// Data provenance information.
4#[derive(Debug, Clone, Serialize, Deserialize)]
5pub struct Provenance {
6    pub source_text: String,
7    pub source_id: String,
8    pub extraction_method: ExtractionMethod,
9    pub extracted_at: u64,
10    pub extractor_version: Option<String>,
11}
12
13/// How the data was extracted.
14#[derive(Debug, Clone, Serialize, Deserialize)]
15pub enum ExtractionMethod {
16    Lm {
17        model: String,
18        prompt_version: String,
19    },
20    Manual,
21    Reconciliation,
22    RuleBased {
23        rule_name: String,
24    },
25}