Building an LLM-Based Personalized Learning Framework: Architecture and a Six-Week Case Study
This article examines a personalized learning framework built with large language model APIs, basic scripts, and structured prompts. It covers knowledge mapping, daily study-plan generation, and feedback-driven adjustments using assessment errors. A six-week implementation in high school mathematics and physics illustrates how the framework supported targeted practice and improved test results, followed by potential extensions involving vector databases, cloud-based inference, and OCR.
Introduction: Where LLMs Can Help with Learning Bottlenecks
High school mathematics and physics often involve a steep increase in conceptual difficulty. Moving from basic algebra to plane vectors and three-dimensional geometry, or combining mechanics and electromagnetism in physics, can overwhelm students as the density of knowledge increases. Conventional responses—more practice problems and additional tutoring—may be inefficient when they fail to address a learner’s specific gaps.
As a developer, I encountered this problem when a family member struggled with mathematics and physics. Mathematics scores hovered around 60 points, while physics scores were in the 20–30 range. Rather than relying entirely on conventional tutoring, I used large language models (LLMs) and general-purpose AI capabilities to build a personalized learning framework.
After approximately six weeks of implementation and consistent use, the learner’s physics score rose to around 50 points. A weekly mathematics test focused on three-dimensional vectors exceeded 120 points, with the learner estimating that a score above 130 would have been possible with more time.
This article reviews the framework’s architecture, implementation process, and underlying methodology.
1. Turning Learning Difficulties into Engineering Requirements
The first step was to translate a broad educational problem into specific technical requirements.
When a student becomes lost in plane vectors or solid geometry, the issue may be a break in the connections between concepts: foundational knowledge has not transferred effectively to more advanced applications.
I defined three objectives:
- Diagnose knowledge gaps: Identify the concepts and skills the student has not mastered within a particular topic.
- Plan a learning progression: Generate a step-by-step path appropriate to the student’s current understanding, rather than immediately assigning difficult problems.
- Adapt through feedback: Use errors from weekly tests and monthly exams to adjust subsequent study plans.
This creates a data-driven decision loop. The LLM serves as the central planning engine, using its reasoning and text-generation capabilities to interpret learning evidence and propose targeted tasks.
2. Architecture of the Personalized Learning Framework
The implementation did not depend on a single SaaS application. Instead, it combined general-purpose LLM APIs, basic scripts, and structured reasoning prompts.
The architecture consisted of three core modules.
2.1 Knowledge Structuring
First, I supplied the model with the course syllabus and textbook table of contents, then asked it to produce a structured knowledge map for the relevant topic.
For three-dimensional vectors, the resulting map included:
- Basic vector operations
- Conditions for collinearity and coplanarity
- The basis theorem for three-dimensional vectors
- Calculating angles and distances in three-dimensional space
Each node included basic definitions, common mistakes, and representative counterexamples.
The purpose was to break a broad chapter into smaller learning units and make the relationships between foundational concepts and later applications explicit.
2.2 Study-Plan Generation
The planning engine relied on a standardized prompt template:
Role: You are an experienced high school mathematics curriculum specialist.Background: The student currently scores 40% on weekly tests coveringthree-dimensional vectors (60 out of 150 points). Foundational conceptsare unclear, and the student lacks intuition for setting up coordinatesystems and performing coordinate calculations.Goal: Create a two-week targeted improvement plan.Requirements:1. Follow a gradual progression from rebuilding concepts to practicingintermediate-level problems.2. Each daily plan must include:- A review of core concepts (15 minutes)- Practice with basic problem types (3 problems)- A summary of common mistakes3. Output a Markdown table with the following columns:Day, Knowledge Topic, Task Description, Acceptance Criteria.
The generated plan specified daily tasks and acceptance criteria. Those criteria introduced an engineering-style testing component: progress could be checked against a defined outcome rather than judged only by time spent studying.
2.3 Feedback and Plan Adjustment
Feedback kept the framework responsive to the learner’s actual performance.
After each weekly test, I entered the questions the student had answered incorrectly—using OCR or manual transcription—along with the student’s incorrect solution steps.
A typical prompt was:
The following are the student's incorrect answers from this week'sthree-dimensional vector test.Analyze the underlying knowledge gaps and adjust next week's learningpriorities accordingly. Reduce practice on problem types the student hasalready mastered and increase variations targeting weaker areas.
This created a context-grounded adjustment loop, conceptually similar to the grounding used in retrieval-augmented generation (RAG): recent learning evidence informed the model’s next output. The initial implementation supplied that evidence directly as context rather than retrieving it from a dedicated knowledge store.
The resulting plan could reduce unnecessary repetition and redirect practice toward unresolved weaknesses.
3. Six-Week Implementation and Results
The implementation ran for six weeks, organized into three two-week sprints.
Sprint 1, Weeks 1–2: Rebuilding the Foundations
The model recommended temporarily setting aside complex, multi-part problems and focusing on the rules for establishing coordinate systems and performing coordinate calculations.
I used the model to generate calculation-only exercises without elaborate geometric scenarios. These exercises concentrated attention on coordinate representations and basic operations.
During this stage, mathematics performance began to stabilize, and the student stopped leaving large sections of tests unanswered.
Sprint 2, Weeks 3–4: Identifying Problem Patterns and Practicing Variations
The next stage focused on recurring problem types, including folding configurations in solid geometry and loci of moving points.
The model generated variations of standard problems, allowing the student to practice different presentations of the same underlying concept. Rather than assigning a generic set of workbook exercises, I could request variations specifically targeting the learner’s weaknesses.
In physics, force analysis was a priority. The model produced a decision tree for choosing between analyzing a system as a whole and isolating individual objects. This helped the student organize the logical steps involved in force analysis.
Sprint 3, Weeks 5–6: Timed Practice and Strategy Adjustment
The final stage introduced timed simulations and test-taking strategy, with an explicit focus on time management in the last week.
I supplied the system with the student’s time allocation from a monthly exam. The model identified excessive time spent on multiple-choice questions and suggested selectively skipping difficult questions while prioritizing those the student could answer efficiently.
By the end of the six weeks:
- The weekly mathematics test on three-dimensional vectors exceeded 120 points.
- During the review, the student estimated that a score above 130 was attainable with sufficient time.
- Physics scores improved to around 50 points.
These results describe the observed outcome of this individual implementation, rather than establishing a general performance guarantee for LLM-based learning systems.
4. Generalizing the Architecture
The central pattern—diagnose, generate, and adapt through feedback—is not limited to mathematics or physics.
During the review, I noticed similarities with AI learning architectures in the open-source community that focus on English-language learning. Across these domains, the shared approach is to break knowledge into manageable components, use an LLM to reason about the learner’s current needs, and generate targeted content.
For broader developer or enterprise applications, the framework could be extended using established model platforms, including Baidu AI Cloud where appropriate. Three directions follow naturally from the initial architecture.
4.1 Storage: A Private Educational Knowledge Base
Past exam questions and records of incorrectly answered problems could be stored in a vector database.
This would provide a private educational knowledge base and support retrieval of relevant material when generating practice tasks or revising a learning plan.
4.2 Compute and Scheduling: Batch Inference
Cloud-native container platforms could host batch inference workloads for generating personalized practice papers for large numbers of students.
This would extend the framework beyond an individually managed workflow toward a more scalable deployment model.
4.3 Multimodal Input: Handwritten Work and OCR
OCR could be integrated to recognize handwritten solution steps and support automated marking.
This would reduce manual data entry and help connect student work more directly to the feedback loop.
These are potential extensions of the framework, not features demonstrated in the six-week implementation.
Conclusion
As a developer with a humanities background, I found that the value of LLMs extended well beyond code generation and writing assistance. They provided a practical way to organize unfamiliar subject matter, structure learning tasks, and revise those tasks in response to evidence.
The key was not simply asking an AI system to explain a topic. It was converting broad educational goals into explicit prompts, measurable tasks, and a recurring feedback loop.
This case illustrates how general-purpose LLM capabilities can support a low-cost, personalized learning framework. The same diagnose–generate–adapt pattern may also be useful in other domains that require complex reasoning and individualized plans.
