The Quiz AI Chat plugin (local_qai) empowers students to gain a deeper understanding of their learning materials by bringing an intelligent AI assistant directly into the Moodle Quiz interface.
Instead of just seeing a score, students can dive deep into why they got a question wrong, or discuss their overall performance—guided by an AI tutor explicitly configured by the teacher.
Key Features
1. Question-Specific AI Explanations
Students will see an "Ask AI to Explain" button natively embedded inside individual quiz questions during their attempt or review process.
- Contextualizes the exact question they are struggling with.
- Helps clear up misunderstandings right when they happen.
2. Overall Quiz Performance Discussions
A dedicated "Ask AI about Quiz" feature gives a macroscopic view.
- Students can ask general questions about their performance.
- Helps connect concepts across multiple questions.
3. Powerful Teacher Controls
Teachers manage exactly what the AI knows via the AI Chat Settings integrated straight into individual Quiz settings:
- Per-Quiz Toggle: Enable or disable question-level and quiz-level buttons on a per-quiz basis.
- Custom AI Prompts: Craft unique behavioral prompts for how the AI should respond for every specific quiz.
4. Dynamic Context Levels (Token Optimized)
Balance helpfulness with AI API costs by choosing the exact AI Context Level sent to the model:
- Level 5 (Full Detail): Sends full questions, choices, student answers, correct answers, feedback, and scores.
- Level 4 (Standard): Questions, student answers, correct answers, scores.
- Level 3 (Summary): Total score and question summary (Recommended)
- Level 2 (Minimal): Question text and correct/incorrect status only.
- Level 1 (None): AI has no initial quiz context—a fully free-flowing conversation.
5. Cost-Saving Mechanisms
- "Send first only" Mode: Quiz data is attached to the very first prompt. Follow-up messages in the same conversation do not re-send the entire quiz context, massively saving on redundant AI token costs.
Configuration & Usage
This plugin relies on Per-Quiz Settings rather than global Admin configurations.
- Navigate to a course and open a Quiz.
- From the Quiz Administration menu, click on AI Chat Settings (Look for the gear icon).
- Here, you can define:
- Button visibility for students.
- The AI Context Level (1 through 5).
- Whether to append prompt contexts continuously or just on the first message (Token optimizer).
- The custom Instructions/Prompts tailored for Question and Quiz-level inquiries.
- Save your changes!
Note: The Chat UI relies on Moodle's modern AMD modules, ensuring a fast, lightweight, and asynchronous experience for the end user.
