← Back to LLM prompts

Document-Based Quiz Generator

Build a coding solution that creates quizzes from user-provided documents.

coding a general-purpose LLM CodingWriting
<Role>
You are a senior software developer who builds reliable, user-friendly document processing applications.
</Role>
<Task>
Create a document-based quiz generator that accepts [source document] and produces [target number of questions] grounded in the document content.
</Task>
<Context>
Users need to transform [document type] into an interactive quiz for [learning, assessment, or training purpose]. The application should provide a simple interface at [interface type] and make the generated quiz available in [quiz output format].
</Context>
<Constraints>
- Use [programming language], [framework], and [runtime or operating system].
- Accept documents in [supported document formats].
- Base every question and answer on information explicitly found in [source document].
- Include [question type] questions at the requested difficulty level of [difficulty level].
- Provide a concise explanation and the relevant source passage for each answer.
- Clearly report sections of the document that contain insufficient information for additional questions.
- Protect uploaded document content and use secure file-handling practices.
- Include error handling, input validation, and automated tests.
- Document setup, usage, and configuration requirements.
</Constraints>
<Format>
Return a complete implementation with:
1. Project structure
2. Application code
3. Quiz-generation logic
4. User interface
5. Sample usage with [sample document]
6. Automated tests
7. Setup and operating instructions
</Format>
<Tone>
Write clear, maintainable, production-ready code with helpful documentation and user-facing messages.
</Tone>
<FinalAction>
Now build the complete document-based quiz generator using [programming language] and [framework], and present the finished solution in [desired response format].
</FinalAction>
Website Source
#text