TEACHING LOOP
Human-in-the-loop AI tutoring and automated skill evaluation platform. Solves unchecked LLM hallucinations by placing educators in direct control of curriculum ingestion, concept chunk verification, real-time prompt steering, and student dialogue analysis.
HOW TEACHING LOOP WAS BORN & EVOLVED
Freeing Up the Teacher's Bandwidth
Teaching Loop started with a single clean idea: give the teacher room for more things, while giving the student a dedicated, controlled learning environment.
Teachers are stretched thin across lectures, administrative duties, and grading. They simply don't have the hours to sit one-on-one with every student who needs extra guidance. At the same time, giving students a generic, unmonitored chatbot is risky—it hallucinates, wanders off curriculum, and leaves the teacher completely blind to what the student actually understood.
Putting the Teacher in Direct Control
Instead of replacing the educator, I designed the system so that the AI sits right in between the teacher and the student:
1. Live Interruption: The teacher can monitor the student's conversation with the AI in real time. If the student gets stuck or veers into a misconception, the teacher can actively interrupt the conversation at any second.
2. Directing the AI Live: The teacher can feed new instructions to the AI while the student is having the conversation—telling the AI where to push harder, when to give a hint, or how to simplify an analogy for that specific student.
3. Clear Deficit Reports: The teacher receives an automated summary showing how the student is doing and where they are lacking, making it immediately clear who needs more of the teacher's personal time.
Evolving Step by Step into a Reliable Platform
Teaching Loop started as a humble prototype to see if this three-way interaction loop could genuinely solve classroom bottlenecks.
As I tested and built, it kept evolving into a more controlled and useful agentic platform: adding a verification gate so educators can approve syllabus chunks before they enter ChromaDB vector storage, integrating structured quizzes, and pairing FastAPI with PostgreSQL and MongoDB to keep learning records reliable. It grew from a quick MVP into a practical, teacher-first instrument.
WHO IT'S BUILT FOR
01 // EDUCATORS & PROFESSORS
Instructors who need complete oversight of classroom AI interactions, granular chunk-approval tools, and auto-generated analytical reports on student knowledge deficits.
02 // AUTODIDACTS & STUDENTS
Learners wanting guided Socratic questioning tailored to a verified syllabus, adaptive dynamic quizzes (easy, mid, hard), and zero conversational hallucinations.
03 // ACADEMIC INSTITUTIONS
Schools and coaching academies requiring structured multi-tenant organization models, role-based access control (RBAC), and persistent dialogue audit trails.
5-STAGE PEDAGOGICAL VERIFICATION FLOW
Curriculum Ingestion
Upload raw course PDFs or Markdown notes. PyPDF2 extracts text payloads and dispatches them to semantic extraction routines.
Semantic Decomposition
Gemini Flash decomposes raw textbooks into modular pedagogical concept chunks, extracting title, core concept, and prerequisite tags.
Educator Sign-Off
Human-in-the-loop review dashboard. Educators inspect, modify, or approve concept chunks before committing to the vector database.
ChromaDB MMR Retrieval
Active tutoring dialogue queries verified chunks using Maximal Marginal Relevance (MMR), grounding Socratic responses without hallucinations.
Automated Gap Analysis
Synthesizes full multi-turn MongoDB dialogue trees into structured evaluation reports grading conceptual depth and highlighting remedial areas.
LOCAL DEPLOYMENT & RUNTIME
# 1. Clone the repository
git clone https://github.com/asimibnakhlaque/teaching-loop.git
cd teaching-loop
# 2. Configure environment variables
cat <<EOF > .env
DATABASE_URL=sqlite:///./teaching_loop.db
MONGODB_URL=mongodb://localhost:27017/teaching_loop
GEMINI_API_KEY=your_gemini_api_key_here
JWT_SECRET_KEY=your_secure_jwt_secret
EOF
# 3. Launch the FastAPI asynchronous backend service (Port 8000)
uvicorn backend.main:app --host 0.0.0.0 --port 8000 --reload
# 4. Launch the Streamlit multi-page interface in a separate shell
streamlit run frontend/app.py --server.port 8501
CURRENT STAGE & THE HARD PART
Working Dual-Persistence Local Platform
Teaching Loop runs locally as a complete end-to-end tutoring system. The FastAPI backend handles curriculum ingestion, semantic chunk verification, and MMR vector search in ChromaDB, backed by PostgreSQL for relational models and MongoDB for multi-turn dialogue histories.
Educators can verify concept chunks, trigger automated student deficit evaluations, and review dialogue transcripts through dedicated multi-page Streamlit consoles.
Classroom Validation & Live Educator Steering
The core technical challenge is not just software—it is real-world educator workflow validation. Putting AI directly between teachers and students requires testing whether live prompt steering and real-time interruption feel natural to teachers in actual classroom settings.
I am actively working to get real teachers into the loop to test the live-interruption mechanics, refine the dashboard ergonomics, and verify that automated deficit summaries truly capture student learning gaps without overwhelming the teacher's time.