Last modified by Robert Schaub on 2025/12/24 20:35

From version 1.2
edited by Robert Schaub
on 2025/11/27 12:03
Change comment: Update document after refactoring.
To version 4.1
edited by Robert Schaub
on 2025/11/27 12:11
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,3 +1,171 @@
1 +== 1. Overall analysis & review of the data model ==
2 +
3 +=== 1.1 Strengths of the current design ===
4 +
5 +* (((
6 +**Identity vs. version pattern**
7 +Using base entities plus version entities (CLAIM + CLAIM_VERSION, SCENARIO + SCENARIO_VERSION, etc.) is exactly how modern knowledge systems handle:
8 +
9 +* auditability
10 +* time evolution
11 +* re-evaluation triggers
12 +* federation and partial replication
13 +)))
14 +* (((
15 +**Scenario-centric reasoning**
16 +Separating //Claim// (what people argue about) from //Scenario// (interpretive frame) is very aligned with “truth landscape” style systems:
17 +
18 +* Scenarios explain //why people disagree//.
19 +* Verdicts are tied to specific scenario versions → avoids mixing incompatible assumptions.
20 +)))
21 +* **Evidence and verdicts as first-class entities**
22 +Evidence is explicit, linked to scenarios, and verdicts are per scenario. This matches good practice from fact-checking, scientific assessment panels, and trust graphs.
23 +* (((
24 +**Cluster level (CLAIM_CLUSTER)**
25 +Grouping related claims avoids duplication and lets you:
26 +
27 +* reuse scenarios across paraphrases
28 +* share embeddings / semantic search
29 +* keep the system scalable as the corpus grows.
30 +)))
31 +* (((
32 +**Explicit review layer (REVIEW_ACTION, roles, etc.)**
33 +Separating “data” from “who reviewed what” keeps the model clean, and is exactly what you want for:
34 +
35 +* governance
36 +* permissions
37 +* audit trails
38 +* future trust scoring per user / role.
39 +)))
40 +
41 +----
42 +
43 +=== 1.2 Design decisions I’m locking in (based on our discussions) ===
44 +
45 +To make the model consistent and “state-of-the-art”, I will assume the following as //current intended design//:
46 +
47 +1. (((
48 +**Claims vs Scenarios**
49 +
50 +* CLAIM is the stable identity for “what people argue about”.
51 +* CLAIM_VERSION are individual phrasings / formulations / metadata.
52 +* (((
53 +SCENARIO belongs to a **CLAIM**, not to a specific CLAIM_VERSION.
54 +Rationale:
55 +
56 +* Many different phrasings share the //same// scenario.
57 +* You avoid duplicating scenarios per wording.
58 +)))
59 +* SCENARIO_VERSION holds detailed definitions, assumptions, boundaries, etc.
60 +)))
61 +1. (((
62 +**Version-specific reasoning**
63 +
64 +* **Verdicts** are always attached to SCENARIO_VERSION (not base SCENARIO).
65 +* **Evidence links** are between SCENARIO_VERSION and EVIDENCE_VERSION.
66 +→ This is what we agreed when we said //“SCENARIO_EVIDENCE_LINK should link the respective versions instead”//.
67 +)))
68 +1. (((
69 +**Clusters**
70 +
71 +* CLAIM_CLUSTER groups Claims (semantically close claims).
72 +* It is visible in **both diagrams** (Core Data Model and Data Use).
73 +)))
74 +1. (((
75 +**Review vs data**
76 +
77 +* (((
78 +All review happens **on versioned entities**:
79 +
80 +* CLAIM_VERSION
81 +* SCENARIO_VERSION
82 +* EVIDENCE_VERSION
83 +* SCENARIO_EVIDENCE_LINK_VERSION
84 +* VERDICT_VERSION
85 +)))
86 +* REVIEW_ACTION is the generic log of //who// did //what// on //which version//.
87 +)))
88 +1. (((
89 +**Users & roles**
90 +
91 +* USER has an attribute (or a linked entity) that distinguishes **technical users** from normal accounts.
92 +* We //keep// TECHNICAL_USER as a specialisation of USER (strictly technical accounts).
93 +* All human & technical accounts can hold roles via USER_ROLE_MEMBERSHIP.
94 +* (((
95 +Roles include:
96 +
97 +* READER
98 +* CONTRIBUTOR
99 +* TRUSTED_CONTRIBUTOR
100 +* REVIEWER
101 +* MODERATOR
102 +* SYSTEM_ADMIN / MAINTAINER
103 +* FEDERATION_OPERATOR
104 +* FEDERATION_ADMIN
105 +(all present in the Data Use ERD, but as rows of ROLE rather than separate entities).
106 +)))
107 +)))
108 +
109 +----
110 +
111 +=== 1.3 Gaps / potential problems ===
112 +
113 +These are the main issues & missing areas I see:
114 +
115 +1. (((
116 +**Versioning text in chapter 5 is currently too thin (‘…’ placeholders)**
117 +
118 +* (((
119 +The spec does not yet //verbally// spell out:
120 +
121 +* the identity vs version pattern, systematically
122 +* how re-evaluation triggers are derived from version changes
123 +* how this aligns with federation (which versions are replicated where).
124 +)))
125 +)))
126 +1. (((
127 +**No explicit “provenance granularity” in the model**
128 +
129 +* (((
130 +EVIDENCE is a single entity. For more advanced use cases, you may later want:
131 +
132 +* EVIDENCE_SOURCE (the whole article/report/video)
133 +* EVIDENCE_FRAGMENT (specific paragraph/clip with its own reliability, quote, etc.)
134 +)))
135 +* For now, I’ll keep EVIDENCE/EVIDENCE_VERSION as is, but I’ll mention this as a possible extension.
136 +)))
137 +1. (((
138 +**Review target polymorphism**
139 +
140 +* (((
141 +REVIEW_ACTION can apply to multiple entity types. In the diagram this shows as multiple relationships:
142 +
143 +* CLAIM_VERSION → REVIEW_ACTION
144 +* SCENARIO_VERSION → REVIEW_ACTION
145 +* etc.
146 +)))
147 +* A more “pure” relational modeling would use a generic “subjectType + subjectId” or an intermediate “REVIEW_TARGET” table.
148 +* For readability, I’ll keep the simpler multi-edge representation and mention the polymorphism in text.
149 +)))
150 +1. (((
151 +**Federation details missing from core ERD**
152 +
153 +* There is no explicit FEDERATION_NODE / REPLICATION_LOG in the Data Model chapter.
154 +* This is ok for “core logical data model”, but I’ll add a short note that federation metadata is handled in the Federation chapter and via additional entities.
155 +)))
156 +1. (((
157 +**Automation / AKEL artifacts left implicit**
158 +
159 +* (((
160 +The Data Model chapter currently doesn’t describe:
161 +
162 +* AKEL task queues
163 +* extraction runs
164 +* model versions
165 +)))
166 +* That’s fine for now; I’ll just clarify that those belong to a “Processing / AKEL” submodel, not the core logical data model.
167 +)))
168 +
1 1  = 5. Data Model =
2 2  
3 3  The FactHarbor data model centers on four fully versioned, immutable entities:
... ... @@ -41,10 +41,10 @@
41 41   (scenarios live at the *claim* level, not per individual phrasing).
42 42  * Verdicts and Scenario–Evidence links are always attached to **versions**:
43 43  * {{code}}SCENARIO_VERSION{{/code}} +
44 - {{code}}EVIDENCE_VERSION{{/code}} →
45 - {{code}}SCENARIO_EVIDENCE_LINK_VERSION{{/code}}
212 +{{code}}EVIDENCE_VERSION{{/code}} →
213 +{{code}}SCENARIO_EVIDENCE_LINK_VERSION{{/code}}
46 46  * {{code}}SCENARIO_VERSION{{/code}} →
47 - {{code}}VERDICT_VERSION{{/code}}
215 +{{code}}VERDICT_VERSION{{/code}}
48 48  
49 49  This ensures that when a Scenario or Evidence changes, old verdicts and links
50 50  remain intact as historical records and can be revisited.
... ... @@ -59,124 +59,95 @@
59 59  
60 60  {{mermaid}}
61 61  erDiagram
62 -
63 63   CLAIM_CLUSTER {
64 - string claimClusterId
65 - string theme
66 - string embeddingVectorRef
67 - string language
68 - datetime createdAt
231 + string ClusterID PK
232 + string EmbeddingVectorRef
233 + string Theme
69 69   }
70 70  
71 71   CLAIM {
72 - string claimId
73 - string claimClusterIdFk
74 - string status
75 - datetime createdAt
237 + string ClaimID PK
238 + string ClusterID FK
239 + string Status
240 + datetime CreatedAt
76 76   }
77 77  
78 78   CLAIM_VERSION {
79 - string claimVersionId
80 - string claimIdFk
81 - string text
82 - string language
83 - string claimType
84 - string domain
85 - string authorType
86 - datetime createdAt
244 + string ClaimVersionID PK
245 + string ClaimID FK
246 + string Text
247 + string ClaimType
248 + string Domain
249 + datetime CreatedAt
87 87   }
88 88  
89 89   SCENARIO {
90 - string scenarioId
91 - string claimIdFk
92 - string key
93 - string title
94 - boolean isDeprecated
253 + string ScenarioID PK
254 + string ClaimID FK
255 + string Name
256 + datetime CreatedAt
95 95   }
96 96  
97 97   SCENARIO_VERSION {
98 - string scenarioVersionId
99 - string scenarioIdFk
100 - string versionTag
101 - string definitionsJson
102 - string assumptionsJson
103 - string boundariesJson
104 - string notes
105 - datetime createdAt
260 + string ScenarioVersionID PK
261 + string ScenarioID FK
262 + string Definitions
263 + string Assumptions
264 + string Boundaries
265 + datetime CreatedAt
106 106   }
107 107  
108 108   EVIDENCE {
109 - string evidenceId
110 - string canonicalSourceId
111 - string mainUrl
112 - string evidenceType
113 - string language
269 + string EvidenceID PK
270 + string SourceType
271 + string URL
272 + float ReliabilityScore
114 114   }
115 115  
116 116   EVIDENCE_VERSION {
117 - string evidenceVersionId
118 - string evidenceIdFk
119 - string snapshotLocation
120 - string extractionSummary
121 - string reliabilityModel
122 - datetime collectedAt
123 - datetime createdAt
276 + string EvidenceVersionID PK
277 + string EvidenceID FK
278 + string Summary
279 + float ReliabilityScore
280 + datetime CreatedAt
124 124   }
125 125  
126 126   SCENARIO_EVIDENCE_LINK {
127 - string scenarioEvidenceLinkId
128 - string scenarioIdFk
129 - string evidenceIdFk
284 + string LinkID PK
285 + string ScenarioVersionID FK
286 + string EvidenceVersionID FK
287 + float Relevance
288 + string Direction
130 130   }
131 131  
132 - SCENARIO_EVIDENCE_LINK_VERSION {
133 - string scenarioEvidenceLinkVersionId
134 - string scenarioEvidenceLinkIdFk
135 - string scenarioVersionIdFk
136 - string evidenceVersionIdFk
137 - float relevance
138 - string direction %% SUPPORTS / CONTRADICTS / MIXED / CONTEXT
139 - string rationale
140 - datetime createdAt
141 - }
142 -
143 143   VERDICT {
144 - string verdictId
145 - string scenarioIdFk
146 - string verdictType %% e.g. likelihood, classification
292 + string VerdictID PK
293 + string ScenarioID FK
147 147   }
148 148  
149 149   VERDICT_VERSION {
150 - string verdictVersionId
151 - string verdictIdFk
152 - string scenarioVersionIdFk
153 - float probability
154 - float confidence
155 - string reasoningSummary
156 - string uncertaintyFactorsJson
157 - datetime createdAt
297 + string VerdictVersionID PK
298 + string VerdictID FK
299 + float Verdict
300 + float Confidence
301 + string Reasoning
302 + datetime CreatedAt
158 158   }
159 159  
160 - %% Relationships
161 -
162 162   CLAIM_CLUSTER ||--o{ CLAIM : contains
163 - CLAIM ||--o{ CLAIM_VERSION : has_versions
164 - CLAIM ||--o{ SCENARIO : has_scenarios
165 - SCENARIO ||--o{ SCENARIO_VERSION : has_versions
306 + CLAIM ||--o{ CLAIM_VERSION : versions
166 166  
167 - EVIDENCE ||--o{ EVIDENCE_VERSION : has_versions
308 + CLAIM ||--o{ SCENARIO : has
309 + SCENARIO ||--o{ SCENARIO_VERSION : versions
168 168  
169 - SCENARIO ||--o{ SCENARIO_EVIDENCE_LINK : may_link
170 - EVIDENCE ||--o{ SCENARIO_EVIDENCE_LINK : may_link
311 + EVIDENCE ||--o{ EVIDENCE_VERSION : versions
171 171  
172 - SCENARIO_EVIDENCE_LINK ||--o{ SCENARIO_EVIDENCE_LINK_VERSION : has_versions
313 + SCENARIO_VERSION ||--o{ SCENARIO_EVIDENCE_LINK : links
314 + EVIDENCE_VERSION ||--o{ SCENARIO_EVIDENCE_LINK : linked
173 173  
174 - SCENARIO_VERSION ||--o{ SCENARIO_EVIDENCE_LINK_VERSION : uses_evidence
175 - EVIDENCE_VERSION ||--o{ SCENARIO_EVIDENCE_LINK_VERSION : is_used_in
316 + SCENARIO ||--o{ VERDICT : assessed
317 + VERDICT ||--o{ VERDICT_VERSION : versions
176 176  
177 - SCENARIO ||--o{ VERDICT : has_verdicts
178 - VERDICT ||--o{ VERDICT_VERSION : has_versions
179 - SCENARIO_VERSION ||--o{ VERDICT_VERSION : assessed_in
180 180  {{/mermaid}}
181 181  
182 182  **Important points:**
... ... @@ -201,83 +201,145 @@
201 201  
202 202  {{mermaid}}
203 203  erDiagram
343 + %% Core clusters shown for context
344 + CLAIM_CLUSTER {
345 + string ClusterID PK
346 + string EmbeddingVectorRef
347 + string Theme
348 + }
204 204  
205 - USER {
206 - string userId
207 - string displayName
208 - string email
209 - string userType %% "human" or "technical"
210 - datetime createdAt
350 + CLAIM {
351 + string ClaimID PK
352 + string ClusterID FK
353 + string Status
354 + datetime CreatedAt
211 211   }
212 212  
213 - TECHNICAL_USER {
214 - string technicalUserId
215 - string userIdFk
216 - string description
217 - string systemIdentifier
357 + CLAIM_VERSION {
358 + string ClaimVersionID PK
359 + string ClaimID FK
360 + string Text
361 + string ClaimType
362 + string Domain
363 + datetime CreatedAt
218 218   }
219 219  
220 - ROLE {
221 - string roleId
222 - string code %% e.g. READER, CONTRIBUTOR, REVIEWER, TRUSTED_CONTRIBUTOR, MODERATOR, SYSTEM_ADMIN, FEDERATION_OPERATOR, FEDERATION_ADMIN
223 - string description
224 - boolean isFederationRole
366 + SCENARIO {
367 + string ScenarioID PK
368 + string ClaimID FK
369 + string Name
370 + datetime CreatedAt
225 225   }
226 226  
227 - USER_ROLE_MEMBERSHIP {
228 - string membershipId
229 - string userIdFk
230 - string roleIdFk
231 - datetime grantedAt
232 - string grantedByUserIdFk
373 + SCENARIO_VERSION {
374 + string ScenarioVersionID PK
375 + string ScenarioID FK
376 + string Definitions
377 + string Assumptions
378 + string Boundaries
379 + datetime CreatedAt
233 233   }
234 234  
235 - REVIEW_ACTION {
236 - string reviewActionId
237 - string subjectType %% e.g. CLAIM_VERSION, SCENARIO_VERSION...
238 - string subjectVersionId
239 - string actionType %% APPROVE, REJECT, FLAG, COMMENT, REQUEST_CHANGES...
240 - string outcome %% ACCEPTED, REJECTED, ESCALATED...
241 - string comment
242 - string createdByUserIdFk
243 - datetime createdAt
382 + EVIDENCE {
383 + string EvidenceID PK
384 + string SourceType
385 + string URL
386 + float ReliabilityScore
244 244   }
245 245  
246 - %% Versioned data entities (references from the core model)
389 + EVIDENCE_VERSION {
390 + string EvidenceVersionID PK
391 + string EvidenceID FK
392 + string Summary
393 + float ReliabilityScore
394 + datetime CreatedAt
395 + }
247 247  
248 - CLAIM_VERSION {
249 - string claimVersionId
397 + VERDICT {
398 + string VerdictID PK
399 + string ScenarioID FK
250 250   }
251 251  
252 - SCENARIO_VERSION {
253 - string scenarioVersionId
402 + VERDICT_VERSION {
403 + string VerdictVersionID PK
404 + string VerdictID FK
405 + float Verdict
406 + float Confidence
407 + string Reasoning
408 + datetime CreatedAt
254 254   }
255 255  
256 - EVIDENCE_VERSION {
257 - string evidenceVersionId
411 + %% Users and roles
412 + USER {
413 + string UserID PK
414 + string Handle
415 + string Email
258 258   }
259 259  
260 - SCENARIO_EVIDENCE_LINK_VERSION {
261 - string scenarioEvidenceLinkVersionId
418 + TECHNICAL_USER {
419 + string UserID PK
420 + string SystemName
262 262   }
263 263  
264 - VERDICT_VERSION {
265 - string verdictVersionId
423 + CONTRIBUTING_USER {
424 + string UserID PK
425 + string DisplayName
266 266   }
267 267  
268 - %% Relationships
428 + TRUSTED_CONTRIBUTOR {
429 + string UserID PK
430 + string TrustLevel
431 + }
269 269  
270 - USER ||--o{ TECHNICAL_USER : may_be
271 - USER ||--o{ USER_ROLE_MEMBERSHIP : has_role
272 - ROLE ||--o{ USER_ROLE_MEMBERSHIP : assigned_to
433 + REVIEWER {
434 + string UserID PK
435 + string Domain
436 + }
273 273  
438 + EXPERT {
439 + string UserID PK
440 + string ExpertiseArea
441 + }
442 +
443 + FEDERATION_NODE {
444 + string NodeID PK
445 + string Region
446 + }
447 +
448 + FEDERATION_ADMIN {
449 + string UserID PK
450 + string Permissions
451 + }
452 +
453 + REVIEW_ACTION {
454 + string ReviewActionID PK
455 + string UserID FK
456 + string TargetEntityType
457 + string TargetEntityVersionID
458 + string ActionType
459 + string Comment
460 + datetime Timestamp
461 + }
462 +
463 + %% Inheritance / specialization (modelled as relationships)
464 + USER ||--o{ TECHNICAL_USER : "is a"
465 + USER ||--o{ CONTRIBUTING_USER : "is a"
466 +
467 + CONTRIBUTING_USER ||--o{ TRUSTED_CONTRIBUTOR : "subset"
468 + CONTRIBUTING_USER ||--o{ REVIEWER : "subset"
469 + CONTRIBUTING_USER ||--o{ EXPERT : "subset"
470 +
471 + TECHNICAL_USER ||--o{ FEDERATION_NODE : "operates"
472 + TECHNICAL_USER ||--o{ FEDERATION_ADMIN : "administers"
473 +
474 + %% Review actions on versioned entities
274 274   USER ||--o{ REVIEW_ACTION : performs
275 275  
276 - CLAIM_VERSION ||--o{ REVIEW_ACTION : is_reviewed_in
277 - SCENARIO_VERSION ||--o{ REVIEW_ACTION : is_reviewed_in
278 - EVIDENCE_VERSION ||--o{ REVIEW_ACTION : is_reviewed_in
279 - SCENARIO_EVIDENCE_LINK_VERSION ||--o{ REVIEW_ACTION : is_reviewed_in
280 - VERDICT_VERSION ||--o{ REVIEW_ACTION : is_reviewed_in
477 + REVIEW_ACTION }o--|| CLAIM_VERSION : reviews
478 + REVIEW_ACTION }o--|| SCENARIO_VERSION : reviews
479 + REVIEW_ACTION }o--|| EVIDENCE_VERSION : reviews
480 + REVIEW_ACTION }o--|| VERDICT_VERSION : reviews
481 +
281 281  {{/mermaid}}
282 282  
283 283  Notes:
... ... @@ -309,7 +309,7 @@
309 309  * It may inherit some links from earlier scenarios, or start empty depending
310 310   on the change classification (cosmetic vs. conceptual).
311 311  * All verdicts for that scenario are recalculated and stored as new
312 - {{code}}VERDICT_VERSION{{/code}} entries.
513 +{{code}}VERDICT_VERSION{{/code}} entries.
313 313  
314 314  * REVIEW_ACTIONs are always attached to the **exact version** that was seen by
315 315   the reviewer. This preserves a faithful audit trail if data later changes.