How mitali-gautam05/biki-adaptive-tutor works
BIKI Tutor combines a source-grounded Class 9 Physics chat tutor (Level 1) with an adaptive answer evaluator (Level 2). Students select a session and mode, ask a question, and receive an answer with evidence and diagnostics; separately, they submit an answer for evaluation, append-only evidence, and a derived learning state with mastery, misconception history, and recommendations. The graph follows documented workflows and sampled module references; several backend routes and implementations are unsampled, so their internal links rely on README architecture statements.
Main entry points: App.tsx Tutor workspace · chat.py Chat orchestration · engine.py State assembly · service.py Evaluation service
Components 24
Student interface
- Tutor workspace
frontend/src/App.tsx - Conversation
frontend/src/components/Chat.tsx - Student sessions
frontend/src/components/Sidebar.tsx - Evidence diagnostics
frontend/src/components/Diagnostics.tsx - Learning panel
frontend/src/components/L2Panel.tsx - API client
frontend/src/api.ts
Grounded tutoring
- FastAPI routes
backend/app/main.py - Chat orchestration
backend/app/chat.py - Tutor prompts
backend/app/prompts.py - Mode-filtered retrieval
backend/app/retrieval.py
Adaptive learning
- Learning routes
backend/app/l2/router.py - Evaluation service
backend/app/l2/service.py - Answer evaluator
backend/app/l2/evaluate.py - Evidence store
backend/app/l2/store.py - State assembly
backend/app/l2/engine.py - Mastery estimates
backend/app/l2/mastery.py - Misconception replay
backend/app/l2/misconceptions.py - Next-step recommendations
backend/app/l2/recommend.py - Concept taxonomy
backend/app/l2/taxonomy.py
Data and providers
- Gemini integration
backend/app/gemini.py - Chat persistence
backend/app/store.py - PostgreSQL pgvector
backend/app/db.py
Other components
- Student
- Gemini model service
Connections 29
- Student → Tutor workspace: uses
README.md - Tutor workspace → Conversation: renders
frontend/src/App.tsx - Tutor workspace → Student sessions: renders
frontend/src/App.tsx - Tutor workspace → Evidence diagnostics: renders
frontend/src/App.tsx - Tutor workspace → Learning panel: renders
frontend/src/App.tsx - Tutor workspace → API client: calls
frontend/src/App.tsx - Conversation → API client: submits via
frontend/src/App.tsx - Learning panel → API client: requests via
frontend/src/components/L2Panel.tsx - API client → FastAPI routes: HTTP requests
README.md - FastAPI routes → Chat orchestration: dispatches chat
README.md - Chat orchestration → Mode-filtered retrieval: retrieves chunks
README.md - Chat orchestration → Tutor prompts: builds prompts
- Mode-filtered retrieval → Gemini integration: embeds query
backend/app/retrieval.py - Chat orchestration → Gemini integration: generates answer
README.md - Gemini integration → Gemini model service: requests model
- Mode-filtered retrieval → PostgreSQL pgvector: searches chunks
backend/app/retrieval.py - Chat orchestration → Chat persistence: saves messages
README.md - Chat persistence → PostgreSQL pgvector: persists sessions
- FastAPI routes → Learning routes: dispatches L2
README.md - Learning routes → Evaluation service: delegates requests
- Evaluation service → Answer evaluator: evaluates answer
backend/app/l2/service.py - Answer evaluator → Gemini integration: judges answer
README.md - Evaluation service → Evidence store: appends evidence
backend/app/l2/service.py - Evidence store → PostgreSQL pgvector: stores evidence
- Evaluation service → State assembly: derives state
backend/app/l2/service.py - State assembly → Mastery estimates: estimates mastery
backend/app/l2/engine.py - State assembly → Misconception replay: replays events
backend/app/l2/engine.py - State assembly → Next-step recommendations: derives recommendations
backend/app/l2/engine.py - State assembly → Concept taxonomy: uses catalog
backend/app/l2/engine.py