CEFR Coach
Inspiration
When I was learning English, I often felt that language apps either repeated things I already knew or jumped to lessons that were too difficult. They rarely adapted to my actual level.
That made me wonder: what if a tutor could first understand where a learner really is, then always give them the next achievable challenge?
This idea is inspired by Krashen's i+1 theory: people learn best when the material is just slightly above their current ability. CEFR Coach tries to make that process automatic.
I also built this because I experienced it myself. Most of my English came from reading documentation, watching technical videos, and building projects, so I wanted a tool that adapts to the learner instead of forcing everyone through the same path.
What it does
- The learner writes two short texts in English on any topic.
- A fine-tuned classifier analyzes the writing and predicts the learner's CEFR level (A1--C2).
- The application creates an exercise targeted one level above the detected level.
- The learner answers, and GPT-5.6 provides corrections, explanations, and feedback.
- As more writing samples are collected, the estimated level is updated over time.
One design choice was especially important: the CEFR level is always determined by the classifier. The LLM teaches and gives feedback---it never decides the learner's level.
How I built it
- Classifier: Compact 1.5B transformer fine-tuned with QLoRA on a balanced CEFR dataset (84.9% accuracy), deployed on Hugging Face Spaces.
- Level stability: Rolling window using the last five predictions with confidence-weighted voting.
- RAG: YAML grammar corpus indexed with ChromaDB and filtered by CEFR level before retrieval.
- LLM: GPT-5.6 for exercise generation, answer evaluation, explanations, and tutoring.
- Codex: Used throughout development to speed up the FastAPI backend, React frontend, RAG pipeline, and evaluation scripts.
- Stack: FastAPI, React, TypeScript, ChromaDB, Render, and Vercel.
Testing & Evaluation
To validate the system, I built automated evaluation suites instead of relying only on manual testing.
- 12 classifier tests (two for each CEFR level) compare predicted and expected levels using the live API.
- 13 RAGAS evaluation cases measuring:
- Faithfulness
- Answer Relevancy
- Context Precision
- Context Recall
Challenges
One challenge was that very short texts can produce inconsistent predictions. Instead of trusting a single result, I combined several recent predictions into a confidence-weighted rolling window, making the estimated level much more stable.
Another challenge came from deploying on free hosting services that occasionally go to sleep. I redesigned the application so the client could restore the learning session without losing progress.
Finally, I made sure the LLM never overruled the classifier. Keeping those responsibilities separate made the system much more reliable.
What I learned
This project taught me how to combine a fine-tuned model, a RAG pipeline, and an LLM into one adaptive learning system. More importantly, it showed me the importance of evaluating each component with automated tests instead of assuming it works.
What's next
- Expand the grammar corpus.
- Add spoken English practice.
- Track learner progress over time with richer analytics.
Log in or sign up for Devpost to join the conversation.