Add wrong answer follow-up prompts

This commit is contained in:
hz
2026-07-11 02:16:01 -05:00
parent c716b16c53
commit ad6b3863cc
8 changed files with 212 additions and 3 deletions
+9
View File
@@ -16,6 +16,7 @@ public class Question
public string CorrectChoiceId { get; set; } = "";
public string Explanation { get; set; } = "";
public Dictionary<string, string> ChoiceExplanations { get; set; } = [];
public Dictionary<string, WrongAnswerFollowup> WrongAnswerFollowups { get; set; } = [];
public Dictionary<string, int> ChoiceSelectionPercentages { get; set; } = [];
public string Discipline { get; set; } = "";
public string System { get; set; } = "";
@@ -42,3 +43,11 @@ public class QuestionLab
public string Unit { get; set; } = "";
public string Reference { get; set; } = "";
}
public class WrongAnswerFollowup
{
public string Prompt { get; set; } = "";
public List<QuestionChoice> Choices { get; set; } = [];
public string CorrectChoiceId { get; set; } = "";
public string TeachingPoint { get; set; } = "";
}
@@ -19,6 +19,7 @@ public class UpsertQuestionRequest
public string CorrectChoiceId { get; set; } = "";
public string Explanation { get; set; } = "";
public Dictionary<string, string> ChoiceExplanations { get; set; } = [];
public Dictionary<string, WrongAnswerFollowup> WrongAnswerFollowups { get; set; } = [];
public Dictionary<string, int> ChoiceSelectionPercentages { get; set; } = [];
public string Discipline { get; set; } = "";
public string System { get; set; } = "";
@@ -10,6 +10,7 @@ public class QuestionResponse
public string CorrectChoiceId { get; set; } = "";
public string Explanation { get; set; } = "";
public Dictionary<string, string> ChoiceExplanations { get; set; } = [];
public Dictionary<string, WrongAnswerFollowup> WrongAnswerFollowups { get; set; } = [];
public Dictionary<string, int> ChoiceSelectionPercentages { get; set; } = [];
public string Discipline { get; set; } = "";
public string System { get; set; } = "";
@@ -33,6 +34,7 @@ public class QuestionResponse
CorrectChoiceId = question.CorrectChoiceId,
Explanation = question.Explanation,
ChoiceExplanations = question.ChoiceExplanations,
WrongAnswerFollowups = question.WrongAnswerFollowups,
ChoiceSelectionPercentages = BuildChoiceSelectionPercentages(question, liveChoiceSelectionPercentages),
Discipline = question.Discipline,
System = question.System,