Wiki source code of POC Requirements
Last modified by Robert Schaub on 2025/12/22 14:38
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | = POC Requirements = **Status:** ✅ Approved for Development **Version:** 3.0 (Aligned with Main Requirements) **Goal:** Prove that AI can extract claims and determine verdicts automatically without human intervention {{info}} | ||
| 2 | **Core Philosophy:** POC validates the [[Main Requirements>>FactHarbor.Specification.Requirements.WebHome]] through simplified implementation. All POC features map to formal FR/NFR requirements. | ||
| 3 | {{/info}} == 1. POC Overview == === 1.1 What POC Tests === **Core Question:** | ||
| 4 | > Can AI automatically extract factual claims from articles and evaluate them with reasonable verdicts? **What we're proving:** | ||
| 5 | * AI can identify factual claims from text | ||
| 6 | * AI can evaluate those claims with structured evidence | ||
| 7 | * Quality gates can filter unreliable outputs | ||
| 8 | * The core workflow is technically feasible **What we're NOT proving:** | ||
| 9 | * Production-ready reliability (that's POC2) | ||
| 10 | * User-facing features (that's Beta 0) | ||
| 11 | * Full IFCN compliance (that's V1.0) === 1.2 Requirements Mapping === POC1 implements a **subset** of the full system requirements defined in [[Main Requirements>>FactHarbor.Specification.Requirements.WebHome]]. **Scope Summary:** | ||
| 12 | * **In Scope:** 8 requirements (7 FRs + 1 NFR) | ||
| 13 | * **Partial:** 3 NFRs (simplified versions) | ||
| 14 | * **Out of Scope:** 19 requirements (deferred to later phases) == 2. Requirements Scope Matrix == {{success}} | ||
| 15 | **Requirements Traceability:** This matrix shows which [[Main Requirements>>FactHarbor.Specification.Requirements.WebHome]] are implemented in POC1, providing full traceability between POC and system requirements. | ||
| 16 | {{/success}} |=Requirement|=POC1 Status|=Implementation Level|=Notes | ||
| 17 | |**CORE WORKFLOW**|||| | ||
| 18 | |FR1: Claim Extraction|✅ **In Scope**|Full|AKEL extracts claims from text | ||
| 19 | |FR2: Claim Context|✅ **In Scope**|Basic|Context preserved with claim | ||
| 20 | |FR3: Multiple Scenarios|✅ **In Scope**|Full|AKEL generates interpretation scenarios | ||
| 21 | |FR4: Analysis Summary|✅ **In Scope**|Basic|Simple summary format | ||
| 22 | |FR5: Evidence Collection|✅ **In Scope**|Full|AKEL searches for evidence | ||
| 23 | |FR6: Evidence Evaluation|✅ **In Scope**|Full|AKEL evaluates source reliability | ||
| 24 | |FR7: Automated Verdicts|✅ **In Scope**|Full|AKEL computes verdicts with uncertainty | ||
| 25 | |**QUALITY & RELIABILITY**|||| | ||
| 26 | |NFR11: Quality Assurance|✅ **In Scope**|**Lite**|**2 gates only** (Gate 1 & 4) | ||
| 27 | |NFR1: Performance|⚠️ **Partial**|Basic|Response time monitored, not optimized | ||
| 28 | |NFR2: Scalability|⚠️ **Partial**|Single-thread|No concurrent processing | ||
| 29 | |NFR3: Reliability|⚠️ **Partial**|Basic|Error handling, no retry logic | ||
| 30 | |**DEFERRED TO LATER**|||| | ||
| 31 | |FR8-FR13|❌ Out of Scope|N/A|User accounts, corrections, publishing | ||
| 32 | |FR44-FR53|❌ Out of Scope|N/A|Advanced features (V1.0+) | ||
| 33 | |NFR4: Security|❌ Out of Scope|N/A|POC2 | ||
| 34 | |NFR5: Maintainability|❌ Out of Scope|N/A|POC2 | ||
| 35 | |NFR12: Security Controls|❌ Out of Scope|N/A|Beta 0 | ||
| 36 | |NFR13: Monitoring|❌ Out of Scope|N/A|POC2 == 3. POC Simplifications == === 3.1 FR1: Claim Extraction (Full Implementation) === **Main Requirement:** AI extracts factual claims from input text **POC Implementation:** | ||
| 37 | * ✅ AKEL extracts claims using LLM | ||
| 38 | * ✅ Each claim includes original text reference | ||
| 39 | * ✅ Claims are identified as factual/non-factual | ||
| 40 | * ❌ No advanced claim parsing (added in POC2) **Acceptance Criteria:** | ||
| 41 | * Extracts 3-5 claims from typical article | ||
| 42 | * Identifies factual vs non-factual claims | ||
| 43 | * Quality Gate 1 validates extraction === 3.2 FR3: Multiple Scenarios (Full Implementation) === **Main Requirement:** Generate multiple interpretation scenarios for ambiguous claims **POC Implementation:** | ||
| 44 | * ✅ AKEL generates 2-3 scenarios per claim | ||
| 45 | * ✅ Scenarios capture different interpretations | ||
| 46 | * ✅ Each scenario is evaluated separately | ||
| 47 | * ✅ Verdict considers all scenarios **Acceptance Criteria:** | ||
| 48 | * Generates 2+ scenarios for ambiguous claims | ||
| 49 | * Scenarios are meaningfully different | ||
| 50 | * All scenarios are evaluated === 3.3 FR4: Analysis Summary (Basic Implementation) === **Main Requirement:** Provide user-friendly summary of analysis **POC Implementation:** | ||
| 51 | * ✅ Simple text summary generated | ||
| 52 | * ❌ No rich formatting (added in Beta 0) | ||
| 53 | * ❌ No visual elements (added in Beta 0) | ||
| 54 | * ❌ No interactive features (added in Beta 0) **POC Format:** | ||
| 55 | ``` | ||
| 56 | Claim: [extracted claim] | ||
| 57 | Scenarios: [list of scenarios] | ||
| 58 | Evidence: [supporting/opposing evidence] | ||
| 59 | Verdict: [probability with uncertainty] | ||
| 60 | ``` === 3.4 FR5-FR6: Evidence Collection & Evaluation (Full Implementation) === **Main Requirements:** | ||
| 61 | * FR5: Collect supporting and opposing evidence | ||
| 62 | * FR6: Evaluate evidence source reliability **POC Implementation:** | ||
| 63 | * ✅ AKEL searches for evidence (web/knowledge base) | ||
| 64 | * ✅ **Mandatory contradiction search** (finds opposing evidence) | ||
| 65 | * ✅ Source reliability scoring | ||
| 66 | * ❌ No evidence deduplication (added in POC2) | ||
| 67 | * ❌ No advanced source verification (added in POC2) **Acceptance Criteria:** | ||
| 68 | * Finds 2+ supporting evidence items | ||
| 69 | * Finds 1+ opposing evidence (if exists) | ||
| 70 | * Sources scored for reliability === 3.5 FR7: Automated Verdicts (Full Implementation) === **Main Requirement:** AI computes verdicts with uncertainty quantification **POC Implementation:** | ||
| 71 | * ✅ Probabilistic verdicts (0-100% confidence) | ||
| 72 | * ✅ Uncertainty explicitly stated | ||
| 73 | * ✅ Reasoning chain provided | ||
| 74 | * ✅ Quality Gate 4 validates verdict confidence **POC Output:** | ||
| 75 | ``` | ||
| 76 | Verdict: 70% likely true | ||
| 77 | Uncertainty: ±15% (moderate confidence) | ||
| 78 | Reasoning: Based on 3 high-quality sources... | ||
| 79 | Confidence Level: MEDIUM | ||
| 80 | ``` **Acceptance Criteria:** | ||
| 81 | * Verdicts include probability (0-100%) | ||
| 82 | * Uncertainty explicitly quantified | ||
| 83 | * Reasoning chain explains verdict === 3.6 NFR11: Quality Assurance Framework (LITE VERSION) === **Main Requirement:** Complete quality assurance with 7 quality gates **POC Implementation:** **2 gates only** **Quality Gate 1: Claim Validation** | ||
| 84 | * ✅ Validates claim is factual and verifiable | ||
| 85 | * ✅ Blocks non-factual claims (opinion/prediction/ambiguous) | ||
| 86 | * ✅ Provides clear rejection reason **Quality Gate 4: Verdict Confidence Assessment** | ||
| 87 | * ✅ Validates ≥2 sources found | ||
| 88 | * ✅ Validates quality score ≥0.6 | ||
| 89 | * ✅ Blocks low-confidence verdicts | ||
| 90 | * ✅ Provides clear rejection reason **Out of Scope (POC2+):** | ||
| 91 | * ❌ Gate 2: Evidence Relevance | ||
| 92 | * ❌ Gate 3: Scenario Coherence | ||
| 93 | * ❌ Gate 5: Source Diversity | ||
| 94 | * ❌ Gate 6: Reasoning Validity | ||
| 95 | * ❌ Gate 7: Output Completeness **Rationale:** Prove gate concept works. Add remaining gates in POC2 after validating approach. === 3.7 NFR1-3: Performance, Scalability, Reliability (Basic) === **Main Requirements:** | ||
| 96 | * NFR1: Response time < 30 seconds | ||
| 97 | * NFR2: Handle 1000+ concurrent users | ||
| 98 | * NFR3: 99.9% uptime **POC Implementation:** | ||
| 99 | * ⚠️ **Response time monitored** (not optimized) | ||
| 100 | * ⚠️ **Single-threaded processing** (no concurrency) | ||
| 101 | * ⚠️ **Basic error handling** (no advanced retry logic) **Rationale:** POC proves functionality. Performance optimization happens in POC2. **POC Acceptance:** | ||
| 102 | * Analysis completes (no timeout requirement) | ||
| 103 | * Errors don't crash system | ||
| 104 | * Basic logging in place == 4. What's NOT in POC Scope == === 4.1 User-Facing Features (Beta 0+) === {{warning}} | ||
| 105 | **Deferred to Beta 0:** | ||
| 106 | {{/warning}} **Out of Scope:** | ||
| 107 | * ❌ User accounts and authentication (FR8) | ||
| 108 | * ❌ User corrections system (FR9, FR45-46) | ||
| 109 | * ❌ Public publishing interface (FR10) | ||
| 110 | * ❌ Social sharing (FR11) | ||
| 111 | * ❌ Email notifications (FR12) | ||
| 112 | * ❌ API access (FR13) **Rationale:** POC validates AI capabilities. User features added in Beta 0. === 4.2 Advanced Features (V1.0+) === **Out of Scope:** | ||
| 113 | * ❌ IFCN compliance (FR47) | ||
| 114 | * ❌ ClaimReview schema (FR48) | ||
| 115 | * ❌ Archive.org integration (FR49) | ||
| 116 | * ❌ OSINT toolkit (FR50) | ||
| 117 | * ❌ Video verification (FR51) | ||
| 118 | * ❌ Deepfake detection (FR52) | ||
| 119 | * ❌ Cross-org sharing (FR53) **Rationale:** Advanced features require proven platform. Added post-V1.0. === 4.3 Production Requirements (POC2, Beta 0) === **Out of Scope:** | ||
| 120 | * ❌ Security controls (NFR4, NFR12) | ||
| 121 | * ❌ Code maintainability (NFR5) | ||
| 122 | * ❌ System monitoring (NFR13) | ||
| 123 | * ❌ Evidence deduplication | ||
| 124 | * ❌ Advanced source verification | ||
| 125 | * ❌ Full 7-gate quality framework **Rationale:** POC proves concept. Production hardening happens in POC2 and Beta 0. == 5. POC Output Specification == === 5.1 Required Output Elements === For each analyzed claim, POC must produce: **1. Claim** | ||
| 126 | * Original text | ||
| 127 | * Classification (factual/non-factual/ambiguous) | ||
| 128 | * If non-factual: Clear reason why **2. Scenarios** (if factual) | ||
| 129 | * 2-3 interpretation scenarios | ||
| 130 | * Each scenario clearly described **3. Evidence** (if factual) | ||
| 131 | * Supporting evidence (2+ items) | ||
| 132 | * Opposing evidence (if exists) | ||
| 133 | * Source URLs and reliability scores **4. Verdict** (if factual) | ||
| 134 | * Probability (0-100%) | ||
| 135 | * Uncertainty quantification | ||
| 136 | * Confidence level (LOW/MEDIUM/HIGH) | ||
| 137 | * Reasoning chain **5. Quality Status** | ||
| 138 | * Which gates passed/failed | ||
| 139 | * If failed: Clear explanation why === 5.2 Example POC Output === {{code language="json"}} | ||
| 140 | { "claim": { "text": "Switzerland has the highest life expectancy in Europe", "type": "factual", "gate1_status": "PASS" }, "scenarios": [ "Switzerland's overall life expectancy is highest", "Switzerland ranks highest for specific age groups" ], "evidence": { "supporting": [ { "source": "WHO Report 2023", "reliability": 0.95, "excerpt": "Switzerland: 83.4 years average..." } ], "opposing": [ { "source": "Eurostat 2024", "reliability": 0.90, "excerpt": "Spain leads at 83.5 years..." } ] }, "verdict": { "probability": 0.65, "uncertainty": 0.15, "confidence": "MEDIUM", "reasoning": "WHO and Eurostat show similar but conflicting data...", "gate4_status": "PASS" } | ||
| 141 | } | ||
| 142 | {{/code}} == 6. Success Criteria == {{success}} | ||
| 143 | **POC Success Definition:** POC validates that AI can extract claims, find balanced evidence, and compute reasonable verdicts with quality gates improving output quality. | ||
| 144 | {{/success}} === 6.1 Functional Success === POC is successful if: ✅ **FR1-FR7 Requirements Met:** | ||
| 145 | 1. Extracts 3-5 factual claims from test articles | ||
| 146 | 2. Generates 2-3 scenarios per ambiguous claim | ||
| 147 | 3. Finds supporting AND opposing evidence | ||
| 148 | 4. Computes probabilistic verdicts with uncertainty | ||
| 149 | 5. Provides clear reasoning chains ✅ **Quality Gates Work:** | ||
| 150 | 1. Gate 1 blocks non-factual claims (100% block rate) | ||
| 151 | 2. Gate 4 blocks low-quality verdicts (blocks if <2 sources or quality <0.6) | ||
| 152 | 3. Clear rejection reasons provided ✅ **NFR11 Met:** | ||
| 153 | 1. Quality gates reduce hallucination rate | ||
| 154 | 2. Blocked outputs have clear explanations | ||
| 155 | 3. Quality metrics are logged === 6.2 Quality Thresholds === **Minimum Acceptable:** | ||
| 156 | * ≥70% of test claims correctly classified (factual/non-factual) | ||
| 157 | * ≥60% of verdicts are reasonable (human evaluation) | ||
| 158 | * Gate 1 blocks 100% of non-factual claims | ||
| 159 | * Gate 4 blocks verdicts with <2 sources **Target:** | ||
| 160 | * ≥80% claims correctly classified | ||
| 161 | * ≥75% verdicts are reasonable | ||
| 162 | * <10% false positives (blocking good claims) === 6.3 POC Decision Gate === **After POC1, we decide:** **✅ PROCEED to POC2** if: | ||
| 163 | * Success criteria met | ||
| 164 | * Quality gates demonstrably improve output | ||
| 165 | * Core workflow is technically sound | ||
| 166 | * Clear path to production quality **⚠️ ITERATE POC1** if: | ||
| 167 | * Success criteria partially met | ||
| 168 | * Gates work but need tuning | ||
| 169 | * Core issues identified but fixable **❌ PIVOT APPROACH** if: | ||
| 170 | * Success criteria not met | ||
| 171 | * Fundamental AI limitations discovered | ||
| 172 | * Quality gates insufficient | ||
| 173 | * Alternative approach needed == 7. Test Cases == === 7.1 Happy Path === **Test 1: Simple Factual Claim** | ||
| 174 | * Input: "Paris is the capital of France" | ||
| 175 | * Expected: Factual, 1 scenario, verdict ~95% true **Test 2: Ambiguous Claim** | ||
| 176 | * Input: "Switzerland has the highest income in Europe" | ||
| 177 | * Expected: Factual, 2-3 scenarios, verdict with uncertainty **Test 3: Statistical Claim** | ||
| 178 | * Input: "10% of people have condition X" | ||
| 179 | * Expected: Factual, evidence with numbers, probabilistic verdict === 7.2 Edge Cases === **Test 4: Opinion** | ||
| 180 | * Input: "Paris is the best city" | ||
| 181 | * Expected: Non-factual (opinion), blocked by Gate 1 **Test 5: Prediction** | ||
| 182 | * Input: "Bitcoin will reach $100,000 next year" | ||
| 183 | * Expected: Non-factual (prediction), blocked by Gate 1 **Test 6: Insufficient Evidence** | ||
| 184 | * Input: Obscure factual claim with no sources | ||
| 185 | * Expected: Blocked by Gate 4 (<2 sources) === 7.3 Quality Gate Tests === **Test 7: Gate 1 Effectiveness** | ||
| 186 | * Input: Mix of 10 factual + 10 non-factual claims | ||
| 187 | * Expected: Gate 1 blocks all 10 non-factual (100% precision) **Test 8: Gate 4 Effectiveness** | ||
| 188 | * Input: Claims with varying evidence availability | ||
| 189 | * Expected: Gate 4 blocks low-confidence verdicts == 8. Technical Architecture (POC) == === 8.1 Simplified Architecture === **POC Tech Stack:** | ||
| 190 | * **Frontend:** Simple web interface (Next.js + TypeScript) | ||
| 191 | * **Backend:** Single API endpoint | ||
| 192 | * **AI:** Claude API (Sonnet 4.5) | ||
| 193 | * **Database:** Local JSON files (no database) | ||
| 194 | * **Deployment:** Single server **Architecture Diagram:** See [[POC1 Specification>>FactHarbor.Specification.POC.Specification]] === 8.2 AKEL Implementation === **POC AKEL:** | ||
| 195 | * Single-threaded processing | ||
| 196 | * Synchronous API calls | ||
| 197 | * No caching | ||
| 198 | * Basic error handling | ||
| 199 | * Console logging **Full AKEL (POC2+):** | ||
| 200 | * Multi-threaded processing | ||
| 201 | * Async API calls | ||
| 202 | * Evidence caching | ||
| 203 | * Advanced error handling with retry | ||
| 204 | * Structured logging + monitoring == 9. POC Philosophy == {{info}} | ||
| 205 | **Important:** POC validates concept, not production readiness. Focus is on proving AI can do the job, with production quality coming in later phases. | ||
| 206 | {{/info}} === 9.1 Core Principles === **1. Prove Concept, Not Production** | ||
| 207 | * POC validates AI can do the job | ||
| 208 | * Production quality comes in POC2 and Beta 0 | ||
| 209 | * Focus on "does it work?" not "is it perfect?" **2. Implement Subset of Requirements** | ||
| 210 | * POC covers FR1-7, NFR11 (lite) | ||
| 211 | * All other requirements deferred | ||
| 212 | * Clear mapping to [[Main Requirements>>FactHarbor.Specification.Requirements.WebHome]] **3. Quality Gates Validate Approach** | ||
| 213 | * 2 gates prove the concept | ||
| 214 | * Remaining 5 gates added in POC2 | ||
| 215 | * Gates must demonstrably improve quality **4. Iterate Based on Results** | ||
| 216 | * POC results determine next steps | ||
| 217 | * Decision gate after POC1 | ||
| 218 | * Flexibility to pivot if needed === 9.2 Success = Clear Path Forward === POC succeeds if we can confidently answer: ✅ **Technical Feasibility:** | ||
| 219 | * Can AI extract claims reliably? | ||
| 220 | * Can AI find balanced evidence? | ||
| 221 | * Can AI compute reasonable verdicts? ✅ **Quality Approach:** | ||
| 222 | * Do quality gates improve output? | ||
| 223 | * Can we measure and track quality? | ||
| 224 | * Is the gate approach scalable? ✅ **Production Path:** | ||
| 225 | * Is the core architecture sound? | ||
| 226 | * What needs improvement for production? | ||
| 227 | * Is POC2 the right next step? == 10. Related Pages == * **[[Main Requirements>>FactHarbor.Specification.Requirements.WebHome]]** - Full system requirements (this POC implements a subset) | ||
| 228 | * **[[POC1 Specification (Detailed)>>FactHarbor.Specification.POC.Specification]]** - Detailed POC1 technical specs | ||
| 229 | * **[[POC Summary>>FactHarbor.Specification.POC.Summary]]** - High-level POC overview | ||
| 230 | * **[[Implementation Roadmap>>FactHarbor.Roadmap.WebHome]]** - POC1, POC2, Beta 0, V1.0 phases | ||
| 231 | * **[[User Needs>>FactHarbor.Specification.Requirements.User Needs.WebHome]]** - What users need (drives requirements) **Document Owner:** Technical Team **Review Frequency:** After each POC iteration **Version History:** | ||
| 232 | * v1.0 - Initial POC requirements | ||
| 233 | * v2.0 - Updated after specification cross-check | ||
| 234 | * v3.0 - Aligned with Main Requirements (FR/NFR IDs added) |