ContiAI / modules /inputs.py
ziadsameh32's picture
final-version
fad6af1
import os
import json
# from .directory import output_dir
###################--Inputs--#######################
"""
/*********************************************************************************************************************************************/
title="The main topic to generate an outline for",
description="The specific subject or concept that the outline should focus on. Example: 'Time Management', 'Machine Learning Basics', 'Healthy Nutrition'")
/*********************************************************************************************************************************************/
title="Knowledge domain",
description="The broader field of knowledge or industry where the topic belongs. Example: IT, Engineering, Education, Healthcare, Business"
/*********************************************************************************************************************************************/
title="Type of content",
description=(
"Educational → for structured learning (e.g., lessons, modules)\n"
"Awareness → for informative/raising awareness purposes (e.g., campaigns, workshops)\n"
"Training → for skill development with step-by-step practice (e.g., hands-on, exercises)"
)
/*********************************************************************************************************************************************/
title="Target audience",
description=(
"The group of people intended to benefit from the material. Example:\n"
"- Kids (age 6–12)\n"
"- High School Students (teenagers)\n"
"- University Students (academic level)\n"
"- Professionals (working individuals)\n"
"- General Public (all ages, non-technical)"
)
/*********************************************************************************************************************************************/
title="Nature of the scientific material",
description=(
"Defines the learning approach:\n"
"- Conceptual → focuses on theories, principles, and abstract knowledge.\n"
"- Procedural → step-by-step methods, instructions, or processes.\n"
"- Structural → frameworks, models, and organized structures.\n"
"- Personal → reflections, personal skills, and self-development aspects.\n"
"- Realistic → practical, case-based, real-world examples and applications."
)
/*********************************************************************************************************************************************/
"""
# inputs={
# "topic":"بدله الفضاء",
# "domain": "Aerospace Engineering",
# "content_type": "Educational",
# "audience": "University Students",
# "material_type": ["Procedural","Realistic","Personal"]
# }
TRUSTED_SITES = [
"scholar.google.com",
"researchgate.net",
"doaj.org",
"scopus.com",
"academia.edu",
"almanhal.com",
"digitallibrary.un.org",
"virtuallrc.com",
"dlc.dlib.indiana.edu",
"pubmed.ncbi.nlm.nih.gov",
"arxiv.org",
"archiveshub.jisc.ac.uk",
]
###################--BLOOM 1--#######################
bloom_taxonomy_1 = {
"Remember": """The process of recalling facts, terms, concepts, or basic principles from memory
without necessarily understanding them. This level involves recognition and recall
of previously learned material, such as definitions, lists, dates, formulas, or key terms.
The focus is strictly on accurate retrieval, not comprehension or application.
It is the foundation for higher-order thinking because learners must first be able
to retrieve information before they can understand, apply, or analyze it.""",
"Understand": """The process of constructing meaning from instructional materials and messages.
It involves explaining ideas or concepts, interpreting information, summarizing content,
and demonstrating comprehension of facts, rules, or principles. Learners show that they
grasp the essence of material by restating it in their own words, providing basic
interpretations, or making connections. At this level, students demonstrate they
understand the 'what' and 'why' of knowledge rather than just memorizing it.""",
"Apply": """The process of using learned material in new and concrete situations.
It includes executing procedures, implementing methods, or applying principles
to solve problems. Learners demonstrate their ability to transfer knowledge to
practical tasks, exercises, or unfamiliar contexts. This involves using facts,
techniques, and rules in a different way than originally learned, adapting them
to meet the needs of new situations. Application shows the ability to move beyond
rote memory and demonstrate understanding through action.""",
"Analyze": """The process of examining material in detail and breaking it into smaller components
to understand its structure and relationships. This involves identifying motives, causes,
assumptions, or evidence and distinguishing between facts and opinions. Learners also
draw conclusions, detect patterns, and find evidence to support generalizations.
Analysis requires uncovering how parts work together and how they contribute
to the overall meaning or outcome. It is a critical step that prepares learners
for evaluation and creation.""",
"Evaluate": """The process of presenting opinions and defending them by making judgments
about information, the validity of ideas, or the quality of work based on a set
of criteria. It includes checking, critiquing, and reviewing by applying logical reasoning
or evidence. Learners assess the strengths and weaknesses of approaches, solutions,
or arguments, providing justification for their conclusions. Evaluation demands both
critical thinking and the ability to apply standards consistently, making it
a higher-order skill that guides decision-making.""",
"Create": """The process of putting elements together to form a novel, functional whole.
It involves reorganizing concepts into a new pattern or structure, such as through planning,
design, or production. Learners generate original ideas, propose innovative solutions,
or produce unique work by combining existing knowledge in new ways. This level requires
synthesis, imagination, and innovation. Creation is the highest level of Bloom’s taxonomy,
demonstrating mastery by building something entirely new from prior knowledge
and skills.""",
}
###################--BLOOM 2--#######################
bloom_taxonomy_2 = {
"Remember": {
"description": """The process of recalling facts, terms, concepts, or basic principles from memory
without necessarily understanding them. This level involves recognition and recall
of previously learned material, such as definitions, lists, dates, formulas, or key terms.
The focus is strictly on accurate retrieval, not comprehension or application.
It is the foundation for higher-order thinking because learners must first be able
to retrieve information before they can understand, apply, or analyze it.""",
"Remember_verbs_examples": [
"يختار",
"يراقب",
"يعرض",
"ينسخ",
"يتهجى",
"يُعرّف",
"يقتبس",
"يقرأ",
"يتعرف على",
"يحدد",
"يكرر",
"يكتب",
"يعيد سرد",
"يصف",
"يطابق",
"يسمي",
"يرقم",
"يتلو",
"يبحث",
],
},
"Understand": {
"description": """The process of constructing meaning from instructional materials and messages.
It involves explaining ideas or concepts, interpreting information, summarizing content,
and demonstrating comprehension of facts, rules, or principles. Learners show that they
grasp the essence of material by restating it in their own words, providing basic
interpretations, or making connections. At this level, students demonstrate they
understand the 'what' and 'why' of knowledge rather than just memorizing it.""",
"Understand_verbs_examples": [
"يسأل",
"يستشهد",
"يعمم",
"يتنبأ",
"يصنف",
"يقارن",
"يوضح",
"يَعُد",
"يناقش",
"يستدل",
"يراجع",
"يفسر",
"يعرض",
"يشرح",
"يلخص",
"يعبر عن",
"يترجم",
"يربط",
"يصف",
"يحول",
"يكتشف",
"يميز",
"يجمع",
"يحدد",
"يعيد الصياغة",
"يلخص",
],
},
"Apply": {
"description": """The process of using learned material in new and concrete situations.
It includes executing procedures, implementing methods, or applying principles
to solve problems. Learners demonstrate their ability to transfer knowledge to
practical tasks, exercises, or unfamiliar contexts. This involves using facts,
techniques, and rules in a different way than originally learned, adapting them
to meet the needs of new situations. Application shows the ability to move beyond
rote memory and demonstrate understanding through action.""",
"Apply_verbs_examples": [
"يمثل",
"يوظف",
"يمارس",
"يدير",
"يجرب",
"يبني",
"يحسب",
"يحاكي",
"يحل",
"يستخدم",
"ينظم",
"يطور",
"يؤدي",
"يخطط",
"ينفذ",
"يرسم بياني",
"يستكمل",
"يفحص",
"يشرح",
"يحرر",
"يحمل",
"يشغل",
"يلون",
"يلعب",
"يحضر",
"يشارك",
"يرسم",
"يستخدم",
],
},
"Analyze": {
"description": """The process of examining material in detail and breaking it into smaller components
to understand its structure and relationships. This involves identifying motives, causes,
assumptions, or evidence and distinguishing between facts and opinions. Learners also
draw conclusions, detect patterns, and find evidence to support generalizations.
Analysis requires uncovering how parts work together and how they contribute
to the overall meaning or outcome. It is a critical step that prepares learners
for evaluation and creation.""",
"Analyze_verbs_examples": [
"يحلل",
"يفحص",
"يحدد الأولويات",
"يجد",
"يرتب",
"يفترض",
"يوظف",
"يسلط الضوء",
"يناقش",
"يعيد تنظيم",
"يبحث",
"يستدل",
"يحدد الاختلافات",
"يكتشف",
"يبسط",
"يشرح",
"يحذف",
"يقارن",
"يربط بين",
"يستنتج",
"يفرق",
"يميز",
"يفصل",
"يقدر",
"يرسم الخرائط الذهنية",
"يحدد الخطوط العريضة بخطط",
],
},
"Evaluate": {
"description": """The process of presenting opinions and defending them by making judgments
about information, the validity of ideas, or the quality of work based on a set
of criteria. It includes checking, critiquing, and reviewing by applying logical reasoning
or evidence. Learners assess the strengths and weaknesses of approaches, solutions,
or arguments, providing justification for their conclusions. Evaluation demands both
critical thinking and the ability to apply standards consistently, making it
a higher-order skill that guides decision-making.""",
"Evaluate_verbs_examples": [
"يعطي رأي",
"يدحض",
"يقيس",
"يُقيم",
"يجادل",
"يقدر",
"يقنع",
"يثبت",
"يعطي الأسباب",
"يومي",
"يصدر حكم على",
"يدعم",
"يضع معايير",
"يتحقق من صحة",
"يقرر",
"يفسر",
"يحكم على",
"يبرر",
"يتجادل",
"ينتقد",
"يناقش",
"يدافع",
"يحرر",
"يفترض",
"يقيس",
"يراقب",
"يتنبأ",
"يعيد صياغة",
],
},
"Create": {
"description": """The process of putting elements together to form a novel, functional whole.
It involves reorganizing concepts into a new pattern or structure, such as through planning,
design, or production. Learners generate original ideas, propose innovative solutions,
or produce unique work by combining existing knowledge in new ways. This level requires
synthesis, imagination, and innovation. Creation is the highest level of Bloom’s taxonomy,
demonstrating mastery by building something entirely new from prior knowledge
and skills.""",
"Create_verbs_examples": [
"يدون",
"يتعاون",
"يؤلف",
"يبني",
"يصمم",
"يبتكر",
"يوجه",
"يضع تصور",
"يعيد صياغة",
"يخترع",
"يخلط",
"يعيد مزج",
"يعدل",
"يتفاوض",
"يخطط",
"ينتج",
"يبرمج",
"ينشر",
"يلعب الأدوار",
"يحاكي",
"يقترح حل",
"يعيد هيكلة",
"يكتب",
],
},
}
objectives_dimensions = {
"Knowledge": {
"description": "المجال المعرفي (Cognitive Domain): يركز على العمليات العقلية والفكرية، ويشمل اكتساب المعلومات، الفهم، التطبيق، التحليل، التقييم، والإبداع. يتدرج من مستويات التفكير الدنيا إلى العليا حسب تصنيف بلوم المعدل.",
"levels": [
{
"level_name": "Remember (التذكر)",
"description": "استرجاع المعلومات والمعارف من الذاكرة طويلة المدى",
"verbs_examples": [
"يذكر",
"يعرف",
"يحدد",
"يصنف",
"يسمي",
"يعدد",
"يسترجع",
],
},
{
"level_name": "Understand (الفهم)",
"description": "بناء المعنى من المعلومات الشفهية والمكتوبة والرسومية",
"verbs_examples": [
"يفسر",
"يستنتج",
"يصف",
"يناقش",
"يترجم",
"يميز",
"يشرح",
"يلخص",
],
},
{
"level_name": "Apply (التطبيق)",
"description": "تنفيذ أو استخدام إجراء معين في موقف محدد",
"verbs_examples": [
"يستخدم",
"يطبق",
"يجرب",
"يشرح",
"يبرهن",
"ينفذ",
"يحل",
],
},
{
"level_name": "Analyze (التحليل)",
"description": "تقسيم المادة إلى أجزائها المكونة وتحديد العلاقات بينها",
"verbs_examples": [
"يحلل",
"يربط",
"يقارن",
"يوازن",
"يفحص",
"يميز",
"يصنف",
],
},
{
"level_name": "Evaluate (التقويم)",
"description": "إصدار أحكام بناءً على معايير ومحكات محددة",
"verbs_examples": [
"يقيم",
"ينقد",
"يبرر",
"يوازن",
"يحكم",
"يدافع عن",
"يختار",
],
},
{
"level_name": "Create (الإبداع)",
"description": "دمج العناصر لتكوين كل متماسك أو وظيفي جديد وإعادة تنظيم العناصر في نمط أو بنية جديدة",
"verbs_examples": [
"يصمم",
"يبتكر",
"يطور",
"يؤلف",
"ينشئ",
"يخطط",
"يبني",
],
},
],
},
"Ability": {
"description": "المجال الوجداني/الانفعالي (Affective Domain): يتعلق بالمشاعر والاتجاهات والقيم والميول. يتدرج من مجرد الاستقبال السلبي إلى التبني الكامل للقيم وجعلها جزءاً من شخصية المتعلم.",
"levels": [
{
"level_name": "Reception (الاستقبال)",
"description": "الوعي والانتباه والاستعداد لاستقبال الظواهر والمثيرات",
"verbs_examples": ["ينتبه", "يختار", "يشعر", "يصغي", "يستقبل", "يلاحظ"],
},
{
"level_name": "Response (الاستجابة)",
"description": "المشاركة النشطة والتفاعل مع الظواهر والاستجابة لها",
"verbs_examples": [
"يستجيب",
"يشارك",
"يعاون",
"يمتثل",
"يتطوع",
"يساعد",
"يناقش",
],
},
{
"level_name": "Valuing (التقييم)",
"description": "إعطاء قيمة للأشياء والظواهر والسلوكيات والالتزام بها",
"verbs_examples": [
"يقدر",
"يحترم",
"يؤيد",
"يدعم",
"يظهر اقتناعاً",
"يعتز",
],
},
{
"level_name": "Organization (التنظيم)",
"description": "تنظيم القيم المختلفة وحل التناقضات بينها وبناء نظام قيمي متسق",
"verbs_examples": [
"ينظم",
"يقارن",
"يلتزم",
"يوازن",
"يرتب",
"يدمج",
"يوحد",
],
},
{
"level_name": "Characterization (التمييز/التشخيص)",
"description": "امتلاك نظام قيمي يتحكم في السلوك بشكل ثابت ومتسق ويصبح جزءاً من شخصية الفرد",
"verbs_examples": [
"يميز",
"يفضل",
"يتبنى",
"يلتزم",
"يمارس",
"يحل",
"يتصرف وفقاً لـ",
],
},
],
},
"Skills": {
"description": "المجال المهاري/النفسحركي (Psychomotor Domain): يركز على المهارات الحركية والجسدية التي تتطلب تنسيقاً بين العقل والعضلات. يتدرج من الملاحظة البسيطة إلى الإتقان والإبداع الحركي.",
"levels": [
{
"level_name": "Readiness (الاستعداد)",
"description": "الاستعداد الذهني والجسدي والانفعالي للقيام بالمهارة",
"verbs_examples": [
"يتهيأ",
"يستعد",
"يظهر رغبة",
"يبدي اهتماماً",
"يتخذ وضعية",
],
},
{
"level_name": "Guided Response/Imitation (الاستجابة الموجهة/التقليد)",
"description": "محاكاة وتقليد المهارة تحت الإشراف والتوجيه",
"verbs_examples": ["يقلد", "يحاكي", "يكرر", "يتبع", "يجرب", "يستجيب"],
},
{
"level_name": "Mechanism/Practice (الآلية/الممارسة)",
"description": "أداء المهارة بثقة ودقة دون الحاجة للتوجيه المستمر",
"verbs_examples": ["يمارس", "يطبق", "يؤدي", "ينفذ", "يكمل", "يعمل"],
},
{
"level_name": "Complex Overt Response (الاستجابة الظاهرة المعقدة)",
"description": "أداء المهارة بسلاسة وإتقان وبشكل تلقائي",
"verbs_examples": [
"يؤدي بسلاسة",
"يستخدم بانتظام",
"يتقن",
"ينجز بمهارة",
"يعمل بكفاءة",
],
},
{
"level_name": "Adaptation (التكيف)",
"description": "تعديل وتكييف المهارات لتناسب المواقف المختلفة",
"verbs_examples": [
"يعدل",
"يطور",
"يبدل",
"يكيف",
"يعيد تنظيم",
"يحسن",
],
},
{
"level_name": "Origination/Creativity (الإبداع)",
"description": "ابتكار حركات وأنماط مهارية جديدة وإبداعية",
"verbs_examples": [
"يبتكر",
"يصمم",
"يبدع",
"يخترع",
"يطور أسلوباً جديداً",
"يؤلف",
],
},
],
},
}
###############################################################
html_template = """
<!DOCTYPE html>
<html lang="ar" dir="rtl">
<head>
<meta charset="UTF-8">
<title>مرحلة التحليل</title>
<style>
body {
font-family: "Tahoma", sans-serif;
direction: rtl;
margin: 0;
padding: 0;
}
.header {
background: #c79810;
/* ذهبي */
color: white;
text-align: center;
font-weight: bold;
padding: 12px;
font-size: 20px;
}
.sub-header {
background: #000;
color: white;
text-align: center;
padding: 10px;
font-size: 16px;
font-weight: bold;
}
table {
width: 100%;
border-collapse: collapse;
}
td {
border: 1px solid #000;
padding: 8px 12px;
vertical-align: top;
line-height: 1.6;
}
.main-col {
background: #666;
color: white;
width: 20%;
font-weight: bold;
text-align: center;
}
.sub-col {
background: #e6e6e6;
width: 20%;
font-weight: bold;
text-align: right;
}
ul {
margin: 6px 0;
padding-right: 20px;
}
</style>
</head>
<body>
<div class="header">إدارة الوقت</div>
<div class="sub-header">مرحلة التحليل</div>
<table>
<!-- الهدف -->
<tr>
<td class="main-col">المتوقع تحقيقه (النهائي)</td>
<td colspan="2">
أن يتمكّن المتدرب من اكتساب مهارة إدارة وقته بفعالية، من خلال فهم المفهوم والأسس،
وتطبيق المهارات والتقنيات العملية، بما ينعكس على إنجاز أهدافه الشخصية والعملية بكفاءة عالية.
</td>
</tr>
<!-- الفئة المستهدفة -->
<tr>
<td class="main-col" rowspan="4">الفئة المستهدفة</td>
<td class="sub-col">أعمارهم</td>
<td>18 إلى 35 عامًا.</td>
</tr>
<tr>
<td class="sub-col">الخبرات السابقة</td>
<td>
<ul>
<li>ممارسة أعمال أو مهام تتطلب التخطيط أو التنظيم.</li>
<li>حضور أنشطة أو دورات سابقة في التنمية الذاتية أو المهارات الحياتية.</li>
<li>إلمام جزئي بأساسيات إدارة العمل أو الأنشطة التربوية.</li>
</ul>
</td>
</tr>
<tr>
<td class="sub-col">خصائص المتدربين</td>
<td>
<ul>
<li>امتلاك حصيلة لغوية جيدة مع قدرة على التعبير.</li>
<li>القدرة على التفكير التحليلي والمنطقي وحل المشكلات.</li>
<li>الرغبة في التفاعل مع المجموعات وتقدير العلاقات القائمة على الاحترام.</li>
<li>ميل قوي للاستقلالية في اتخاذ القرارات وحمل المسؤوليات.</li>
<li>ظهور ميول متزايدة بالذات والحاجة إلى التحكم في الانفعالات.</li>
<li>السعي لتطوير الهوية الذاتية والاجتماعية وتعزيز الثقة بالنفس.</li>
<li>تفضيل التعلم التفاعلي القائم على الأنشطة التطبيقية.</li>
</ul>
</td>
</tr>
<tr>
<td class="sub-col">احتياجات المتدربين</td>
<td>
<ul>
<li>تمييز أسباب ضياع الوقت الشخصي والتنظيمي.</li>
<li>تحقيق التوازن بين المهام والأهداف.</li>
<li>امتلاك أدوات عملية لتحديد الأولويات.</li>
<li>استخدام تقنيات جديدة أكثر كفاءة.</li>
<li>ضبط التوتر الناتج عن ضغوط المهام.</li>
<li>أساليب مجرَّبة ناجحة في استثمار الوقت.</li>
</ul>
</td>
</tr>
<!-- القيود -->
<tr>
<td class="main-col" rowspan="2">القيود</td>
<td class="sub-col">بالنسبة للمدرب</td>
<td>
<ul>
<li>صعوبة التعامل مع تفاوت الخلفيات المعرفية.</li>
<li>محدودية الوقت المخصص للأنشطة التدريبية.</li>
<li>حاجة إلى تكييف الأمثلة بما يناسب الجمهور.</li>
<li>صعوبة متابعة الأداء الفردي لجميع المتدربين.</li>
</ul>
</td>
</tr>
<tr>
<td class="sub-col">بالنسبة للمتدرب</td>
<td>
<ul>
<li>محدودية الخبرة السابقة في إدارة الوقت.</li>
<li>صعوبة الالتزام بجميع التمارين المقترحة.</li>
<li>التأثر بالضغوط الشخصية والاجتماعية.</li>
<li>مقاومة تغيير العادات السلبية القديمة.</li>
</ul>
</td>
</tr>
<!-- المدة الزمنية -->
<tr>
<td class="main-col">المدة الزمنية</td>
<td colspan="2">مدة الكورس محسوبة بعدد الأيام (اليوم = 4 ساعات).</td>
</tr>
<!-- جمع البيانات -->
<tr>
<td class="main-col">جمع البيانات وتحليلها</td>
<td colspan="2">
<ul>
<li>تحديد محاور الدورة التدريبية.</li>
<li>تحليل الاحتياجات التدريبية.</li>
<li>تحديد الفجوات المعرفية والمهارية.</li>
<li>تصميم أنشطة لمعالجة الفجوات.</li>
<li>تجريب الأنشطة وتقييمها.</li>
<li>تطوير الأنشطة وتحسينها.</li>
</ul>
</td>
</tr>
</table>
</body>
</html>
"""
##########################################################
# # This is an input For === Objectives Agent ===
# with open(os.path.join(output_dir, "curriculum_outline_final.json"), "r", encoding="utf-8") as f:
# outlines = json.load(f)
# # This is an input For === Outcomes Agent ===
# with open(
# os.path.join(output_dir, "step_analysis_2_objectives.json"),
# "r",
# encoding="utf-8",
# ) as f:
# objectives = json.load(f)