Skip to content

# πŸš€ AI-Powered Forensic Scoring Engine (Phase 3.4)Β #326

@KhairnarLokesh

Description

@KhairnarLokesh

πŸ“Œ Title

Implement AI-Powered Forensic Soundness Scoring Engine


🎯 Goal

Create a backend service that calculates a Forensic Soundness Score (0–100) for digital evidence based on integrity, metadata completeness, and chain-of-custody verification.

The score will help analysts quickly assess the reliability and admissibility strength of uploaded digital evidence.


🧠 Scoring Logic (Total = 100 Points)

The scoring engine should assign points based on the following criteria:

Criteria Points
βœ… Blockchain verification status +40
βœ… IPFS Content ID (CID) present +20
βœ… Metadata completeness (Location, GPS, Timestamp present) +20
βœ… Chain of custody history exists +20
Maximum Score 100

βš™οΈ Functional Requirements

1️⃣ Backend Service

File to Create:

services/forensicScoreService.js

Responsibilities:

  • Accept evidence object as input
  • Evaluate all scoring parameters
  • Return:
    • Final score (0–100)
    • Breakdown of points per category
    • Score classification (Optional enhancement)

Example Output Format:

{
  "score": 85,
  "breakdown": {
    "blockchain": 40,
    "ipfs": 20,
    "metadata": 15,
    "chainOfCustody": 10
  },
  "classification": "High Integrity"
}

2️⃣ Scoring Rules Detail

πŸ” Blockchain Verification (+40)

  • If blockchain hash exists and verified β†’ +40
  • If exists but not verified β†’ +20 (optional improvement)
  • If not present β†’ 0

πŸ“¦ IPFS CID Presence (+20)

  • If CID exists β†’ +20
  • Else β†’ 0

πŸ“ Metadata Completeness (+20)

Check if all required fields are present:

  • Location
  • GPS Coordinates
  • Timestamp

Scoring:

  • All 3 present β†’ +20
  • 2 present β†’ +15
  • 1 present β†’ +10
  • None β†’ 0

πŸ”— Chain of Custody (+20)

  • If custody history length β‰₯ 1 β†’ +20
  • If partial/incomplete β†’ +10 (optional improvement)
  • If none β†’ 0

πŸ–₯️ Frontend Integration

File to Modify:

public/dashboard-analyst.html

Add:

  • Display Forensic Soundness Score (Prominent UI)
  • Show:
    • Numeric score
    • Visual indicator (progress bar / circular gauge)
    • Score breakdown
    • Classification badge (Low / Medium / High Integrity)

Suggested Classification Ranges:

Score Range Label
80–100 🟒 High Integrity
50–79 🟑 Medium Integrity
0–49 πŸ”΄ Low Integrity

πŸ” API Integration (If Required)

If evidence is fetched via API:

  • Ensure score is calculated before sending response
    OR
  • Create endpoint:
GET /api/evidence/:id/forensic-score

πŸ§ͺ Testing Requirements

  • Test with:
    • Fully verified evidence (Expect 100)
    • Partial metadata
    • No blockchain verification
    • Missing CID
  • Validate score accuracy
  • Edge case: Empty evidence object

πŸ“Š Acceptance Criteria

  • forensicScoreService.js implemented
  • Scoring logic correctly calculates 0–100
  • Returns structured breakdown
  • Dashboard displays score clearly
  • Score updates dynamically when evidence changes
  • Tested with multiple evidence states

πŸ’‘ Future Enhancements (Optional)

  • Machine Learning-based anomaly detection
  • Weight adjustment via admin panel
  • Risk prediction model
  • Auto-flag low score evidence

🏁 Expected Outcome

A fully functional AI-powered forensic scoring engine that:

  • Quantifies evidence reliability
  • Improves analyst decision-making
  • Strengthens legal defensibility
  • Enhances transparency of digital chain-of-custody

Priority: High
Phase: 3.4
Type: Feature Implementation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions