Kavod Technologies
AI Tutoring at Scale: Inside LearnStack's Personalization Engine
EngineeringLearnStack

AI Tutoring at Scale: Inside LearnStack's Personalization Engine

Amina Diallo
Amina Diallo
January 12, 202611 min read
Amina Diallo

Amina Diallo

AI Research Lead

Amina heads Kavod's AI research lab, building adaptive learning systems and NLP models for African languages.

Rethinking Education with Adaptive Intelligence

When we set out to build LearnStack, we knew that a one-size-fits-all curriculum would never work for a continent with over 2,000 languages, vastly different schooling systems, and students whose prior knowledge varies enormously. The challenge was clear: build an AI tutoring engine that genuinely adapts to each learner in real time, not just the next video to watch, but the difficulty, language, pacing, and pedagogical approach itself.

This post is a technical deep-dive into the personalization engine that powers LearnStack today, serving hundreds of thousands of students across 14 African countries.

The Adaptive Learning Loop

At the heart of LearnStack is a continuous observe-model-act loop:

  1. Observe -- Every interaction a student has with the platform generates a signal: time spent on a question, answer correctness, hint usage, scroll depth on reading material, even pause-and-replay patterns on video lessons.
  2. Model -- These signals feed into a real-time student model that tracks mastery across a fine-grained knowledge graph (more on this below).
  3. Act -- The system selects the next learning activity by solving a constrained optimization problem: maximize expected learning gain while respecting session-time budgets and cognitive-load limits.

The loop runs on every interaction, meaning the platform can pivot mid-session if a student suddenly struggles or breezes through material.

Bayesian Knowledge Tracing

We use a variant of Bayesian Knowledge Tracing (BKT) extended with deep-learning components to estimate the probability that a student has mastered each knowledge component. The classical BKT model defines four parameters per skill:

  • P(L0) -- prior probability the student already knows the skill
  • P(T) -- probability the student transitions from unlearned to learned after one opportunity
  • P(G) -- probability of a correct guess
  • P(S) -- probability of a careless slip

We extend this with a neural layer that conditions these parameters on student embeddings, enabling transfer learning across skills. In practice this means a student who demonstrates strong algebra foundations will see their initial mastery estimates for calculus prerequisites adjusted upward.

class DeepBKT(nn.Module):
    def __init__(self, embed_dim=128, n_skills=2400):
        super().__init__()
        self.student_encoder = StudentEncoder(embed_dim)
        self.skill_encoder = SkillEncoder(embed_dim)
        self.bkt_head = nn.Sequential(
            nn.Linear(embed_dim * 2, 256),
            nn.ReLU(),
            nn.Linear(256, 4),  # P(L0), P(T), P(G), P(S)
            nn.Sigmoid()
        )

    def forward(self, student_features, skill_id, interaction_seq):
        s_embed = self.student_encoder(student_features, interaction_seq)
        k_embed = self.skill_encoder(skill_id)
        params = self.bkt_head(torch.cat([s_embed, k_embed], dim=-1))
        return params  # per-student, per-skill BKT parameters

This architecture lets us train on millions of interactions and generalize to new students within their first few answers.

Multi-Language NLP for African Languages

Perhaps the most technically ambitious part of LearnStack is our NLP pipeline. Students can ask questions, submit short-answer responses, and interact with the tutor in their preferred language, including Yoruba, Hausa, Swahili, Amharic, Zulu, Twi, Igbo, and several others alongside English, French, and Portuguese.

The Data Challenge

Large language models are notoriously data-hungry, and African languages are notoriously low-resource. We tackled this on multiple fronts:

  • Community-sourced parallel corpora: We partnered with universities and language institutes to build parallel sentence datasets for education-specific vocabulary.
  • Curriculum-aligned synthetic data: Using existing English curricula, we generated translation candidates with a base multilingual model, then had native-speaker educators review and correct them.
  • Cross-lingual transfer: We fine-tuned from AfroXLMR, a multilingual transformer pretrained on African language web data, and applied adapter layers per language family to preserve shared morphological patterns.

Handling Morphological Complexity

Many African languages are agglutinative or tonal, which breaks assumptions baked into standard BPE tokenizers. For Yoruba, a single word can carry tonal diacritics that change meaning entirely. We built a tone-aware tokenizer that preserves diacritical marks as first-class tokens rather than treating them as noise.

For Swahili and related Bantu languages, noun class prefixes fundamentally alter sentence structure. Our parser uses a morpheme-aware attention mechanism that segments words into stems and affixes before computing attention scores, significantly improving question-understanding accuracy.

The Knowledge Graph

LearnStack's curriculum is not a flat list of lessons. It is a directed acyclic graph of over 12,000 knowledge components spanning primary through secondary education, mapped to the curricula of 14 countries.

Each node represents a discrete concept (e.g., "addition of fractions with unlike denominators"). Edges encode prerequisites, and edge weights capture how strongly mastery of one concept predicts readiness for another. These weights are learned from student interaction data using a graph neural network.

Curriculum Alignment

Different countries teach the same mathematics differently. Nigerian JSS2 geometry overlaps with, but is not identical to, Kenyan Form 2 geometry. We maintain country-specific curriculum overlays on top of the universal knowledge graph, so the sequencing engine can respect national exam requirements while still leveraging cross-country learning signals.

  • Graph construction: Subject-matter experts define the base structure; edges are pruned and re-weighted quarterly using empirical prerequisite violation data.
  • Prerequisite inference: When a student transfers from one country's curriculum to another, the system automatically maps their mastery profile onto the new overlay and identifies gaps.

Student Progress Modeling

Beyond moment-to-moment adaptation, LearnStack builds a longitudinal model of each student's learning trajectory. This model powers several high-value features:

  • Forgetting curve estimation: Using a spaced-repetition model inspired by Ebbinghaus, the system schedules review sessions at optimal intervals to cement long-term retention.
  • Learning velocity tracking: If a student's rate of skill acquisition slows, the system can detect potential disengagement or confusion and surface an intervention, whether that is switching modalities, offering encouragement, or recommending a prerequisite review.
  • Exam readiness prediction: For students preparing for national exams (WAEC, KCSE, Matric), the model projects a readiness score and generates a personalized study plan that prioritizes high-impact topics.
interface StudentProgressModel {
  studentId: string;
  masteryMap: Record<string, MasteryEstimate>;
  forgettingCurves: Record<string, ForgettingParams>;
  learningVelocity: TimeSeriesData;
  examReadiness: {
    examType: string;
    predictedScore: number;
    confidenceInterval: [number, number];
    priorityTopics: string[];
  }[];
}

Infrastructure Considerations

Serving AI tutoring in real time across a continent with variable connectivity requires careful engineering:

  • Edge inference: We deploy quantized models to regional edge nodes so that latency-sensitive operations (hint generation, answer evaluation) complete in under 200ms even on 3G connections.
  • Offline-first architecture: The mobile app caches lesson content and a lightweight inference model locally. Students can continue learning offline, and their progress syncs when connectivity returns.
  • Bandwidth optimization: We compress lesson assets aggressively and use adaptive bitrate streaming for video content, automatically downscaling based on detected connection quality.

Results and What's Next

Since deploying the personalization engine, we have observed a 34% improvement in concept retention (measured by delayed post-test scores) compared to our previous linear curriculum approach. Student engagement sessions are 40% longer on average, and our churn rate dropped by 22%.

We are now working on conversational tutoring, where the AI tutor engages students in Socratic dialogue rather than simply presenting content. Early prototypes using retrieval-augmented generation over our knowledge graph are showing promising results, particularly for open-ended science questions where the reasoning process matters as much as the answer.

LearnStack is proving that world-class AI-driven education does not have to be a privilege of well-resourced school systems. With the right algorithms and a deep respect for linguistic and cultural diversity, we can meet every student exactly where they are.

#ai#education#personalization#learnstack#nlp

Try LearnStack today

Discover how LearnStack can help you build better, faster. Get started for free and see the difference.

Get Started
Back to All Articles

Annual Report FY2025

Our comprehensive review of performance and strategy

View Reports

Stay updated

Product launches, engineering updates, and company news.

Headquarters

Cape Town, South Africa
Technology Hub, Innovation District

Regional Offices

Lagos, Nigeria • Nairobi, Kenya
Accra, Ghana • Johannesburg, SA

Contact

info@kavodtechnologies.com
+27 21 123 4567

Kavod Technologies Limited © 2026. All rights reserved.

Accessibility Options