Commit ·
2a1cd96
1
Parent(s): 2fe573b
fixed prompt percentages & updated vark link
Browse files
backend/grouping_logic.py
CHANGED
|
@@ -108,15 +108,17 @@ STUDENT AGE CONTEXT (15-16 years - Adolescence):
|
|
| 108 |
- Sensitivity to feedback from peers
|
| 109 |
- Collaborative learning enhances engagement
|
| 110 |
|
| 111 |
-
GROUPING FRAMEWORK -
|
| 112 |
|
| 113 |
-
1. **ZPD OPTIMIZATION (Zone of Proximal Development)**
|
|
|
|
| 114 |
- Mix academic performance (grade field) to create ZPD scaffolding
|
| 115 |
- Place high performers (معدل بالا) with medium performers for peer tutoring
|
| 116 |
- Avoid grouping all high or all low performers together
|
| 117 |
- Target: Each group should have grade variance of 1-2 points to maximize learning
|
| 118 |
|
| 119 |
-
2. **MBTI COMPLEMENTARITY (NOT Similarity)**
|
|
|
|
| 120 |
Research-based MBTI pairings for adolescent teamwork:
|
| 121 |
- ENFP + INTJ: Visionary creativity with strategic planning
|
| 122 |
- ENTP + INFJ: Innovation meets deep insight and empathy
|
|
@@ -133,7 +135,8 @@ GROUPING FRAMEWORK - PRIORITY ORDER:
|
|
| 133 |
- Mix N (Intuitive) with S (Sensing) for big-picture + detail focus
|
| 134 |
- Combine J (Judging) with P (Perceiving) for structure + flexibility
|
| 135 |
|
| 136 |
-
3. **VARK DIVERSITY (Learning Styles)**
|
|
|
|
| 137 |
- Include different learning styles in each group:
|
| 138 |
* Visual (دیداری): Diagrams, charts, spatial understanding
|
| 139 |
* Aural (شنیداری): Discussions, verbal explanations
|
|
@@ -142,26 +145,28 @@ GROUPING FRAMEWORK - PRIORITY ORDER:
|
|
| 142 |
- Diversity ensures multiple teaching approaches within group
|
| 143 |
- Adolescents learn best when exposed to varied learning methods
|
| 144 |
|
| 145 |
-
4. **ACADEMIC MOTIVATION (AMS Score)**
|
| 146 |
- AMS field: Academic Motivation Scale (0-196)
|
| 147 |
- Balance high and moderate motivation levels
|
| 148 |
- High motivation students (>140) can inspire others
|
| 149 |
- Avoid grouping all low-motivation (<100) students together
|
| 150 |
- Target: Each group has at least one high-motivation member
|
| 151 |
|
| 152 |
-
5. **COOPERATIVE LEARNING SKILLS**
|
| 153 |
- Cooperative field: Cooperation ability (0-125)
|
| 154 |
- High cooperation students (>88) act as social facilitators
|
| 155 |
- Mix cooperation levels for peer modeling
|
| 156 |
- Students with strong cooperation skills help integrate introverts
|
| 157 |
|
| 158 |
-
6. **COURSE-SPECIFIC REQUIREMENTS**
|
|
|
|
| 159 |
- Math/Science: Prioritize T (Thinking) types, Visual/Kinesthetic learners
|
| 160 |
- Literature/Humanities: Include F (Feeling) types, Read/Write learners
|
| 161 |
- Projects/Labs: Need high Kinesthetic and ESTP/ISTP types
|
| 162 |
- Discussion-based: Ensure Aural learners and E (Extrovert) types
|
| 163 |
|
| 164 |
-
7. **STUDENT PREFERENCES**
|
|
|
|
| 165 |
- Honor "preferredStudents" field ONLY if it doesn't compromise above criteria
|
| 166 |
- Adolescents benefit from working outside comfort zones
|
| 167 |
- Strategic separation can reduce cliques and expand social circles
|
|
@@ -193,7 +198,7 @@ OUTPUT FORMAT (Valid JSON Only):
|
|
| 193 |
headers = {
|
| 194 |
'Content-Type': 'application/json',
|
| 195 |
'Authorization': f'Bearer {openrouter_key}',
|
| 196 |
-
'HTTP-Referer': 'https://talimbot.
|
| 197 |
'X-Title': 'TalimBot'
|
| 198 |
}
|
| 199 |
|
|
|
|
| 108 |
- Sensitivity to feedback from peers
|
| 109 |
- Collaborative learning enhances engagement
|
| 110 |
|
| 111 |
+
GROUPING FRAMEWORK - HIERARCHY OF IMPORTANCE:
|
| 112 |
|
| 113 |
+
1. **PRIMARY DRIVER: ZPD OPTIMIZATION (Zone of Proximal Development)**
|
| 114 |
+
*This is the most critical psychological factor.*
|
| 115 |
- Mix academic performance (grade field) to create ZPD scaffolding
|
| 116 |
- Place high performers (معدل بالا) with medium performers for peer tutoring
|
| 117 |
- Avoid grouping all high or all low performers together
|
| 118 |
- Target: Each group should have grade variance of 1-2 points to maximize learning
|
| 119 |
|
| 120 |
+
2. **SECONDARY DRIVER: MBTI COMPLEMENTARITY (NOT Similarity)**
|
| 121 |
+
*Use this to refine the groups created by ZPD.*
|
| 122 |
Research-based MBTI pairings for adolescent teamwork:
|
| 123 |
- ENFP + INTJ: Visionary creativity with strategic planning
|
| 124 |
- ENTP + INFJ: Innovation meets deep insight and empathy
|
|
|
|
| 135 |
- Mix N (Intuitive) with S (Sensing) for big-picture + detail focus
|
| 136 |
- Combine J (Judging) with P (Perceiving) for structure + flexibility
|
| 137 |
|
| 138 |
+
3. **TERTIARY DRIVER: VARK DIVERSITY (Learning Styles)**
|
| 139 |
+
*Ensure the group has "Full Coverage" of capabilities.*
|
| 140 |
- Include different learning styles in each group:
|
| 141 |
* Visual (دیداری): Diagrams, charts, spatial understanding
|
| 142 |
* Aural (شنیداری): Discussions, verbal explanations
|
|
|
|
| 145 |
- Diversity ensures multiple teaching approaches within group
|
| 146 |
- Adolescents learn best when exposed to varied learning methods
|
| 147 |
|
| 148 |
+
4. **BALANCING FACTOR: ACADEMIC MOTIVATION (AMS Score)**
|
| 149 |
- AMS field: Academic Motivation Scale (0-196)
|
| 150 |
- Balance high and moderate motivation levels
|
| 151 |
- High motivation students (>140) can inspire others
|
| 152 |
- Avoid grouping all low-motivation (<100) students together
|
| 153 |
- Target: Each group has at least one high-motivation member
|
| 154 |
|
| 155 |
+
5. **SOCIAL GLUE: COOPERATIVE LEARNING SKILLS**
|
| 156 |
- Cooperative field: Cooperation ability (0-125)
|
| 157 |
- High cooperation students (>88) act as social facilitators
|
| 158 |
- Mix cooperation levels for peer modeling
|
| 159 |
- Students with strong cooperation skills help integrate introverts
|
| 160 |
|
| 161 |
+
6. **CONTEXTUAL ADAPTATION: COURSE-SPECIFIC REQUIREMENTS**
|
| 162 |
+
Based on "{course_name}":
|
| 163 |
- Math/Science: Prioritize T (Thinking) types, Visual/Kinesthetic learners
|
| 164 |
- Literature/Humanities: Include F (Feeling) types, Read/Write learners
|
| 165 |
- Projects/Labs: Need high Kinesthetic and ESTP/ISTP types
|
| 166 |
- Discussion-based: Ensure Aural learners and E (Extrovert) types
|
| 167 |
|
| 168 |
+
7. **TIE-BREAKER: STUDENT PREFERENCES**
|
| 169 |
+
*Only use this if it does not violate the drivers above.*
|
| 170 |
- Honor "preferredStudents" field ONLY if it doesn't compromise above criteria
|
| 171 |
- Adolescents benefit from working outside comfort zones
|
| 172 |
- Strategic separation can reduce cliques and expand social circles
|
|
|
|
| 198 |
headers = {
|
| 199 |
'Content-Type': 'application/json',
|
| 200 |
'Authorization': f'Bearer {openrouter_key}',
|
| 201 |
+
'HTTP-Referer': 'https://talimbot-talimbot.hf.space',
|
| 202 |
'X-Title': 'TalimBot'
|
| 203 |
}
|
| 204 |
|
backend/main.py
CHANGED
|
@@ -191,7 +191,7 @@ async def perform_grouping(request: GroupingRequest):
|
|
| 191 |
if not api_key:
|
| 192 |
raise HTTPException(
|
| 193 |
status_code=500,
|
| 194 |
-
detail="OpenRouter API key not configured. Please set OPENROUTER_API_KEY in
|
| 195 |
)
|
| 196 |
|
| 197 |
# Get students with complete info (mbti and learningStyle required)
|
|
|
|
| 191 |
if not api_key:
|
| 192 |
raise HTTPException(
|
| 193 |
status_code=500,
|
| 194 |
+
detail="OpenRouter API key not configured. Please set OPENROUTER_API_KEY in your environment variables or hosting platform settings"
|
| 195 |
)
|
| 196 |
|
| 197 |
# Get students with complete info (mbti and learningStyle required)
|
backend/static/pages/student-dashboard.html
CHANGED
|
@@ -215,7 +215,7 @@
|
|
| 215 |
</div>
|
| 216 |
<div class="space-y-3">
|
| 217 |
<div class="flex gap-2">
|
| 218 |
-
<a href="https://
|
| 219 |
class="flex-1 bg-green-600 hover:bg-green-700 text-white text-sm font-semibold py-3 px-4 rounded-lg transition-colors text-center flex items-center justify-center gap-2">
|
| 220 |
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
|
| 221 |
<path fill-rule="evenodd" d="M3 6a3 3 0 013-3h10a1 1 0 01.8 1.6L14.25 8l2.55 3.4A1 1 0 0116 13H6a1 1 0 00-1 1v3a1 1 0 11-2 0V6z" clip-rule="evenodd"/>
|
|
|
|
| 215 |
</div>
|
| 216 |
<div class="space-y-3">
|
| 217 |
<div class="flex gap-2">
|
| 218 |
+
<a href="https://mantegh.me/test/%D8%AA%D8%B3%D8%AA-%D8%B3%D8%A8%DA%A9-%DB%8C%D8%A7%D8%AF%DA%AF%DB%8C%D8%B1%DB%8C-%D9%88%D8%A7%D8%B1%DA%A9/" target="_blank"
|
| 219 |
class="flex-1 bg-green-600 hover:bg-green-700 text-white text-sm font-semibold py-3 px-4 rounded-lg transition-colors text-center flex items-center justify-center gap-2">
|
| 220 |
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
|
| 221 |
<path fill-rule="evenodd" d="M3 6a3 3 0 013-3h10a1 1 0 01.8 1.6L14.25 8l2.55 3.4A1 1 0 0116 13H6a1 1 0 00-1 1v3a1 1 0 11-2 0V6z" clip-rule="evenodd"/>
|
backend/static/pages/teacher-dashboard.html
CHANGED
|
@@ -207,15 +207,15 @@
|
|
| 207 |
دانش آموز آماده گروهبندی هستند.
|
| 208 |
</p>
|
| 209 |
<div class="text-sm text-gray-700 space-y-1 bg-white rounded-lg p-3 mt-2">
|
| 210 |
-
<p class="font-semibold text-gray-800 mb-2">🎯 معیارهای گروهبندی علمی (سنین 15-16 سال، به ترتیب اولویت):</p>
|
| 211 |
<div class="mr-4 space-y-1">
|
| 212 |
-
<p><strong>1. بهینهسازی ZPD ناحیه رشد نزدیک
|
| 213 |
-
<p><strong>2. تکمیل MBTI (
|
| 214 |
-
<p><strong>3. تنوع VARK (
|
| 215 |
-
<p><strong>4. انگیزش تحصیلی
|
| 216 |
-
<p><strong>5. مهارت هم
|
| 217 |
-
<p><strong>6.
|
| 218 |
-
<p class="text-orange-600 italic mt-1"><strong>7. ترجیحات دانشآموزان
|
| 219 |
</div>
|
| 220 |
</div>
|
| 221 |
<div class="bg-amber-50 border border-amber-300 rounded-lg p-3 mt-3">
|
|
|
|
| 207 |
دانش آموز آماده گروهبندی هستند.
|
| 208 |
</p>
|
| 209 |
<div class="text-sm text-gray-700 space-y-1 bg-white rounded-lg p-3 mt-2">
|
| 210 |
+
<p class="font-semibold text-gray-800 mb-2">🎯 معیارهای گروهبندی علمی (سنین 15-16 سال، به ترتیب اولویت سلسلهمراتبی):</p>
|
| 211 |
<div class="mr-4 space-y-1">
|
| 212 |
+
<p><strong>1. محرک اصلی - بهینهسازی ZPD (ناحیه رشد نزدیک):</strong> ترکیب نمرات بالا (>18) با متوسط (16-18) برای یادگیری همیاری و آموزش همتا-به-همتا. این مهمترین عامل روانشناختی است.</p>
|
| 213 |
+
<p><strong>2. محرک ثانویه - تکمیل MBTI (نه شباهت):</strong> ترکیب شخصیتهای مکمل - مثال: ENFP+INTJ، ENTP+INFJ - تعادل 2-3 درونگرا با 2-3 برونگرا، ترکیب T با F، N با S، J با P</p>
|
| 214 |
+
<p><strong>3. محرک سوم - تنوع VARK (پوشش کامل قابلیتها):</strong> اطمینان از وجود سبکهای یادگیری مختلف (دیداری، شنیداری، خواندن/نوشتن، حرکتی) در هر گروه برای رویکردهای آموزشی متنوع</p>
|
| 215 |
+
<p><strong>4. عامل متعادلکننده - انگیزش تحصیلی AMS:</strong> توزیع دانشآموزان با انگیزه بالا (>140) در گروهها و اجتناب از گروهبندی همه افراد کمانگیزه (<100) با هم</p>
|
| 216 |
+
<p><strong>5. چسب اجتماعی - مهارتهای یادگیری همیاری:</strong> دانشآموزان با مهارت همکاری بالا (>88) به عنوان تسهیلگر اجتماعی و الگوی همتا عمل میکنند</p>
|
| 217 |
+
<p><strong>6. تطبیق زمینهای - نیازهای درس:</strong> <span id="courseNameInCriteria">ریاضی/علوم: اولویت با انواع T و Visual/Kinesthetic | ادبیات: شامل انواع F و Read/Write | پروژهها: نیاز به Kinesthetic و ESTP/ISTP</span></p>
|
| 218 |
+
<p class="text-orange-600 italic mt-1"><strong>7. تعیینکننده نهایی - ترجیحات دانشآموزان:</strong> فقط در صورت عدم نقض معیارهای بالا - کار خارج از منطقه راحتی باعث رشد اجتماعی نوجوانان میشود</p>
|
| 219 |
</div>
|
| 220 |
</div>
|
| 221 |
<div class="bg-amber-50 border border-amber-300 rounded-lg p-3 mt-3">
|