The Mentor in the Machine: Architecting QBrain AI

Engineering a hyper-local, curriculum-aware AI tutor to revolutionize exam preparation for a nation of students.

Tech Stack

FastAPI, Python, React, GSAP

Core Innovation

Curriculum-Grounded RAG

Timeline

8 Weeks (MVP)

The Brief

In Bangladesh's competitive academic landscape, millions of students preparing for SSC board exams face a resource gap. Generic AI tools lack the nuanced, hyper-specific knowledge of the National Curriculum (NCTB), making them fundamentally unequipped for the task.

Our vision was to architect a digital mentor—an intelligent system named QBrain AI. This platform would not merely fetch data; it would understand student intent, meticulously trained on the very curriculum it was designed to teach.

The Cortex

  • FastAPI was chosen for its asynchronous performance and Pydantic-driven data integrity, ensuring a scalable and robust API core.
  • A Vector Database (Qdrant) was selected for its high-performance, low-latency similarity search—the engine of our context retrieval.
  • The UX was designed as a narrative journey, using a cinematic GSAP transition to shift the user's mindset from browsing to focused learning.

The Code: Digital Alchemy in Action

Beyond Search: An AI That Understands Context

01. Beyond Search: An AI That Understands Context

The User Experience

Our solution was a bespoke Retrieval-Augmented Generation (RAG) system. The user experiences an AI that feels like an expert tutor, referencing specific textbook chapters and exam patterns instead of giving generic answers.

The Technical Implementation

Our system ingests the NCTB curriculum, converts text into semantic vectors using a Hugging Face Sentence Transformer, and indexes them in Qdrant. A query finds relevant context which is injected into a master prompt for an LLM, ensuring curriculum-grounded answers.

The Cinematic Portal to Learning

02. The Cinematic Portal to Learning

The User Experience

To elevate the initial interaction, we engineered a full-screen GSAP transition. This premium, cinematic entry builds anticipation and reinforces the brand's innovative identity.

The Technical Implementation

When the primary input is engaged, GSAP orchestrates a complex timeline: a black overlay fades in, "gate" divs part like doors, and a radial light bloom culminates in a white flash, perfectly masking the redirect to the dedicated chat page.

The Impact

The outcome is a polished, production-ready MVP that serves as a powerful proof-of-concept and a scalable foundation. The platform successfully solves the core challenge of providing curriculum-aware answers in a cost-effective, open-source-driven architecture.

"Code & Cortex didn't just build our app; they architected our vision. They possess a rare ability to translate a complex educational challenge into a product that is both technically brilliant and emotionally resonant."

Zayed Bin Hamid, Founder, QBrain AI