@@ -6,31 +6,37 @@ class LearnerProfile(BaseModel):
6
6
"""
7
7
Model representing learner profile.
8
8
9
- Each preference is on a scale from 1 to 5 , where:
9
+ Each preference is on a scale from 1 to 3 , where:
10
10
- 1 represents one extreme (e.g., focus on suggesting alternative solutions)
11
- - 5 represents the opposite extreme (e.g., focus on the standards)
11
+ - 3 represents the opposite extreme (e.g., focus on the standards)
12
12
"""
13
13
feedback_alternative_standard : Annotated [int , Field (
14
- strict = True , ge = 1 , le = 5 ,
15
- description = "Preference for creative exploration and alternatives (1) vs de-facto standards (5 )."
14
+ strict = True , ge = 1 , le = 3 ,
15
+ description = "Preference for creative exploration and alternatives (1) vs de-facto standards (3 )."
16
16
)]
17
17
feedback_followup_summary : Annotated [int , Field (
18
- strict = True , ge = 1 , le = 5 ,
19
- description = "Preference for follow-up questions (1) vs summary/conclusion (5 )."
18
+ strict = True , ge = 1 , le = 3 ,
19
+ description = "Preference for follow-up questions (1) vs summary/conclusion (3 )."
20
20
)]
21
21
feedback_brief_detailed : Annotated [int , Field (
22
- strict = True , ge = 1 , le = 5 ,
23
- description = "Preference for brief (1) vs detailed (5 ) feedback."
22
+ strict = True , ge = 1 , le = 3 ,
23
+ description = "Preference for brief (1) vs detailed (3 ) feedback."
24
24
)]
25
25
26
+ class Config :
27
+ @staticmethod
28
+ def alias_generator (s : str ) -> str :
29
+ return '' .join ([s .split ('_' )[0 ]] + [word .capitalize () for word in s .split ('_' )[1 :]])
30
+ allow_population_by_field_name = True
31
+
26
32
def directive_alternative_standard (self ) -> str :
27
- if self .feedback_alternative_standard <= 2 :
33
+ if self .feedback_alternative_standard == 1 :
28
34
return (
29
35
"Encourage exploration by suggesting alternative approaches or creative methods.\n "
30
36
"Example 1: Besides QuickSort, you could also explore MergeSort or InsertionSort depending on the dataset characteristics.\n "
31
37
"Example 2: Instead of writing a formal essay, you could experiment with a narrative storytelling approach to engage the reader differently.\n "
32
38
)
33
- if self .feedback_alternative_standard == 3 :
39
+ if self .feedback_alternative_standard == 2 :
34
40
return (
35
41
"Present the standard solution clearly, but briefly mention one alternative approach.\n "
36
42
"Example 1: QuickSort is efficient for large datasets, but for nearly sorted data, InsertionSort could be faster.\n "
@@ -44,7 +50,7 @@ def directive_alternative_standard(self) -> str:
44
50
)
45
51
46
52
def directive_followup_summary (self ) -> str :
47
- if self .feedback_followup_summary <= 3 :
53
+ if self .feedback_followup_summary <= 2 :
48
54
return (
49
55
"End the feedback with a clear, specific follow-up question that promotes reflection.\n "
50
56
"- If the answer is partially incorrect: Ask a focused question that hints at the mistake without giving away the solution.\n "
@@ -64,13 +70,13 @@ def directive_followup_summary(self) -> str:
64
70
)
65
71
66
72
def directive_brief_detailed (self ) -> str :
67
- if self .feedback_brief_detailed <= 2 :
73
+ if self .feedback_brief_detailed == 1 :
68
74
return (
69
75
"Keep the feedback short and direct — ideally 1 to 2 sentences.\n "
70
76
"Example 1: Add an index on the user_id column to improve performance.\n "
71
77
"Example 2: Clarify your thesis statement in the introduction to strengthen your argument.\n "
72
78
)
73
- if self .feedback_brief_detailed == 3 :
79
+ if self .feedback_brief_detailed == 2 :
74
80
return (
75
81
"Provide moderately detailed feedback, giving clear explanations without unnecessary length.\n "
76
82
"Example 1: Consider indexing user_id to speed up lookups; it helps databases quickly find matching records\n ."
0 commit comments