Design a service for collaboratively creating and reviewing tests with a question bank, adaptive difficulty, and leak protection.
Asked at
AI answer
Architecture and data
The service can start as a modular application with PostgreSQL, object storage for attachments, and a background task queue. Core entities: Question, QuestionVersion, Tag, Review, Test, TestVersion, Attempt, Answer, Exposure. Question versions are immutable after publication; edits create a new version. Roles determine who can create, review, publish, and take tests.
Collaboration and quality
The editor saves drafts with a version number and optimistic locking checks. In case of conflicting changes, it shows the differences and requires them to be merged instead of silently overwriting data. Publication goes through review for answer correctness, unambiguous wording, tag relevance, and accessibility. Support history, comments, and rollback.
Test administration
When an attempt starts, record the test version and the selected question versions so that the result remains reproducible. Save answers and the final result transactionally; resubmitting a request must be idempotent. Adaptive difficulty can be selected based on estimates of user ability and question difficulty, updating the estimate after each answer. Start with a simple rule based on success-rate ranges, then apply IRT when data is available; monitor topic coverage and avoid sudden jumps in difficulty.
Leak prevention
Separate permissions for the question bank and exams; hide answer keys and explanations until the permitted time. Limit how often questions are presented again, randomly select equivalent questions and answer choices, and record exposure and unusual activity. Do not send the entire exam bank to the client in advance; the server checks answers and deadlines. This reduces the risk of leaks but cannot completely prevent people from photographing or sharing questions. Protect data with encryption, access auditing, backups, and recovery tests.
Also asked at IBS
- Suppose a virtual machine has no CPU load and no RAM pressure, but its load average is huge and the server is really lagging. Where would you look, and what might be the problem?
- How do you perform a forensic analysis of a compromised container that was deleted but whose Linux audit logs were retained?
- How do you use SELinux or AppArmor for container profiles in a production environment to restrict access to the host file system?
- What is the difference between bridging, masquerading, and routing in the context of Docker/Kubernetes networking?
- Which TCP parameters (sysctl) do you change for low-latency, high-load HTTP services?
Similar questions
- Design a service for collaboratively creating and reviewing business plans, with versioning, comments, and roles.
- Design a service for collaborative language learning with exercises, progress tracking, offline mode, and anti-cheating measures.
- Design a proctored exam platform where 300,000 students take a test simultaneously and the results cannot be falsified.
- Design a service for sharing and collaborating on architectural diagrams, with versioning and comments.
- Design a service for collaboratively viewing documents with comments, mentions, and permissions, where a leak of one document does not expose the others.