Inspiration

A student re-reads a chapter three times, closes the book, and feels prepared. The next morning, the exam asks why, and everything disappears. Psychology calls this the illusion of competence—re-reading increases the feeling of knowing without improving actual recall.

Most AI education tools reinforce this by explaining to students. The protégé effect suggests the opposite: people learn best by trying to teach. The challenge wasn't building another chatbot—it was measuring an explanation objectively.

Everyone built an AI that teaches. We built one that listens.


What it does

Students choose a concept, rate their confidence (1–5) before receiving feedback, then explain it by voice (Web Speech API) or text.

The scoring engine runs independently of the LLM.

  • Grasp Score (0–100)

$$ \text{Grasp}=0.5C_{\text{coverage}}+0.3C_{\text{correctness}}+0.2C_{\text{depth}} $$

  • Understanding Map highlights which concept-map nodes were covered.
  • Parrot Detector identifies memorized explanations using semantic similarity and trigram overlap.
  • Confused Student Persona asks targeted follow-up questions based on detected gaps.
  • Two causal "why" questions evaluate deeper understanding.
  • Detailed report includes the Grasp Score, coverage, correctness, depth, missed concepts, contradictions, parrot verdict, and compares confidence with performance (e.g., 5/5 confidence, 58 score → overconfident).

Loop Mode

After scoring, Lucid generates a <150-word personalized lesson covering only the missing concepts, asks the learner to explain again, then re-scores and visualizes the improvement.

Verified demo

  • 71 → 81 (+10)
  • Coverage 53% → 82%
  • Concept map 3/7 → 6/7

Teacher Dashboard

Teachers share a simple six-character join code—no accounts required.

Instead of ranking students, Lucid highlights concepts that multiple students consistently miss, helping teachers identify what should be re-taught.


How we built it

Scoring Engine (TypeScript)

  1. Segment explanations into meaningful clauses.
  2. Compute coverage using MiniLM-L6-v2 embeddings (threshold 0.55).
  3. Verify correctness using DeBERTa-v3 NLI.
  4. Measure depth using similarity between "why" answers and expected reasoning.
  5. Detect memorization using:

$$ \text{parrot}= (\text{sim}_{\text{textbook}}>0.72) \;\land\; (\text{trigram overlap}>0.28) $$

  1. Classify explanations into {good, partial, memorized, wrong} using a 16-feature ExtraTrees model.

Offline Training (Python)

training/features.py mirrors the TypeScript scoring pipeline exactly. We train an ExtraTrees classifier, export it as weights.json, and re-implement inference in TypeScript with prediction-for-prediction verification.

Architecture

The scoring engine feeds the LLM—not the reverse.

The LLM only generates personalized lessons and follow-up questions. Every score remains fully functional even if the LLM is disabled.

Stack

Next.js 16 · React 19 · Tailwind v4 · Framer Motion · transformers.js · Zod · Provider-swappable LLM module with automatic fallback


Challenges we ran into

  • NLI produced false contradictions between unrelated sentences. We solved this by comparing each claim only with its closest reference fact after embedding similarity filtering.
  • Aggressive clause splitting fragmented meaningful phrases, reducing scoring accuracy.
  • Coverage threshold tuning exposed a precision–recall tradeoff; generic embeddings aren't calibrated for explanation quality.
  • Classifier performance plateaued because synthetic data failed to distinguish good from partial. Replacing it with diverse LLM-generated explanations and richer distribution features improved held-out accuracy from 0.733 → 0.904.
  • Free-tier LLM quotas were model-specific, so we implemented automatic model fallback instead of failing demos.

Accomplishments that we're proud of

Metric Result
Samples / Features / Classes 3,219 / 16 / 4
5-fold CV Accuracy 0.889 ± 0.017
Held-out Accuracy 0.904
Memorized F1 0.97
Wrong F1 0.98
Misconception Classifier 0.960

Ablation Study

Removing the copying features produced:

Metric Full Ablated Δ
Held-out Accuracy 0.904 0.846 +0.058
Memorized Recall 0.944 0.790 +0.153

Semantic similarity alone couldn't distinguish memorization from understanding. Trigram overlap became the highest-importance feature, validating the two-signal Parrot Detector.

Other achievements:

  • Scores remain valid even when the LLM is disabled.
  • Verified Python↔TypeScript feature parity.
  • ~0.5 s local inference.
  • Confidence calibration directly measures the illusion of competence.
  • Teacher dashboard reports class-wide misconceptions instead of rankings.
  • Fully accessible without voice input.

What we learned

  • Better data improved performance more than changing models.
  • Pre-trained models silently fail when their assumptions are violated.
  • Ablation reveals whether a feature is genuinely useful.
  • Keeping the LLM out of scoring made the results trustworthy.
  • Every threshold represents an educational tradeoff between false positives and false negatives.

What's next for Lucid

  • Fine-tune an embedding model specifically for explanation quality.
  • Build a human-labeled evaluation set with inter-rater agreement.
  • Generate concept maps automatically from PDFs or syllabi.
  • Support multilingual explanations.
  • Improve depth scoring beyond embedding similarity.
  • Add adaptive spaced repetition based on learner performance.

Built With

Share this project:

Updates

Submission history