All tutorials

How Random Quiz & Tag Allocation Works

Understand how per-student question randomization works — tag allocations, hierarchical picking, and how each student gets a unique quiz.

7 min read

Overview

BanglaTech supports per-student randomized quizzes. Instead of manually adding fixed questions to a quiz, you configure Tag Allocations — the system randomly picks questions from your Question Bank for each student. Every student gets a different set of questions!

Key Concepts

Question Bank

The Question Bank is a pool of questions stored at the group level. Each question can be tagged with one or more tags (topics). Tags can be organized in a parent-child hierarchy:

Parent Tag: বাংলা সাহিত্য
  ├── Child Tag: কবিতা
  │     ├── Sub-child: রবীন্দ্রনাথ
  │     └── Sub-child: নজরুল
  └── Child Tag: উপন্যাস
      

Tag Allocations

When creating a quiz, you set Tag Allocations — how many questions to randomly pick from each tag. For example:

  • বাংলা সাহিত্য → 5 questions means: pick 5 random questions from "বাংলা সাহিত্য" and ALL its descendants (কবিতা, রবীন্দ্রনাথ, নজরুল, উপন্যাস)

How the Random Selection Algorithm Works

Simple Case: Parent Tag Only

If you allocate 5 questions from Parent-tag1 with no child allocations:

  1. The system finds ALL descendant tags under Parent-tag1
  2. Fetches ALL bank questions tagged with Parent-tag1 or any of its descendants
  3. Combines them into one big pool
  4. Shuffles the pool randomly
  5. Picks the first 5
Example:
Parent-tag1 → 16 questions (directly tagged)
  ├── child_tag1 → 10 questions
  │     ├── child_tag2 → 4 questions
  │     └── child_tag3 → 6 questions
  └── child_tag2 → 6 questions

Total pool = up to 42 questions (all levels combined)
Allocation: Parent-tag1 → 5 questions

Result: 5 random questions picked from the entire pool of 42
        

Important: There is NO proportional distribution across child tags in this mode. All questions from the hierarchy are equally likely to be selected.

Advanced Case: Child Allocations (Proportional Control)

For more control, you can set child allocations within a parent. The system uses a depth-first, children-first strategy:

Example with child allocations:
Allocation:
  বাংলা সাহিত্য → 10 questions total
    ├── কবিতা → 4 questions
    └── উপন্যাস → 3 questions
        

Step 1: Pick 4 random questions from কবিতা's pool (including রবীন্দ্রনাথ, নজরুল)

Step 2: Pick 3 random questions from উপন্যাস's pool

Step 3: 10 - 4 - 3 = 3 remaining → pick 3 more from the entire বাংলা সাহিত্য pool (excluding already-picked questions)

This gives you precise control: guarantee a minimum number of questions from each subtopic, while the remaining slots are filled randomly from the broader pool.

Per-Student Sessions

How Each Student Gets Unique Questions

  1. When a student opens the quiz for the first time, the system generates a random selection and saves it to a session
  2. If the student reloads the page or comes back later, they get the same questions (session is preserved)
  3. A different student opening the quiz gets their own random selection
  4. On a retake (if allowed), a new session is created with a fresh random set

Option Shuffling

In addition to question randomization, the answer options are also shuffled per student. So even if two students get the same question, the options appear in a different order. The system stores a shuffle map in the session to correctly grade answers.

Setting Up a Random Quiz

Step 1: Build Your Question Bank

  1. Go to your group's Question Bank tab
  2. Add questions manually, or use Import from File (JSON/CSV) for bulk import
  3. Tag each question with appropriate topics (parent and child tags)
  4. You can import multiple JSON files at once for faster setup

Step 2: Create a Quiz with Tag Allocations

  1. Go to Quizzes tab → Create Quiz
  2. Choose quiz type (Topic Quiz or Model Test)
  3. In the Tag Allocations section, select tags and set question counts
  4. The total question count is the sum of all allocations
  5. Set time limit, scoring, and other options
  6. Publish the quiz

Step 3: Admin Preview

As an admin, you can preview the quiz to see a sample random selection. Each preview generates a fresh set — this is useful for verifying that your allocations produce a good mix of questions.

Unique Questions Per Attempt

When Allow multiple attempts is enabled, you can also turn on Unique questions per attempt. This ensures each retake gives the student questions they haven't seen before.

How It Works

  1. The system tracks which questions each student received in all previous attempts
  2. On retake, those questions are excluded from the pool before random selection
  3. Each student's exclusion is independent — Student A and Student B can get the same questions on their first attempt
Example (30 questions in bank, quiz picks 10):
Student A, Attempt 1: picks from full pool (30) → gets Q1-Q10
Student B, Attempt 1: picks from full pool (30) → can also get Q1-Q10
Student A, Attempt 2: excludes Q1-Q10 → picks from Q11-Q30
Student A, Attempt 3: excludes Q1-Q20 → picks from Q21-Q30
Student A, Attempt 4: all 30 seen → fallback kicks in, allows repeats
        

Automatic Fallback

If the question bank doesn't have enough unseen questions to fill the allocation, the system automatically falls back to previously seen questions to fill the remaining slots. No error occurs — students always get a complete quiz.

Enabling It

  1. Go to your quiz's Edit page
  2. Check "Allow multiple attempts"
  3. Check "Unique questions per attempt" (appears below)
  4. Save settings

Tip: For best results with this feature, keep your question bank at least 3x larger than your quiz allocation. For example, if your quiz picks 10 questions, have at least 30 in the bank so students get 3 fully unique attempts.

Tips & Best Practices

  • Keep your question bank large enough — if you allocate 10 questions from a tag that only has 12, students will see mostly the same questions. Aim for at least 3x more bank questions than your allocation.
  • Use child allocations for important topics — this guarantees coverage of critical subtopics rather than leaving it to chance.
  • Check for insufficient questions — if a tag doesn't have enough questions, the system picks as many as available (no error, just fewer questions).
  • Questions are never repeated — the system uses a global "picked" set, so the same question won't appear twice in one quiz, even if it has multiple tags.
  • Combine with multiple attempts — since each retake generates a new random set, students see different questions on retakes.