Skip to content
Amer Khorsheed
All work

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
Qbanker exam management with saved exams and question mix

Internal system · screens captured from a local run with sample records

3
tiers + a RAG service
CLO
& Bloom on every question
PDF
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

  1. 01

    A three-tier ASP.NET Core application — presentation, business logic and data access — over Entity Framework Core and SQL Server.

  2. 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.

  3. 03

    An auto exam composer that picks a question mix by difficulty, type and lecture, validates availability, and previews the paper before saving.

  4. 04

    Exam intelligence reports: question mix, difficulty distribution, answer-key completeness and lecture coverage — plus PDF and Excel export.

  5. 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.

  1. L1Presentation
    • ASP.NET Core MVC
    • Razor views
    • SignalR hub
  2. L2Business logic
    • Services & factories
    • AutoMapper
    • PDF & OCR: PdfPig, Tesseract, DinkToPdf
  3. L3Data access
    • EF Core 8 · SQL Server
    • Repositories
    • Migrations
  4. 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

D01

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.

D02

Metadata on every question

Each generated question carries its learning outcome, Bloom level and source, so coverage can be measured rather than assumed.

D03

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

Qbanker AI question generation workflow
Generate questions — course, blueprint, review.
Qbanker exam intelligence report
An exam’s intelligence report: mix, difficulty, coverage.
Qbanker auto exam composer
The auto exam composer.
Qbanker question bank list
The question bank, filterable by type, level, course and lecture.

Next case · 09

e-Diwan

Every letter, approval and request — tracked end to end.