Case 08Question bank · RAG pipeline
Exams grounded in the faculty’s own rules.بنك الأسئلة الذكي
- Year
- 2026
- Status
- Rebuilt 2026 · Faculty of AI Engineering
- Discipline
- Question bank · RAG pipeline

Internal system · screens captured from a local run with sample records
- 3
- tiers + a RAG service
- CLO
- & Bloom on every question
- exam & answer-key export
01 — The problem
Writing exams by hand is slow, and generic AI questions drift from what a course is actually meant to assess. The faculty needed questions tied to its learning outcomes and regulations — and exams whose balance could be checked before they were printed.
An exam-management system for Syrian Private University: professors build a question bank, generate new questions through a retrieval-augmented pipeline grounded in the faculty’s regulations, and compose balanced exams by difficulty and lecture coverage.
02 — What I built
- 01
A three-tier ASP.NET Core application — presentation, business logic and data access — over Entity Framework Core and SQL Server.
- 02
A FastAPI RAG service that retrieves from official regulation documents and uploaded lecture files in ChromaDB, then generates questions aligned with course learning outcomes and Bloom’s taxonomy.
- 03
An auto exam composer that picks a question mix by difficulty, type and lecture, validates availability, and previews the paper before saving.
- 04
Exam intelligence reports: question mix, difficulty distribution, answer-key completeness and lecture coverage — plus PDF and Excel export.
- 05
Role-based access for professors, students and administrators, email-verified sign-up requests, and live SignalR notifications for administrators.
03 — Architecture
How the pieces fit.
- L1Presentation
- ASP.NET Core MVC
- Razor views
- SignalR hub
- L2Business logic
- Services & factories
- AutoMapper
- PDF & OCR: PdfPig, Tesseract, DinkToPdf
- L3Data access
- EF Core 8 · SQL Server
- Repositories
- Migrations
- L4RAG service
- FastAPI
- LangChain + ChromaDB
- OpenAI, regulation-grounded
Requests flow top to bottom · each layer depends only on the one beneath
04 — Decisions that matter
Decisions
Grounded, then generated
Retrieval runs over the faculty’s regulations and the professor’s own lectures before anything is generated, so questions stay inside the course’s scope.
Metadata on every question
Each generated question carries its learning outcome, Bloom level and source, so coverage can be measured rather than assumed.
Two runtimes, one contract
.NET owns users, exams and storage; Python owns retrieval and generation — they meet at a small HTTP API with its own key.
05 — Security & trust
- Cookie authentication with HTTPS-only, SameSite cookies.
- Email-verified sign-up requests approved by an administrator.
- Role-based authorisation for professors, students and admins.
- Anti-forgery tokens on every form.
06 — Stack
- C#
- ASP.NET Core 8
- EF Core
- SQL Server
- SignalR
- Python
- FastAPI
- LangChain
- ChromaDB
- OpenAI
- xUnit + Moq
07 — In the product




Next case · 09
e-Diwan
Every letter, approval and request — tracked end to end.