# 1. AI Chat Assistant

User Type: **Student**
Source: *Mi Digital Academy - Education CRM Features Document*

---

## 1. AI Chat Assistant

### 1.1 Ask Questions to the AI Assistant
**What it does:** Lets the Student ask questions to the AI study assistant. The Student types or speaks a question about a topic, and the assistant provides a clear, accurate answer grounded in the course content. The Student can follow up in a conversation and the assistant keeps the context of the discussion.

**Sub-features:**
- Ask a question to the AI assistant
- Answers grounded in the course content
- Follow-up questions in a conversation
- Conversation context kept
- Text and voice input for questions
- Answer with references to the topic
- Conversation history
- Chat event logging (question asked, answer shown)
- Audit logging of the ask questions to the AI assistant

**Student User Journey:**
1. Student opens the AI assistant and asks "Explain the Pythagoras theorem".
2. The assistant provides a clear answer grounded in the course content.
3. Student follows up with "Give me an example".
4. The assistant keeps the context and answers.
5. The answer references the topic.
6. Student reviews the conversation history.
7. Student opens Profile → "Activity" and confirms the chat events are recorded.

**Rules & Edge Cases:**
- The assistant answers questions grounded in the course content.
- Follow-up questions keep the conversation context.
- The answer references the relevant topic.
- The conversation history is retained.
- Chat events (question asked, answer shown) are logged with the account and the timestamp.
- The ask questions to the AI assistant is audit-logged with the account and the timestamp.

### 1.2 Context-Aware Study Help
**What it does:** Provides context-aware study help from the AI assistant. Based on the Student's current course, topic, and recent activity, the assistant offers relevant help: explanations of difficult concepts, worked examples, and next steps. The help is personalized to the Student's level and progress.

**Sub-features:**
- Context-aware help based on the current topic
- Explanations of difficult concepts
- Worked examples on request
- Next-step suggestions
- Help personalized to the Student's level
- Help available on web and mobile
- Help event logging (help requested, shown)
- Audit logging of the context-aware study help

**Student User Journey:**
1. Student is studying Quadratic equations and opens the assistant.
2. The assistant offers help relevant to the current topic.
3. Student requests an explanation of the discriminant.
4. The assistant provides a worked example.
5. The assistant suggests the next step (practice problems).
6. The help is personalized to the Student's level.
7. Student opens Profile → "Activity" and confirms the help events are recorded.

**Rules & Edge Cases:**
- The help is based on the Student's current course, topic, and recent activity.
- The help is personalized to the Student's level.
- Worked examples are provided on request.
- Help events (help requested, shown) are logged with the account and the timestamp.
- The context-aware study help is audit-logged with the account and the timestamp.

### 1.3 Doubt Resolution with the Assistant
**What it does:** Helps the Student resolve doubts with the AI assistant before escalating to a teacher. The Student describes a doubt, and the assistant walks through the solution step by step. If the assistant cannot fully resolve the doubt, the Student can escalate it to a teacher or a doubt-clearing session. This gives the Student fast, on-demand help.

**Sub-features:**
- Describe a doubt to the assistant
- Step-by-step solution walkthrough
- Hints before the full solution
- Escalate an unresolved doubt to a teacher
- Doubt added to the doubt list
- Doubt resolution status (resolved, escalated)
- Doubt event logging (described, resolved, escalated)
- Audit logging of the doubt resolution with the assistant

**Student User Journey:**
1. Student describes a doubt on a problem to the assistant.
2. The assistant offers a hint first.
3. Student requests the full solution; the assistant walks through it step by step.
4. The doubt is marked resolved.
5. For an unresolved doubt, Student escalates it to a teacher.
6. The doubt is added to the doubt list.
7. Student opens Profile → "Activity" and confirms the doubt events are recorded.

**Rules & Edge Cases:**
- A hint is offered before the full solution.
- The solution is walked through step by step.
- An unresolved doubt can be escalated to a teacher.
- The doubt is added to the doubt list.
- Doubt events (described, resolved, escalated) are logged with the account and the timestamp.
- The doubt resolution with the assistant is audit-logged with the account and the timestamp.
