NISAAB Docs
NISAAB Docs

The SLO-grounded
AI tutor for FBISE

NISAAB answers only from the Federal Board's own syllabus, names the learning outcome behind every answer, and turns the whole FSc course into practice, papers, marking and a predicted grade — in English, Urdu and Roman Urdu.

0Official FBISE SLOs
0Subjects, Class XI
0Database tables
0Languages
Overview

What NISAAB is

NISAAB (نصاب, Urdu for syllabus) is a full study, assessment and classroom platform for students of the Federal Board of Intermediate and Secondary Education (FBISE) sitting the HSSC / FSc exams in Grades 11 and 12. The tutor answers only from FBISE's published Assessment Frameworks and names the learning outcome it came from, so a teacher can check every answer against the official document.

Unlike generic AI that pastes a rough syllabus into a prompt, NISAAB stores the official National Curriculum (NCP 2022-23) and Assessment Framework (ISS-2024) in PostgreSQL as structured rows. Every SLO code, cognitive level, domain and teaching-period count is real relational data, and tutoring, quizzes, papers, marking, study plans and mastery all anchor to those rows.

◎

Grounded answers

Retrieval-augmented: the tutor fetches the exact outcome first, then answers inside it and cites the code.

✎

Real board papers

Full FBISE 2026-pattern papers with the 30/50/20 cognitive split and internal choice.

◱

Written marking

Point-by-point rubric marking and an IBCC predicted grade from your own practice.

⚑

Trilingual

Explains in English, Urdu or Roman Urdu, while formulas stay in English for the exam.

Who it is for

FSc students in all three groups — Pre-Medical (Physics, Chemistry, Biology), Pre-Engineering (Physics, Chemistry, Mathematics) and ICS (Physics, Mathematics, Computer Science) — plus teachers who review content and administrators who run live classes.

Coverage

SubjectDomainsOutcomes loadedExamined
Physics XI7193150
Chemistry XI7329217
Biology XI9246161
Mathematics XI37961
Computer Science XI82222
Class XI total34869611
Physics XII7151—
All loaded1,020

More than 4,000 practice items are pre-generated — for each examined outcome an explanation, five MCQs and one short question — plus a bank of numericals for the 191 calculation outcomes.

The problem

Why FBISE students need this

Since NCP 2022-23, FBISE sets papers from Student Learning Outcomes instead of one textbook, and from August 2026 the pattern is 50% MCQ and 50% descriptive. Students have little targeted help, and general AI does not know what the Federal Board examines.

  • Out-of-syllabus answers. Generic AI pulls from CBSE/JEE, A-Levels or university material the board never examines.
  • Textbooks don't map to SLOs. No tool links each SLO code to explanations, practice and measurable mastery.
  • Fake "board papers". Generators ignore FBISE's 30/50/20 cognitive weighting and Section A/B/C structure.
  • No written marking or IBCC grading. MCQs alone can't prepare students for the descriptive sections.
  • Language barriers. Most platforms handle Urdu and Roman Urdu poorly.
  • Costly, scattered tuition. Academies are expensive and progress is spread across WhatsApp, YouTube and guides.
  • Unsafe study groups & buggy quizzes. Fake teachers, phishing links, shared phone numbers, and AI keys that contradict their own explanation.
Features

What students get

▦

Syllabus map

The official syllabus by domain, each outcome with its code, level and a mastery colour.

✦

AI tutor

Ask in any of the three languages. It cites the SLO, draws figures, and can check the FBISE website.

▤

Practice cards

Quizzes, flashcards and zoomable mind maps, right inside the chat.

⏱

Exam papers

Mini, Standard, Half and Full-Board papers with a timer and auto-submit.

✓

Written marking

Point-by-point against a mark scheme, with a model answer, labelled AI-estimated.

◴

Progress

Mastery by domain, a trend graph and an IBCC predicted grade with a confidence label.

◷

Study plans

Multi-day schedules in Topic mode or Weak mode, with a read → quiz → paper ladder.

⤓

Downloads & sharing

Export quizzes, papers, notes and mind maps as PDF/DOCX, or share a read-only link.

⤴

Your own notes

Upload PDFs or DOCX; the tutor searches them first and keeps them private to you.

◉

Live sessions

Weekly classes by subject in Pakistan time, with anti-phishing link checks.

❏

Cohort rooms

Moderated group rooms with polls, media and automatic blocking of personal details.

✚

Teacher review

Approved teachers approve or reject bank items; approved ones get a "Teacher-checked" badge.

Architecture

How the system is built

A monorepo with a Python uv workspace and one TypeScript app, deployed as a web app, an API and a background worker plus scheduled jobs, all on Google Cloud in asia-south1 (Mumbai) for low latency to Pakistan.

edu-webReact 19 · Vite 7 · Firebase Hosting CDN
edu-apiFastAPI · Python 3.12 · 27 routers · SSE · scale 0→N
Cloud SQLPostgreSQL 16 + pgvector · 36 tables · jobs queue
Vertex AIGemini tutor / gen / mark / OCR · embeddings
Cloud StorageUploads, extracted text, figures
edu-workerBackground jobs · private · woken by Cloud Scheduler

Request flow

  • The browser sends an HTTPS request with a Firebase ID token; edu-api verifies it against Google's keys.
  • edu-api reads/writes PostgreSQL over a private socket.
  • A chat message runs the agent, which calls Vertex AI and streams the reply over Server-Sent Events.
  • Long work (a board paper, indexing, generation) becomes a row in the jobs table; the worker claims it and the UI polls until ready.
The AI layer

Grounding, agents and tools

Built on LangChain and LangGraph. Models are reached through Vertex AI's OpenAI-compatible endpoint with an auto-refreshed service-account token. Four model roles are configured separately so a change for one purpose doesn't disturb the others.

RoleUsed for
TutorThe conversational agent
GenerationQuizzes, flashcards, notes, mind maps, explainers, stimulus sets
MarkingGrading written answers against a mark scheme
OCRReading text from images and scanned documents

Two kinds of retrieval

For the syllabus, a small fixed set, NISAAB scores outcomes by term rarity — a distinctive word like "projectile" counts far more than "effect":

# term-rarity scoring over the subject's outcomes
weight(word) = log((N + 1) / (docs_with(word) + 1)) + 1
score(slo)   = Σ weight(word) × matches(word, slo)

For a student's uploaded notes, meaning matters more than exact words, so text is embedded as 3072-dimension vectors in pgvector and matched by cosine similarity, scoped to that student's own project.

The agent loop

An agent built with LangGraph loops: it may call several of its 11 tools, in an order it chooses, before answering. Practice tools end the turn directly so the UI shows an interactive card instead of the model re-typing the questions.

Student: "projectile ki range kaise nikalte hain?"
 → find_syllabus_slos('projectile range')
 → returns SLO P-11-B-05, Mechanics, level U/A
 → answers in Roman Urdu, cites 'SLO P-11-B-05'

Student: "is par 5 numericals do"
 → practice_quiz(slo_codes=['P-11-B-05'], count=5)
 → pulls 5 from the bank (no model call) → quiz card
Guardrails. Syllabus content never comes from the web, outcome codes may not be invented, and MCQ keys are checked against their own explanation before a student sees them. The test suite fails if an ordinary Physics question triggers a web search.
Data model

One PostgreSQL database

Relational data, vectors and the job queue all live in one PostgreSQL + pgvector database, using SQLAlchemy 2.x and 51 Alembic migrations across 36 tables.

GroupTables
Identityusers, student_profiles, teacher_profiles
Workspaces & RAGprojects, documents, document_segments (Vector 3072)
Curriculumsubjects, grade_subjects, curriculum_domains, slos
Study assetsquizzes, quiz_questions, flashcards, notes, mind_maps, study_plans…
Practice & bankpractice_records, srq_questions, srq_attempts, practice_papers, content_items
Communitycommunity_posts, polls, reports, class_sessions
Operationsshares, jobs, user_usage
  • Dates as state. Bans, teacher approval and archived workspaces use timestamps, not boolean flags, to avoid stale-flag bugs.
  • Cascade deletion. Deleting an account removes its documents and segments with it.
  • Provenance. Every bank item carries its review status, reviewer and source.
Papers & marking

The assessment engine

Board paper blueprint

SectionContentMarks
A56 MCQs + 6 stimulus sets of 440
B7 short questions (4 marks), internal choice28
C2 extended questions (6 marks), internal choice12
TotalMathematics uses its own blueprint, out of 10080

The pattern is pure-Python data, so an FBISE change is a data edit, not a rewrite. The engine hits an exact 30% Knowledge / 50% Understanding / 20% Application split with largest-remainder allocation, interleaves levels so a paper doesn't clump recall at the start, and rotates domains without repeating outcomes.

Mastery

Mastery per outcome is an exponentially weighted accuracy, computed by one advance() function used by both the dashboard and the trend graph, so the numbers always agree.

weight   = min(1, max(1/attempts, 0.3) × factor)
mastery += weight × (score − mastery)
# factor 1.0 for marked work, 0.5 for self-rated flashcards

IBCC predicted grade

BandA++A+AB++B+BC+CDU
Score≥96≥91≥86≥81≥76≥71≥61≥51≥40<40
Curriculum pipeline

From a PDF framework to live data

Seven stages, repeated for every subject.

1Get the official framework
2Extract text
3Parse outcomes
4Check vs newest docs
5Load into database
6Pre-generate practice
7End-to-end tests

Stage 3 uses three parsers: rule-based (Physics, Biology, Mathematics), AI-assisted (Chemistry, whose table lists codes before descriptions) and nested-list (Computer Science). The AI-assisted parser must return exactly the codes a regex found, and every returned word is checked against the source, so wording is never invented.

What verification found. Chemistry had been revised — one outcome added and thirteen moved to practical only. The seed is idempotent, so a revised framework reloads safely.
Security & safety

Built for 16–18 year-olds

  • Auth on every route. Every endpoint except health and public read-only shares verifies a Firebase ID token and scopes queries to the user.
  • Hidden admin. Admin rights come only from an env setting; unauthorised admin calls return 404, not 403.
  • Private database. No public address; reached over a private socket. Secrets live in Secret Manager, never the repo.
  • Anti-phishing links. Live-session links must be HTTPS on verified hosts; credential-masking URLs are rejected.
  • Community guards. Phone numbers and emails are blocked automatically, backed by AI moderation and reports.
  • Your data is yours. Uploads never enter the shared bank; deleting your account deletes your documents.
Infrastructure

Deployment & cost

One idempotent shell script runs the whole deployment and also works from Windows Git Bash.

deploy/gcp/deploy.sh  setup | deploy | web | migrate | seed | content | e2e | script

The worker scales to zero and is woken every minute by Cloud Scheduler to drain the queue; an always-on mode exists for demo days. As of October 2026 the project ran on Google Cloud free-trial credit (ending December 2026), with Cloud SQL about $10/month and the worker about $1.60/day when kept always-on.

Testing

Three ways, verified separately

52

End-to-end checks

Run against the live deployment, Cloud SQL and Vertex AI after every deploy. All 52 pass.

23

Offline checkers

Domain-rule scripts for mastery, blueprint, grading and more — no database or key needed.

9

Frontend tests

Vitest suites for maths rendering, DOCX export and route guards.

ActionTime
Numerical quiz from the bank~4 s (was 202 s)
Tutor reply to a follow-up~11 s
Written answer marked6–8 s
Chapter mind mapInstant
Half examination paper~90 s
Comparison

Why not just a general tool?

CapabilityNISAABNotebookLMChatGPT / GeminiPast-paper apps
Official FBISE SLO databaseYes (1,020)NoNoStatic PDFs
30/50/20 board paper engineYesNoNo (drifts)Old papers only
Rubric marking + IBCCYesNoAd hocAnswer keys only
Per-SLO masteryYesNoNoNo
English + Urdu + Roman UrduNativeLimitedUnconstrainedMostly English
Verified teachers & cohort roomsYesNoNoNo
Status & roadmap

Where it stands

Live and complete: FSc Part 1 across all five subjects (869 SLOs) and Part 2 Physics (151 SLOs).

Next stepWhy it matters
Teacher review of the bankTurns 611 outcomes of draft material into trusted material. The most valuable next step.
Complete Class XIIChemistry, Biology, Maths and CS XII remain; same method.
Calibrated markingCompare AI marks against real FBISE examiner scripts.
Compulsory subjectsEnglish, Urdu, Islamiat, Pakistan Studies.
Closed beta50–100 students across two or three colleges before a wider launch.
Known limits. The AI can still be wrong inside the syllabus; the bank is not fully teacher-reviewed; Class XII is incomplete; marking is not yet calibrated; there is no offline mode.
Credits

Team & licence

MemberRole
Muhammad Saad CheemaCore engineering, cloud architecture, FBISE domain adaptation, deployment
Fatin Khan JadoonUI/UX design
Ayan SadiqDocumentation, project team and research
Ayan AsimDocumentation, project team and research

Supervisor: Prof. Mr. Tashfeen Qamar · Islamabad Model College for Boys (IMCB) G-10/4, Islamabad · FDE STEM Competition, Group C, 29 October 2026. Built on EduAgent (Student Trainee Center), MIT License.

NISAAB — independent student project, aligned with the FBISE National Curriculum 2022-23. Not an official FBISE product. Written-answer marks are AI-estimated pending examiner calibration.