Skip to content

Assessment

The Assessment module contains two separate modalities — teacher authoring and student submission — that share a common QuestionData model. Each modality implements the full trait stack (Reducer, Component, Modality) on its own struct.

Unlike the other modalities, Assessment splits into two independent Modality implementations:

  • AssessmentSession (teacher) — authoring mode for creating assessments, configuring constraints, and assigning students. Uses QuestionPoolPosition for question bank placement.
  • StudentAssessment (student) — adaptive submission mode with an algorithm engine that selects questions based on demonstrated knowledge. Uses QuestionSequencePosition for ordered question delivery.

Both compile QuestionData into AssessmentElement output, but through different paths and with different metadata.

Associated TypeConcrete Type
SyncedAssessmentSessionSynced
EphemeralAssessmentSessionEphemeral
PositionQuestionPoolPosition
Component::MetadataAssessmentSessionMetadata
Component::OutputVec<AssessmentElement>
SnapshotAssessmentSessionSnapshot

Session type: Session<AssessmentSession, SessionIntent<AssessmentSessionIntent>>

Associated TypeConcrete Type
SyncedStudentAssessmentSynced
EphemeralStudentAssessmentEphemeral
PositionQuestionSequencePosition
Component::MetadataStudentAssessmentMetadata
Component::OutputVec<AssessmentElement>
SnapshotStudentAssessmentSnapshot

Session type: Session<StudentAssessment, SessionIntent<StudentAssessmentIntent>>

The core question model shared between teacher and student:

pub struct QuestionData {
pub id: String,
pub format: QuestionFormat, // MultiChoice or ShortAnswer
pub content: String, // question text
pub answers: Vec<String>, // answer options (MC) or accepted answers
pub answer_format: AnswerFormatType, // Whole, Decimal, Fraction, Text, MathKeyboard, OpenEnded
pub skill_indicator: Vec<(usize, f32)>, // sparse skill weights
pub score_factor: f32, // weight for knowledge updates
}
pub enum QuestionFormat {
MultiChoice,
ShortAnswer,
}
pub enum AnswerFormatType {
Whole,
Decimal,
Fraction,
Text,
MathKeyboard,
OpenEnded,
}

Both modalities define their own services type:

// Teacher uses default ModalityServices
pub struct AssessmentSessionServices {
pub agent: Arc<AgentService>,
}
// Student includes the algorithm engine
pub struct StudentAssessmentServices {
pub agent: Arc<AgentService>,
pub algorithm: AlgorithmEngine,
}

The student services include the AlgorithmEngine for adaptive question selection.

  • TeacherAssessmentSession authoring modality
  • StudentStudentAssessment submission modality
  • Algorithm — adaptive engine for question selection
  • Components — question compilation and output types