EduRAG is a curriculum-locked, multilingual AI tutoring system that answers student doubts strictly from NCERT textbooks (Grades 6–10). Unlike general-purpose LLMs, this system:
- Does NOT use internet knowledge
- Does NOT hallucinate
- Uses only NCERT textbooks
- Provides chapter-level citations
- Supports English, Hindi & Urdu
Built using an OPEA-based modular RAG architecture optimized for Intel CPUs.
- Students ask doubts in different languages
- General AI tools hallucinate answers
- No system provides textbook-verified citations
- Most solutions require GPU/cloud infrastructure
- Restricting knowledge to NCERT
- Enabling cross-lingual retrieval
- Running entirely on local CPU
- Providing explainable answers with citations
This project follows the Observe → Plan → Execute → Act loop:
- Detect language (EN / HI / UR)
- Normalize subject & grade
Apply metadata hard-filtering:
- Grade
- Subject
- Chapter
- Retrieve relevant chunks using FAISS
- Augment prompt with NCERT context
- Generate answer using Qwen2.5-0.5B-Instruct
- Provide chapter-level citations
- Store session history
- Collect student feedback
- FastAPI
- LangChain
- FAISS
- HuggingFace Transformers
- Qwen2.5-0.5B-Instruct
- Multilingual-E5-Small
- Helsinki-NLP Translation Models
- HTML5
- CSS3
- Vanilla JavaScript
| Subject Type | Query Language | Output |
|---|---|---|
| Hindi | Hindi | Hindi |
| Urdu | Urdu | Urdu |
| Science | EN / HI / UR | Same as query |
| Maths | EN / HI / UR | Same as query |
| Social Sci | EN / HI / UR | Same as query |
Cross-lingual semantic mapping is enabled using multilingual embeddings.
- ⏱ Latency: 2.5 – 4.5 seconds (CPU)
- 📚 40+ NCERT textbooks indexed
- 🎯 >85% grounded response accuracy
- 🔎 Top-k metadata-filtered retrieval
├── backend/
│ ├── main.py
│ ├── chat_memory.py
│ ├── feedback.py
│ └── feedback_store.json
│
├── rag/
│ └── rag_pipeline.py
│
├── vectorstore/
│ └── faiss_index/
│
├── frontend/
│ └── index.html
│
├── data/
│ └── ncert_pdfs/
│
└── README.md
- Install dependencies - pip install fastapi uvicorn torch transformers langchain faiss-cpu
- Start backend - uvicorn backend.main:app --reload
- Open frontend - Open frontend/index.html in browser.
If answer is not found in NCERT: "This question is outside the NCERT curriculum."
No external knowledge is ever used.
Focus Areas:
- Retrieval-Augmented Generation
- Multilingual NLP
- Educational AI
- Explainable AI
- CPU-Optimized Inference