AI-Powered Automatic Test Generation System

We design and deploy artificial intelligence systems: from prototype to production-ready solutions. Our team combines expertise in machine learning, data engineering and MLOps to make AI work not in the lab, but in real business.
Showing 1 of 1All 1566 services
AI-Powered Automatic Test Generation System
Medium
~1-2 weeks
Frequently Asked Questions

AI Development Areas

AI Solution Development Stages

Latest works

  • image_website-b2b-advance_0.webp
    B2B ADVANCE company website development
    1320
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1226
  • image_websites_belfingroup_462_0.webp
    Website development for BELFINGROUP
    927
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1161
  • image_logo-advance_0.webp
    B2B Advance company logo design
    622
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    897

AI-Powered Automatic Test Generation System

Instructors spend up to 40% of their time creating tests, while students easily find ready-made answers. Manually composing a 30-question exam takes 4–6 hours—and that's just one variant. Developing an AI system for automatic test generation pays off within months: instructor time savings of up to 70%, and test cost reduced to 10–20% of manual labor. Typical project cost ranges from $5,000 to $15,000, with annual savings of $20,000 or more from reduced instructor workload. We offer a solution: a system that generates unique exam tasks based on your material, considering difficulty levels and Bloom's taxonomy. Each student gets their own variant, and grading of open-ended answers is automated. The system integrates with Moodle, iSpring, and supports custom export formats. Get a consultation on your project—we will evaluate automation opportunities in one day.

Why Traditional Tests No Longer Work

Manual question creation consumes hours, and question banks quickly become outdated. Students share answers, and instructors spend time grading. AI generation solves both problems: it creates an infinite number of variants and evaluates open-ended answers in seconds. According to a McKinsey study, automating routine tasks frees up to 30% of instructor time.

How AI Generates Questions by Bloom's Taxonomy

We use GPT-4o with prompts tailored to each level of Bloom's taxonomy: from recalling facts to creating new products. The code below shows the implementation.

from openai import AsyncOpenAI
from enum import Enum
import json

client = AsyncOpenAI()

class BloomLevel(Enum):
    REMEMBER = "remember"
    UNDERSTAND = "understand"
    APPLY = "apply"
    ANALYZE = "analyze"
    EVALUATE = "evaluate"
    CREATE = "create"

BLOOM_PROMPTS = {
    BloomLevel.REMEMBER: "Create a question on recalling facts, dates, definitions",
    BloomLevel.UNDERSTAND: "Create a question on understanding: explanation, paraphrasing, examples",
    BloomLevel.APPLY: "Create a practical task: applying knowledge in a new situation",
    BloomLevel.ANALYZE: "Create a question on analysis: comparison, identifying causes, structuring",
    BloomLevel.EVALUATE: "Create a question on evaluation: justifying a judgment, critiquing an approach",
    BloomLevel.CREATE: "Create a task on synthesis: developing a solution, creating a product",
}

async def generate_question(
    topic: str,
    source_text: str,
    question_type: str,
    bloom_level: BloomLevel = BloomLevel.UNDERSTAND,
    difficulty: str = "medium"
) -> dict:
    response = await client.chat.completions.create(
        model="gpt-4o",
        messages=[{
            "role": "system",
            "content": f"""Create a test question.
            Type: {question_type}.
            Bloom's taxonomy level: {bloom_level.value}. {BLOOM_PROMPTS[bloom_level]}.
            Difficulty: {difficulty}.

            For multiple_choice: 4 options, 1 correct, 3 plausible distractors.
            For open_answer: model answer + scoring rubric.
            For case_study: scenario + 3-5 questions at different levels.

            Return JSON: {{
                question: "question text",
                type: "{question_type}",
                bloom_level: "{bloom_level.value}",
                options: ["A...", "B...", ...],
                correct_answer: "...",
                explanation: "why this answer",
                scoring_rubric: {{...}}
            }}"""
        }, {
            "role": "user",
            "content": f"Topic: {topic}\n\nMaterial:\n{source_text[:2000]}"
        }],
        response_format={"type": "json_object"}
    )
    return json.loads(response.choices[0].message.content)

Generating a Complete Exam Variant

We assemble a test from questions with a specified distribution across levels. For example, 30% understanding, 30% application, 20% analysis, and 20% recall.

async def generate_exam_variant(
    course_topics: list[str],
    total_questions: int = 30,
    time_limit_min: int = 60,
    bloom_distribution: dict = None
) -> dict:
    if not bloom_distribution:
        bloom_distribution = {
            BloomLevel.REMEMBER: 0.2,
            BloomLevel.UNDERSTAND: 0.3,
            BloomLevel.APPLY: 0.3,
            BloomLevel.ANALYZE: 0.2
        }

    questions_by_level = {
        level: int(total_questions * fraction)
        for level, fraction in bloom_distribution.items()
    }

    all_questions = []
    tasks = []

    for level, count in questions_by_level.items():
        for i in range(count):
            topic = course_topics[i % len(course_topics)]
            q_type = "multiple_choice" if level in [BloomLevel.REMEMBER, BloomLevel.UNDERSTAND] else "open_answer"
            tasks.append(generate_question(
                topic=topic,
                source_text="",
                question_type=q_type,
                bloom_level=level
            ))

    all_questions = await asyncio.gather(*tasks)

    return {
        "variant_id": f"V{random.randint(1000, 9999)}",
        "time_limit_min": time_limit_min,
        "total_points": sum(q.get("points", 1) for q in all_questions),
        "questions": list(all_questions),
        "bloom_distribution": {l.value: c for l, c in questions_by_level.items()}
    }
Taxonomy Level Default Question Type Share in Exam
Remember multiple_choice 20%
Understand multiple_choice 30%
Apply open_answer 30%
Analyze open_answer 20%

Comparison: AI vs. Manual Method

AI generation is 10x faster: 30 questions in 2 minutes instead of 4–6 hours. Test generation cost is 5–10x lower, and the number of unique variants reaches up to 30 per question. AI-powered grading is 100x faster than manual grading.

Parameter Manual Method AI System
Time for 30 questions 4–6 hours 2–3 minutes
Number of variants 1–2 (with copies) up to 30 unique
Grading open-ended answers manual, hours automatic, seconds
Cost per test high (labor cost) low (API only)

How to Ensure Variant Uniqueness?

Each question is not a copy. The system generates up to 30 unique versions by varying numbers, names, context, and answer order. Difficulty remains consistent, verified across dozens of projects.

async def generate_unique_variants(
    base_question: str,
    n_variants: int = 30,
    maintain_difficulty: bool = True
) -> list[dict]:
    response = await client.chat.completions.create(
        model="gpt-4o",
        messages=[{
            "role": "system",
            "content": f"""Create {n_variants} unique versions of the question.
            Vary: numbers, names, context, order of answer options.
            Difficulty {'must remain the same' if maintain_difficulty else 'may vary'}.
            Return a JSON array."""
        }, {
            "role": "user",
            "content": f"Original question: {base_question}"
        }],
        response_format={"type": "json_object"}
    )
    return json.loads(response.choices[0].message.content)["variants"]

Automatic Grading of Open-Ended Answers

For open-ended questions, an AI grader compares the student's answer against the rubric and model answer, assigning points with comments.

async def auto_grade_open_answer(
    question: str,
    correct_answer: str,
    rubric: dict,
    student_answer: str
) -> dict:
    response = await client.chat.completions.create(
        model="gpt-4o",
        messages=[{
            "role": "system",
            "content": f"""Grade the student's answer according to the rubric.
            Question: {question}
            Model answer: {correct_answer}
            Scoring criteria: {json.dumps(rubric, ensure_ascii=False)}

            Evaluate the answer and return JSON:
            {{score: 0-100, feedback: "detailed feedback", strengths: [], weaknesses: []}}"""
        }, {
            "role": "user",
            "content": f"Student answer: {student_answer}"
        }],
        response_format={"type": "json_object"}
    )
    return json.loads(response.choices[0].message.content)

Ensemble-Based Evaluation

For reliable grading of disputed answers, we use an ensemble of three different AI models. If two models give the same score, it is final. In case of disagreement, a third model is consulted, and the answer is flagged for manual review. This reduces the error rate to less than 1% per test.

Why is distribution across taxonomy levels important?Distributing questions across Bloom's levels ensures that the test assesses not only recall but also understanding, analysis, and synthesis. This improves the quality of student evaluation and aligns with modern educational standards.

What Is Included in the Work

  • Designing the generation architecture for your content
  • Developing prompts for all Bloom's taxonomy levels
  • Integration with LMS (Moodle, iSpring, custom API)
  • Generation of up to 30 unique variants per question
  • Automatic grading module for open-ended answers with rubrics
  • Documentation
  • Instructor training
  • 2 months of support
  • Access rights to the system

Process of Work

  1. Analysis — we study your educational material and test requirements
  2. Design — determine question types, distribution across levels, export format
  3. Implementation — write generation code, integrate with your LMS
  4. Testing — validate on real students, adjust prompts
  5. Deployment — launch into production, hand over documentation

Indicative Timelines

  • Test generator from ready textual material: 1–2 weeks
  • Full platform with auto-grading, analytics, and LMS integration: 2–3 months

The cost is calculated individually based on your data volume and required integrations. Budget savings on training amount to 30–50% of manual testing costs. Investment in automation pays back within 2 months. Evaluate your project in one day — order an individual demo to discuss details.

With over 5 years of experience in AI/ML and 20+ content generation projects, we guarantee stable operation and timely delivery. Get a consultation on your project — we will evaluate automation opportunities in one day.