Command Palette

Search for a command to run...

Blog
Previous

Built an AI English Learning App with Custom Fine-Tuned LLM

How I trained my own LLM model and built a React Native app for AI-powered English learning with grammar analysis and conversational practice.

The Idea

Learning English through AI should feel like talking to a real tutor — not a robotic chatbot. I wanted to build an app that understands grammar mistakes, explains corrections naturally, and adapts to the user's level.

So I trained my own LLM model specifically for English language teaching.

Training My Own LLM

Dataset Preparation

I curated a training dataset of 10,000+ English conversation examples including:

  • Common grammar mistakes and their corrections
  • Natural conversation flows at different proficiency levels
  • Vocabulary building exercises with context
  • Idioms and phrasal verbs explained simply

Fine-Tuning Process

Using Ollama and Runpod GPU instances, I fine-tuned a base model:

  1. Prepared data in instruction/response JSONL format
  2. Ran QLoRA fine-tuning on Runpod A100 GPUs
  3. Evaluated against English proficiency benchmarks
  4. Converted to Ollama format for deployment

The fine-tuned model outperformed the base model by 45% on grammar correction tasks.

The App

Built with React Native for both iOS and Android, the app features:

AI Chatbot

  • Real-time conversation with the fine-tuned English tutor
  • Instant grammar analysis and correction
  • Natural explanations of why something is wrong
  • Adapts difficulty based on user level

Progress Tracking

  • Conversations — track daily chat sessions
  • Study Time — monitor learning minutes
  • Progress — overall improvement percentage
  • Achievements — gamified milestones (10 earned so far!)

Beautiful UI

  • Gradient-based design with warm orange/pink tones
  • Bottom navigation: Home, Practice, Profile, Settings
  • Progress cards with icons for quick stats
  • "Start New Session" button for instant learning

Tech Stack

  • React Native — Cross-platform mobile app
  • TypeScript — Type-safe development
  • Ollama — Custom fine-tuned LLM serving
  • Express.js — RESTful API backend
  • PostgreSQL — User data, progress, session history, grammar logs
  • Firebase — Authentication and push notifications
  • Runpod — GPU infrastructure for model training

Backend Architecture

The backend is built with Express.js and PostgreSQL:

Express.js API
├── /auth         — JWT authentication (signup, login, refresh)
├── /chat         — AI conversation endpoints (stream responses)
├── /grammar      — Grammar analysis & correction logs
├── /progress     — User stats, achievements, streaks
├── /sessions     — Learning session management
└── /models       — Model selection & configuration

PostgreSQL handles all persistent data:

  • users — profiles, settings, subscription tier
  • sessions — chat history with timestamps
  • grammar_logs — corrections tracked for analytics
  • achievements — unlocked milestones per user
  • progress — daily/weekly/monthly stats

Key Features

FeatureDescription
Grammar AnalyzerReal-time grammar checking with explanations
AI Tutor ChatConversational English practice
Progress TrackingDaily stats, study time, achievements
Level AdaptationAdjusts difficulty to user proficiency
Offline ModeCore features work without internet

Results

  • 1,000+ conversations in the first month of testing
  • 45% better grammar correction than base model
  • 4.8/5 user satisfaction rating from beta testers
  • 19% average progress improvement in 2 weeks

What I Learned

  • Fine-tuning a model for a specific domain (English teaching) produces dramatically better results than using a general-purpose LLM
  • Express.js + PostgreSQL gives you full control over data — Firebase alone isn't enough for complex analytics
  • React Native with a proper backend scales much better than a pure Firebase approach
  • Gamification (achievements, progress bars) keeps users engaged with learning
  • The quality of training data matters more than the quantity

This project combines my passion for AI/ML with practical mobile development — exactly what I do at Glixen Tech.