1. System Overview & Problem Statement
In the competitive landscape of Indian national entrance examinations—specifically the National Eligibility cum Entrance Test (NEET)—candidates face strict requirements regarding accuracy, speed, and cross-subject conceptual synthesis across Physics, Chemistry, and Biology. Traditional learning management systems (LMS) and static question banks fail to adapt dynamically to a candidate's individual conceptual gaps or provide step-by-step reasoning for complex multi-concept questions.
Gayatri Ai was engineered during the 60-day DBERT Intensive Fellowship Sprint to resolve these limitations by deploying a production-grade, stateful AI Agent. Rather than acting as a standard wrapper around Large Language Models (LLMs), Gayatri Ai functions as an autonomous domain tutor capable of reasoning over complex scientific curricula, executing dynamic retrieval-augmented generation (RAG) over verified syllabus materials, and enforcing deterministic latex/equation rendering for scientific query responses.
In enterprise and high-stakes educational deployment, standard LLM completions suffer from high hallucination rates, contextual drift over multi-turn conversations, and unacceptably high time-to-first-token (TTFT) metrics. Transitioning from prototype notebooks to production AI Agent architecture requires strict engineering constraints: asynchronous event loops, structured schema validation, dynamic context-window management, and automated fallback pathways for ambiguous user intents.
Key Production Resources & Metadata - Production Source Code: https://github.com/shanusrigowtham17-del/DBERT_NEET | https://github.com/Gayatri-Education/Gayatri-AI - Interactive Live Deployment: https://gayatri-ai.dbert.in - DBERT Verified Credential: https://dbert.in/verify/CERT-DBERT-2026-AIML-013 - Pre-Screening Rubric Score: 75/100 (High Merit)
2. Architectural Blueprint & Technical Stack Decisions
Gayatri Ai is architected as a decoupled, asynchronous microservices platform prioritizing deterministic state transitions, dynamic context routing, and low-latency response streaming.
+-----------------------------------------------------------------------------------+
| CLIENT LAYER |
| (Next.js React Web Client / LaTeX Renderer) |
+-----------------------------------------------------------------------------------+
│
Server-Sent Events
(Streaming Output)
│
▼
+-----------------------------------------------------------------------------------+
| API GATEWAY & STATE CONTROLLER |
| (FastAPI / Asyncio / Middleware CORS) |
+-----------------------------------------------------------------------------------+
│
▼
+-----------------------------------------------------------------------------------+
| CORE AGENTIC ORCHESTRATION ENGINE |
| +-----------------------+ +-----------------------+ +-------------------+ |
| | Query Router / Intent | -> | Multi-Turn State Graph| -> | Guardrails Engine | |
| | Classifier | | (LangGraph Engine) | | (Pydantic / Regex)| |
| +-----------------------+ +-----------------------+ +-------------------+ |
+-----------------------------------------------------------------------------------+
│ │ │
▼ ▼ ▼
+-------------------------+ +---------------------------+ +-----------------------+
| HYBRID RAG RETRIEVAL | | REDIS MEMORY BUFFER | | PYTHON CODE RUNTIME |
| (Qdrant Vector DB + | | (Short-term context state | | (Deterministic math |
| BM25 Keyword Search) | | & token window buffer) | | & formula executor) |
+-------------------------+ +---------------------------+ +-----------------------+
│ │ │
└─────────────────────────────┴─────────────────────────────┘
│
▼
+-----------------------------------------------------------------------------------+
| POSTGRESQL DATA PERSISTENCE |
| (User Analytics, Exam Progress, Audit Logs & Metrics) |
+-----------------------------------------------------------------------------------+Technical Stack Rationale
- API Gateway & Processing: Built on FastAPI utilizing Python's
asyncioengine. This non-blocking framework handles concurrent connection loads during peak usage windows while maintaining low streaming response overhead via Server-Sent Events (SSE). - Agentic Stateful Graph: Orchestrated via LangGraph / Custom State Graph, avoiding linear prompt-chaining in favor of stateful graph loops. This architecture allows the system to autonomously re-plan, retrieve additional domain context, or route to symbolic calculation engines if initial confidence thresholds are unmet.
- Hybrid Context Retrieval: Uses a hybrid search strategy pairing Qdrant Vector DB (dense embeddings generated via
text-embedding-3-small) with BM25 text indexing (combining dense semantic retrieval with sparse keyword scoring via Reciprocal Rank Fusion) to ensure high precision across both conceptual Physics/Chemistry explanations and exact NCERT terminology.
3. Production Readiness & Key Takeaways
- Stateful Agent Routing: Separating retrieval, verification, and symbolic calculation nodes within a graph architecture reduces hallucination rates on quantitative NEET problems.
- Hybrid Search Discipline: Pairing vector embeddings with lexical BM25 retrieval handles technical formulas, chemical equations, and exam identifiers reliably.
Interested in building production AI & Full Stack systems with 1:1 mentorship and verified credentials? Explore the [DBERT AI Fellowship](https://lms.dbert.in).