PrismLMS: AI-Powered Learning, End-to-End
By Shiva Prasad
An LMS that generates its own supporting material. Upload a chapter and get a quiz, flashcards, a mind map, and a summary back in under a minute, streamed as they finish.
Platform
SaaS LMS — Web (Admin + Student)
Duration
3 Months
~60s
Generation time
4
AI artifacts per chapter
5
Parallel LLM executions
Project overview
We built a multi-tenant SaaS LMS with two front ends, one for admins who build courses and one for students who take them, and put AI generation inside the authoring workflow rather than alongside it as a separate tool.
An admin uploads a chapter. The platform extracts structured knowledge from it, then generates four artifacts against that knowledge: a quiz, flashcards, a mind map, and a summary. Five LLM calls run in parallel, and the set completes in roughly 30 to 60 seconds. Results stream into the UI as each one lands rather than appearing together at the end, so the admin watches the chapter fill in.
Manual effort for supporting content went to zero. Generation stays separate from publishing, so nothing reaches a student until an admin has reviewed it.
The pipeline processes chapters of 400,000 characters and more. It runs against OpenAI GPT-4.1 or a local Llama 3.1 through Ollama, selected per deployment rather than fixed in code. Built in three months.
Platform
SaaS LMS — Web (Admin + Student)
Duration
3 Months
Type
AI & Education
Stack
10 technologies
The challenge
Traditional LMS platforms rely on static content delivery. A course is a set of files: PDFs to read, videos to watch, and a quiz someone wrote by hand. Learners move through it passively, and nothing converts what they read into something they practice against.
The supporting material is where it breaks. Quizzes, flashcards, mind maps, and summaries are what move a learner from reading to recall, and each one is authored manually, chapter by chapter. The work is slow, it scales with course size rather than independently of it, and it is the first thing cut when a course ships under deadline.
Two structural gaps compounded that. Course content arrives in several formats with no unified system to synthesize knowledge across them, so a PDF and a video covering the same material stay disconnected. And complex course structures had no intuitive management layer, which pushed the authoring burden back onto admins who were already the constraint.
Underneath both sat the same absence. Without real-time feedback or any adaptive mechanism, the platform could not respond to how a learner was actually doing.
Static content leads to passive learning experiences
Manual creation of quizzes and flashcards is time-consuming and unscalable
No unified system to synthesize knowledge from multiple content formats
Complex course structures lack intuitive management and UX
No real-time feedback or adaptive learning mechanisms
What we set out to do
- 01
Automate generation of quizzes, flashcards, mind maps, and summaries from course content
- 02
Deliver AI-generated artifacts in real time with streaming UI updates
- 03
Build a scalable multi-tenant LMS architecture
- 04
Provide intuitive course management for admins and structured learning for students
- 05
Support multiple LLM providers for flexibility and cost optimization
How we solved it
Hierarchical content architecture
The content model is three levels deep. A course contains chapters, and a chapter contains items. An item is a PDF, a video, or a quiz. Every piece of course material resolves to one of those, which gives the admin UI a single mental model to teach and the generation pipeline a single shape to read.
Chapter items vary in structure. A quiz carries questions, options, and answers. A video carries a source and a duration. A PDF carries a file reference. Rather than model each as its own set of tables, item payloads are stored as JSONB in PostgreSQL, so supporting a new item type is a change in application code instead of a migration. The files themselves live in S3 and are served through CloudFront.
The same hierarchy carries multi-tenancy. Courses scope to a tenant, and everything beneath a course inherits that scope, so tenant isolation follows the tree rather than being re-established at each level.
Key decision
Structured hierarchical content model
Result
Scalable and intuitive course management.
Two-stage AI generation pipeline
The obvious way to build this is to hand a PDF to a model and ask for a quiz. We did not do that. Generation runs in two stages, and the split is the reason the output is usable.
The first stage reads the source material and extracts structured knowledge from it, building a unified knowledge base for the chapter. The second stage generates each artifact from that knowledge base rather than from the raw file. LangChain orchestrates both.
The payoff is consistency. When four artifacts are generated independently from the same source, each generation interprets that source afresh, and a quiz can end up testing material the summary never mentions. Generating from one extracted representation means all four artifacts describe the same chapter. It also makes the expensive comprehension work happen once instead of four times.
The knowledge base is what lets the platform synthesize across formats. Content that arrives as a PDF and content that arrives as a video are reduced to the same representation before anything is generated from either.
Key decision
Knowledge-first generation using LangChain
Result
Higher quality and consistent AI outputs.
Parallel LLM execution
Once the knowledge base exists, the four artifacts have no dependency on one another. A quiz does not need the summary, and a mind map does not need the flashcards. Running them in sequence would make total time the sum of four model calls for no reason.
Five LLM executions are dispatched simultaneously and awaited together, using Promise-based concurrency in the NestJS services. Total generation time for a chapter lands at roughly 30 to 60 seconds, which is close to the slowest single call rather than the sum of all of them.
The range matters more than the midpoint. Because the wall-clock time is set by whichever call is slowest, a chapter dense enough to make one artifact expensive moves the whole number, which is why generation is quoted as a range rather than a fixed figure.
Key decision
Parallel processing using Promise-based execution
Result
Reduced generation time to ~30–60 seconds.
Real-time streaming architecture
Half a minute to a minute of silence after clicking a button reads as a broken page. The generation time was already close to its floor, so the remaining work was on how that time is presented.
Artifacts stream to the client over Socket.IO as each one completes, with RxJS handling the event streams on the way through. The admin sees the summary appear, then the flashcards, then the quiz, in whatever order they finish. Nothing waits for the slowest call before anything is shown.
No measured time changed. The perceived wait did, because progress is visible for the whole duration instead of only at the end. Streaming over batch processing was the decision, and it did more for the authoring experience than shaving seconds off the pipeline would have.
Key decision
Streaming over batch processing
Result
Improved perceived performance and UX.
Flexible AI infrastructure
Model choice is a deployment concern, not an application one. Some deployments want the strongest available hosted model. Others cannot send course material to a third-party API at all, or need per-token cost under a ceiling that a frontier model will not meet.
So the generation code targets an abstraction rather than a provider. The same pipeline runs against OpenAI GPT-4.1 or against Llama 3.1 hosted locally through Ollama, and switching between them is configuration. Neither the two-stage pipeline nor the parallel execution layer knows which one it is talking to.
That covers both cost optimization and data residency with one mechanism. A tenant that needs everything to stay on its own infrastructure runs the local model. A tenant that wants maximum output quality runs the hosted one. The services are packaged with Docker, so either shape deploys the same way.
Key decision
Multi-LLM abstraction layer
Result
Cost optimization and deployment flexibility.
Measurable impact
~30–60s
Total generation time
4
AI-generated artifacts per chapter
0
Manual effort for content creation
70–80%
Estimated learner interaction rate
400K+
Characters processed reliably
Tech stack
What we learned
The finding that mattered was not that a model can write a quiz. It was that output quality tracked how well the input had been structured. Extracting knowledge first and generating second produced better and more consistent artifacts than generating straight from the source material, and that ordering ended up shaping the whole pipeline.
Streaming changed the perception of speed more than any optimization did. The same 30 to 60 seconds reads differently when partial results appear throughout instead of arriving in one batch.
Abstracting the LLM provider paid off twice. A deployment can choose a hosted frontier model or a local one on cost or data-residency grounds, and the generation code does not change either way.
The last decision was the least technical and the one we would keep first: generation is separate from publishing. AI drafts, a person approves, and only then does a student see it. That boundary is what makes an AI-driven system safe to put in front of learners.
- 01
Structuring knowledge before generation significantly improves AI output quality
- 02
Streaming partial results enhances user experience compared to batch processing
- 03
Multi-LLM support provides flexibility in cost and performance
- 04
Separating generation from publishing ensures quality control in AI-driven systems
More case studies
WhatsApp Cloud API console: how we built PrismWA
View case study AI Backend & ArchitectureBuilding PrismBot: A Multi-Tenant, Multi-Agent Chat Architecture
View case study Voice AI & TelephonyReplacing Exotel with a Self-Hosted Voice AI Gateway — 60% Cost Reduction at 500K Calls/Day
View case studyReady to build something that matters?
We solve problems that don't have Stack Overflow answers. Let's talk.
Book a Discovery Call