AS
ALOC Stationdeveloper docs
DOCS/DEVELOPER PORTAL
v1.0.0
folio 2.5 — assessment engine

Assessment Construction Engine

Shift from querying individual database rows to generating complete, psychometrically balanced examination papers in a single API call.

L1 Assessment Engine · 5 credits0 credits · Session ReconnectPOST /api/v1/assessments/generatePOST /api/v1/assessments/sessions

2.5.0Overview

Building a real exam or mock test requires more than picking random questions. Real examination bodies (JAMB, WAEC) curate papers with calibrated difficulty distributions, multi-topic syllabus balancing, and cheat-resistant distractor ordering.

The ALOC Assessment Construction Engine handles this entire psychometric assembly server-side. By default, every paper and session is assembled exclusively from authentic historical past questions (contentSource: "historical"). If you want to explicitly include AI-generated questions, pass contentSource: "synthetic" or contentSource: "all" in the request body.

2.5.1Official Examination Presets

Use standard presets to immediately generate official examination structures without manual question counting:

Preset CodeQuestion CountPsychometric Split (E / M / H)Target Exam Body
jamb_utme_180180 Questions (60 Eng + 40×3) · 20 cr30% Easy · 50% Med · 20% HardJAMB Full 4-Subject UTME
jamb_english_6060 Questions · 5 cr30% Easy · 50% Med · 20% HardJAMB Use of English
jamb_standard_4040 Questions · 5 cr30% Easy · 50% Med · 20% HardJAMB Single Elective
waec_standard_5050 Questions25% Easy · 55% Med · 20% HardWAEC / WASSCE
micro_test_1010 Questions30% Easy · 50% Med · 20% HardQuick Diagnostic

2.5.2Direct Paper Generation

# Generate standard assessment paper
curl -X POST https://dev.aloc.com.ng/api/v1/assessments/generate \
  -H "X-API-Key: aloc_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "subject": "mathematics",
    "examType": "jamb",
    "preset": "jamb_standard_40",
    "shuffleOptions": true,
    "seed": "lagos_state_mock_batch_1"
  }'
# Response (200 OK)
{
  "data": {
    "id": "7f8b91a2-58cc-4372-a567-0e02b2c3d479",
    "subject": "mathematics",
    "examType": "jamb",
    "preset": "jamb_standard_40",
    "seed": "lagos_state_mock_batch_1",
    "totalQuestions": 40,
    "difficultyBreakdown": {
      "easy": 12,
      "medium": 20,
      "hard": 8
    },
    "topicsCovered": [
      "algebra",
      "calculus",
      "trigonometry",
      "geometry"
    ],
    "questions": [
      {
        "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
        "text": "Evaluate log_2(32) + log_3(81)",
        "options": {
          "a": "8",
          "b": "9",
          "c": "10",
          "d": "12"
        },
        "correctAnswer": "b",
        "subject": "mathematics",
        "examType": "jamb",
        "year": 2019,
        "metadata": {
          "topic": "algebra",
          "subtopic": "indices-logarithms",
          "difficultyScore": 3,
          "estimatedTime": 90
        }
      }
    ]
  }
}

2.5.3Seed Reproducibility & Cohort Consistency

Passing a deterministic string to seed guarantees that every candidate or test-taker receives the exact same set of questions and difficulty calibration.

2.5.4Secure Live CBT & Candidate Sessions

For live test environments, computer-based testing (CBT) engines, and exam apps, you can provision scoped, time-bound session tokens. This ensures each student receives a dedicated, reproducible question set with an automatic 2-hour lifecycle:

Step 1: Create Candidate Session

Call POST /api/v1/assessments/sessions when the student starts an exam (consumes 5 credits). ALOC creates a dedicated assessment instance locked to your parameters with a 2-hour TTL.

# Request: Provision Candidate Session
curl -X POST https://dev.aloc.com.ng/api/v1/assessments/sessions \
  -H "X-API-Key: aloc_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "subject": "mathematics",
    "examType": "jamb",
    "preset": "jamb_standard_40",
    "seed": "student_candidate_98214"
  }'
# Response (201 Created)
{
  "data": {
    "sessionId": "sess_01j7b8q9x0e8d9a7c6f5e4d3c2",
    "totalQuestions": 40,
    "preset": "jamb_standard_40",
    "seed": "student_candidate_98214",
    "expiresAt": "2026-08-30T23:15:00+01:00"
  }
}

Step 2: Retrieve Session Questions

Fetch the questions allocated to that candidate's active sitting using their sessionId. Reconnecting or re-fetching within the active 2-hour session window consumes 0 credits.

# Request: Stream Questions via Session ID
curl https://dev.aloc.com.ng/api/v1/assessments/sessions/sess_01j7b8q9x0e8d9a7c6f5e4d3c2/questions \
  -H "X-API-Key: aloc_live_YOUR_KEY"
# Response (200 OK)
{
  "data": [
    {
      "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
      "subject": "mathematics",
      "examType": "jamb",
      "year": 2019,
      "questionNumber": 1,
      "text": "Evaluate log_2(32) + log_3(81)",
      "options": {
        "a": "8",
        "b": "9",
        "c": "10",
        "d": "12"
      },
      "correctAnswer": "b",
      "metadata": {
        "topic": "algebra",
        "subtopic": "indices-logarithms",
        "difficultyScore": 3,
        "estimatedTime": 90
      }
    }
  ]
}