Skip to content

Implement Intervention Tracking & Efficacy Reporting #62

@joelabreurojas

Description

@joelabreurojas

Goal

To provide teachers with feedback on whether their support actions were effective, closing the loop on the Insight -> Action workflow. This feature will track student performance on a topic after a teacher has deployed a targeted intervention (like a new worksheet or a clarifying note).

Prerequisites

To-Do List

  • Update DB Schema:
    • Create a new InterventionActivity model in src/domain/models.py.
    • This table will store intervention_type (e.g., "worksheet_generated"), topic_tag, chat_id, and the teacher_id.
    • Create an association table to link this activity to the specific user_ids of the students who were part of the intervention group.
    • Generate and apply the Alembic migration for these new tables.
  • Log Interventions:
    • When a teacher clicks an "action button" in the Insights Panel, the system must now log this event by creating a new InterventionActivity record.
  • Create Efficacy Analysis Service:
    • In the AnalyticsService, create a new method analyze_intervention_efficacy(intervention_id).
    • This method will:
      1. Fetch the students associated with the intervention.
      2. Analyze their query topics and quiz scores after the intervention timestamp.
      3. Compare this to their performance before the intervention to calculate a change (e.g., "queries about this topic decreased by X%").
  • Implement the "Follow-Up" UI:
    • In the "Classroom Insights" panel, after an action has been taken, create a new UI component that appears after a set time (e.g., 3-5 days).
    • This "Follow-Up Report" will display the results from the analyze_intervention_efficacy service in a simple, clear format.

Acceptance Criteria

  • When a teacher uses a suggested action, the event is logged in the database.
  • After a few days, the UI displays a follow-up report showing the measurable impact of the teacher's action on student understanding.
  • The system successfully closes the feedback loop, helping teachers understand which support strategies are most effective for their students.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions