Architecture

Two-Stage Grading

Transparent by design โ€” every point is traceable to a specific text comparison.

Stage 1: Rule-Based Floor

Calculates a guaranteed minimum score based on literal technical term coverage. Students cannot score below what they explicitly mentioned.

Score = (MatchedTerms / TotalTerms) * MaxMarks

Stage 2: Semantic Grading

Applies the PMC12171532 equations using NLP metrics and Semantic Similarity to award points for meaning and conceptual understanding.

Score = min(MaxMarks, Stage1 + (F * MaxMarks))

Scoring Metrics & Weights

๐Ÿง 

Semantic Similarity (50%)

TF-Cosine proxy for USE contextual meaning.

๐Ÿ”—

Jaccard Similarity (15%)

Token-set intersection for vocabulary usage.

๐Ÿ“

Cosine Frequency (15%)

Word frequency vector angle for synonymous phrasing.

๐Ÿ“

Normalized Word Count (15%)

Ratio-based length checks to prevent inflation.

๐Ÿ–‹๏ธ

Edit Similarity (5%)

Normalized Levenshtein for typo tolerance.

๐Ÿ“‹ Equations from PMC12171532

// Confidence Score (C)

C = 0.5 * Stf + 0.5 * (0.15*Sj + 0.05*Se + 0.15*Sc + 0.15*Sw)

// Final Scoring Rule (F)

if (Stf < 0.2) return 0.0
if (Stf >= 0.9 && Sw >= 0.8) return 1.0
else return C