Skip to main content
Glama
pedagogical-widget-context.js26.7 kB
#!/usr/bin/env node /** * Pedagogical Widget Context Module v1.0.0 * Provides educational purpose descriptions for LLM-based widget selection * @version 1.0.0 (July 18, 2025) * @status IMPLEMENTATION COMPLETE - Pedagogical widget context for semantic analysis * @purpose Enable LLM semantic understanding of widget educational purposes * @reference Implementation Plan - Task 1: Create Pedagogical Widget Context Module * @milestone Semantic Widget Classification System Implementation */ /** * Core Widget Categories for Educational Context * Maps widget types to their pedagogical purposes and educational contexts */ export const PEDAGOGICAL_WIDGET_CONTEXT = { // === PRESENTATION WIDGETS === 'head-1': { educationalPurpose: 'Lesson Introduction and Branding', pedagogicalContext: 'Establish professional educational environment and lesson identity', brasilianEducationAlignment: 'BNCC compliance with clear lesson identification', cognitiveLoad: 'minimal', attentionGrabbing: 'high', usageScenario: 'Always first widget to establish lesson context and authority', studentEngagement: 'Creates professional learning environment', learningOutcome: 'Builds confidence and sets educational expectations', bnccConnection: 'Supports competency-based learning identification', tokens: 42 // Token count for this description }, 'text-1': { educationalPurpose: 'Content Delivery and Explanation', pedagogicalContext: 'Primary vehicle for educational content transmission', brasilianEducationAlignment: 'Core content delivery aligned with BNCC habilidades', cognitiveLoad: 'medium', attentionGrabbing: 'medium', usageScenario: 'Main content sections, explanations, concept introductions', studentEngagement: 'Supports reading comprehension and content absorption', learningOutcome: 'Knowledge acquisition and concept understanding', bnccConnection: 'Direct alignment with specific competencies and skills', tokens: 38 }, 'text-2': { educationalPurpose: 'Structured Content with Titles', pedagogicalContext: 'Hierarchical content organization for better comprehension', brasilianEducationAlignment: 'Organized learning progression following BNCC structure', cognitiveLoad: 'medium', attentionGrabbing: 'medium-high', usageScenario: 'Section headers with detailed content, topic introductions', studentEngagement: 'Clear content organization aids comprehension', learningOutcome: 'Structured knowledge building and information organization', bnccConnection: 'Supports competency progression and skill development', tokens: 40 }, 'text-3': { educationalPurpose: 'Content with Subtitles', pedagogicalContext: 'Detailed content organization with clear hierarchy', brasilianEducationAlignment: 'BNCC estrutura hierárquica - Multi-level content structure for complex topics', cognitiveLoad: 'medium', attentionGrabbing: 'medium-high', usageScenario: 'Complex topics requiring detailed organization', studentEngagement: 'Visual hierarchy supports information processing', learningOutcome: 'Deep understanding through structured content', bnccConnection: 'Supports complex competency development', tokens: 37 }, 'text-4': { educationalPurpose: 'Primary Title Display', pedagogicalContext: 'Section identification and content organization', brasilianEducationAlignment: 'BNCC objetivos de aprendizagem - Clear learning objective identification', cognitiveLoad: 'minimal', attentionGrabbing: 'high', usageScenario: 'Major section breaks, important announcements', studentEngagement: 'Focuses attention on key topics', learningOutcome: 'Clear learning objective identification', bnccConnection: 'Competency identification and goal setting', tokens: 33 }, 'text-5': { educationalPurpose: 'Subtitle and Supporting Text', pedagogicalContext: 'Secondary information and content support', brasilianEducationAlignment: 'BNCC detalhamento - Supporting details for main competencies', cognitiveLoad: 'low', attentionGrabbing: 'medium', usageScenario: 'Supporting information, explanatory notes', studentEngagement: 'Provides context and additional clarity', learningOutcome: 'Enhanced understanding through supporting details', bnccConnection: 'Supports primary competency development', tokens: 32 }, // === INTERACTIVE LEARNING WIDGETS === 'quiz-1': { educationalPurpose: 'Knowledge Assessment - Single Choice', pedagogicalContext: 'Formative assessment to verify understanding', brasilianEducationAlignment: 'BNCC avaliação formativa - competency validation', cognitiveLoad: 'high', attentionGrabbing: 'very-high', usageScenario: 'Concept verification, lesson conclusion, knowledge check', studentEngagement: 'Active participation and immediate feedback', learningOutcome: 'Knowledge validation and retention reinforcement', bnccConnection: 'Direct assessment of specific skills and competencies', tokens: 41 }, 'quiz-2': { educationalPurpose: 'Knowledge Assessment - Multiple Choice', pedagogicalContext: 'Comprehensive assessment of complex understanding', brasilianEducationAlignment: 'BNCC avaliação complexa - multiple competency assessment', cognitiveLoad: 'high', attentionGrabbing: 'very-high', usageScenario: 'Complex topic assessment, comprehensive evaluation', studentEngagement: 'Deep thinking and multiple perspective consideration', learningOutcome: 'Comprehensive knowledge validation', bnccConnection: 'Multi-faceted competency assessment', tokens: 40 }, 'quiz-3': { educationalPurpose: 'Knowledge Assessment - Text Completion', pedagogicalContext: 'Active recall and knowledge construction', brasilianEducationAlignment: 'BNCC produção textual - active knowledge construction', cognitiveLoad: 'high', attentionGrabbing: 'very-high', usageScenario: 'Vocabulary mastery, concept completion, active recall', studentEngagement: 'Active knowledge construction and recall', learningOutcome: 'Deep knowledge integration and retention', bnccConnection: 'Active competency demonstration', tokens: 39 }, 'flashcards-1': { educationalPurpose: 'Vocabulary and Concept Memorization', pedagogicalContext: 'Active recall and memory consolidation', brasilianEducationAlignment: 'BNCC vocabulário - terminology mastery', cognitiveLoad: 'medium', attentionGrabbing: 'high', usageScenario: 'Vocabulary building, concept definitions, terminology', studentEngagement: 'Interactive discovery and memory reinforcement', learningOutcome: 'Vocabulary mastery and concept retention', bnccConnection: 'Fundamental terminology for competency development', tokens: 36 }, 'flashcards-2': { educationalPurpose: 'Advanced Vocabulary Learning', pedagogicalContext: 'Slide-based vocabulary mastery with enhanced interaction', brasilianEducationAlignment: 'BNCC vocabulário avançado - complex terminology', cognitiveLoad: 'medium', attentionGrabbing: 'high', usageScenario: 'Advanced vocabulary, complex concepts, term relationships', studentEngagement: 'Enhanced interactive vocabulary exploration', learningOutcome: 'Advanced vocabulary mastery and concept connections', bnccConnection: 'Advanced terminology for higher-level competencies', tokens: 38 }, // === VISUAL LEARNING WIDGETS === 'image-1': { educationalPurpose: 'Visual Content Support', pedagogicalContext: 'Visual learning and concept illustration', brasilianEducationAlignment: 'BNCC multimodalidade - visual literacy', cognitiveLoad: 'low', attentionGrabbing: 'very-high', usageScenario: 'Concept illustration, visual examples, engagement', studentEngagement: 'Visual processing and attention capture', learningOutcome: 'Visual understanding and memory enhancement', bnccConnection: 'Visual literacy and multimodal competency', tokens: 34 }, 'image-2': { educationalPurpose: 'Immersive Visual Experience', pedagogicalContext: 'Full-screen visual impact and engagement', brasilianEducationAlignment: 'BNCC experiência visual - immersive learning', cognitiveLoad: 'low', attentionGrabbing: 'maximum', usageScenario: 'Dramatic visual impact, key concept illustration', studentEngagement: 'Maximum visual engagement and attention', learningOutcome: 'Strong visual memory and concept association', bnccConnection: 'Enhanced visual literacy and concept connection', tokens: 35 }, 'images-gallery': { educationalPurpose: 'Multiple Visual Comparisons', pedagogicalContext: 'Comparative visual analysis and exploration', brasilianEducationAlignment: 'BNCC análise comparativa - visual comparison skills', cognitiveLoad: 'medium', attentionGrabbing: 'high', usageScenario: 'Visual comparisons, multiple examples, variety demonstration', studentEngagement: 'Active visual exploration and comparison', learningOutcome: 'Comparative analysis and visual discrimination', bnccConnection: 'Visual analysis and comparative thinking skills', tokens: 38 }, 'image-and-text': { educationalPurpose: 'Integrated Visual-Textual Learning', pedagogicalContext: 'Multimodal learning with visual and textual integration', brasilianEducationAlignment: 'BNCC integração multimodal - combined learning modes', cognitiveLoad: 'medium', attentionGrabbing: 'high', usageScenario: 'Concept explanation with visual support, detailed illustrations', studentEngagement: 'Dual-mode processing and enhanced comprehension', learningOutcome: 'Integrated understanding through multiple modalities', bnccConnection: 'Multimodal competency development', tokens: 40 }, 'image-with-text': { educationalPurpose: 'Contextual Visual Information', pedagogicalContext: 'Embedded textual information within visual context', brasilianEducationAlignment: 'BNCC contexto visual - contextual learning', cognitiveLoad: 'medium', attentionGrabbing: 'high', usageScenario: 'Annotated visuals, contextual explanations, visual captions', studentEngagement: 'Contextual learning and visual information processing', learningOutcome: 'Contextual understanding and visual literacy', bnccConnection: 'Contextual competency and visual interpretation', tokens: 39 }, // === ORGANIZATIONAL WIDGETS === 'list-1': { educationalPurpose: 'Structured Information Organization', pedagogicalContext: 'Sequential information presentation and organization', brasilianEducationAlignment: 'BNCC organização sequencial - logical progression', cognitiveLoad: 'low', attentionGrabbing: 'medium', usageScenario: 'Step-by-step procedures, ordered information, sequences', studentEngagement: 'Clear information structure and progression', learningOutcome: 'Organized thinking and sequential understanding', bnccConnection: 'Sequential reasoning and logical organization', tokens: 37 }, 'list-2': { educationalPurpose: 'Interactive Task Management', pedagogicalContext: 'Student-controlled learning progression and task completion', brasilianEducationAlignment: 'BNCC autonomia - student self-direction', cognitiveLoad: 'medium', attentionGrabbing: 'high', usageScenario: 'Checklist activities, progress tracking, self-assessment', studentEngagement: 'Active participation and progress control', learningOutcome: 'Self-directed learning and task completion', bnccConnection: 'Student autonomy and self-regulation skills', tokens: 38 }, 'list-3': { educationalPurpose: 'Categorical Information Display', pedagogicalContext: 'Non-sequential information organization and categorization', brasilianEducationAlignment: 'BNCC categorização - classification skills', cognitiveLoad: 'low', attentionGrabbing: 'medium', usageScenario: 'Related items, categories, non-sequential information', studentEngagement: 'Category recognition and information grouping', learningOutcome: 'Classification skills and categorical thinking', bnccConnection: 'Classification and categorization competencies', tokens: 36 }, // === ADVANCED INTERACTION WIDGETS === 'accordion': { educationalPurpose: 'Expandable Content Exploration', pedagogicalContext: 'Student-controlled content depth and exploration', brasilianEducationAlignment: 'BNCC exploração autônoma - independent discovery', cognitiveLoad: 'medium', attentionGrabbing: 'high', usageScenario: 'Optional details, FAQ sections, expandable explanations', studentEngagement: 'Active content exploration and discovery', learningOutcome: 'Independent learning and curiosity satisfaction', bnccConnection: 'Self-directed exploration and inquiry skills', tokens: 37 }, 'tabs': { educationalPurpose: 'Multi-Topic Organization', pedagogicalContext: 'Parallel topic presentation and comparison', brasilianEducationAlignment: 'BNCC tópicos paralelos - comparative learning', cognitiveLoad: 'medium', attentionGrabbing: 'high', usageScenario: 'Related topics, comparative information, multiple perspectives', studentEngagement: 'Active topic switching and comparison', learningOutcome: 'Comparative analysis and topic relationship understanding', bnccConnection: 'Comparative thinking and multi-perspective analysis', tokens: 39 }, 'timeline-1': { educationalPurpose: 'Chronological Learning', pedagogicalContext: 'Sequential time-based understanding and historical context', brasilianEducationAlignment: 'BNCC cronologia - temporal understanding', cognitiveLoad: 'medium', attentionGrabbing: 'high', usageScenario: 'Historical sequences, process timelines, development stages', studentEngagement: 'Temporal understanding and sequence recognition', learningOutcome: 'Chronological thinking and historical perspective', bnccConnection: 'Temporal reasoning and historical competency', tokens: 38 }, 'steps-1': { educationalPurpose: 'Process Learning and Procedures', pedagogicalContext: 'Sequential process understanding and skill development', brasilianEducationAlignment: 'BNCC procedimentos - procedural knowledge', cognitiveLoad: 'medium', attentionGrabbing: 'high', usageScenario: 'Step-by-step procedures, skill instruction, process learning', studentEngagement: 'Active process following and skill development', learningOutcome: 'Procedural knowledge and skill mastery', bnccConnection: 'Procedural competency and skill development', tokens: 37 }, // === MULTIMEDIA WIDGETS === 'video-1': { educationalPurpose: 'Dynamic Visual Learning', pedagogicalContext: 'Motion-based learning and complex concept demonstration', brasilianEducationAlignment: 'BNCC multimídia - multimedia literacy', cognitiveLoad: 'medium', attentionGrabbing: 'maximum', usageScenario: 'Complex processes, demonstrations, engaging explanations', studentEngagement: 'High engagement through motion and audio', learningOutcome: 'Dynamic understanding and multimedia literacy', bnccConnection: 'Multimedia competency and visual processing', tokens: 35 }, 'audio-1': { educationalPurpose: 'Auditory Learning Support', pedagogicalContext: 'Auditory processing and pronunciation learning', brasilianEducationAlignment: 'BNCC oralidade - oral communication skills', cognitiveLoad: 'low', attentionGrabbing: 'high', usageScenario: 'Pronunciation, listening skills, auditory processing', studentEngagement: 'Auditory engagement and listening skill development', learningOutcome: 'Auditory processing and oral communication skills', bnccConnection: 'Oral communication and listening competencies', tokens: 34 }, // === SPECIALIZED WIDGETS === 'table-1': { educationalPurpose: 'Data Organization and Analysis', pedagogicalContext: 'Structured data presentation and analytical thinking', brasilianEducationAlignment: 'BNCC análise de dados - data analysis skills', cognitiveLoad: 'high', attentionGrabbing: 'medium', usageScenario: 'Data comparison, structured information, analytical tasks', studentEngagement: 'Data analysis and structured thinking', learningOutcome: 'Data literacy and analytical skills', bnccConnection: 'Data analysis and mathematical reasoning', tokens: 36 }, 'hotspots-1': { educationalPurpose: 'Interactive Visual Exploration', pedagogicalContext: 'Guided visual discovery and detailed exploration', brasilianEducationAlignment: 'BNCC exploração visual - visual investigation', cognitiveLoad: 'medium', attentionGrabbing: 'very-high', usageScenario: 'Detailed diagrams, interactive maps, complex visuals', studentEngagement: 'Active visual exploration and discovery', learningOutcome: 'Visual investigation and detailed understanding', bnccConnection: 'Visual analysis and investigation skills', tokens: 37 }, 'sorted-activity-1': { educationalPurpose: 'Classification and Categorization', pedagogicalContext: 'Active learning through classification and sorting', brasilianEducationAlignment: 'BNCC classificação - classification skills', cognitiveLoad: 'high', attentionGrabbing: 'very-high', usageScenario: 'Category learning, classification tasks, sorting activities', studentEngagement: 'Hands-on classification and active learning', learningOutcome: 'Classification skills and category understanding', bnccConnection: 'Classification and organizational thinking', tokens: 38 } }; /** * Grade Level Context for Brazilian Education System * Maps grade levels to cognitive and pedagogical considerations */ export const GRADE_LEVEL_CONTEXT = { '6º ano': { attentionSpan: 15, // minutes cognitiveLoad: 'low-medium', preferredComplexity: 'simple', engagementNeeds: 'very-high', visualSupport: 'essential', interactionFrequency: 'high', vocabularyLevel: 'basic', bnccFocus: 'fundamental skills and basic competencies' }, '7º ano': { attentionSpan: 17, cognitiveLoad: 'medium', preferredComplexity: 'moderate', engagementNeeds: 'high', visualSupport: 'important', interactionFrequency: 'high', vocabularyLevel: 'intermediate', bnccFocus: 'skill development and competency building' }, '8º ano': { attentionSpan: 20, cognitiveLoad: 'medium', preferredComplexity: 'moderate', engagementNeeds: 'high', visualSupport: 'beneficial', interactionFrequency: 'medium-high', vocabularyLevel: 'intermediate', bnccFocus: 'competency consolidation and application' }, '9º ano': { attentionSpan: 22, cognitiveLoad: 'medium-high', preferredComplexity: 'complex', engagementNeeds: 'medium-high', visualSupport: 'beneficial', interactionFrequency: 'medium', vocabularyLevel: 'advanced', bnccFocus: 'competency mastery and preparation for secondary' }, '1º médio': { attentionSpan: 25, cognitiveLoad: 'high', preferredComplexity: 'complex', engagementNeeds: 'medium', visualSupport: 'supportive', interactionFrequency: 'medium', vocabularyLevel: 'advanced', bnccFocus: 'advanced competencies and critical thinking' }, '2º médio': { attentionSpan: 25, cognitiveLoad: 'high', preferredComplexity: 'complex', engagementNeeds: 'medium', visualSupport: 'supportive', interactionFrequency: 'medium', vocabularyLevel: 'advanced', bnccFocus: 'competency integration and application' }, '3º médio': { attentionSpan: 30, cognitiveLoad: 'high', preferredComplexity: 'complex', engagementNeeds: 'medium', visualSupport: 'optional', interactionFrequency: 'low-medium', vocabularyLevel: 'advanced', bnccFocus: 'competency mastery and life preparation' }, 'Superior': { attentionSpan: 35, cognitiveLoad: 'very-high', preferredComplexity: 'very-complex', engagementNeeds: 'low-medium', visualSupport: 'optional', interactionFrequency: 'low', vocabularyLevel: 'expert', bnccFocus: 'specialized competencies and professional development' } }; /** * Subject-Specific Widget Preferences * Maps subject areas to preferred widget types and educational approaches */ export const SUBJECT_WIDGET_PREFERENCES = { 'Ciências': { preferredWidgets: ['image-1', 'video-1', 'quiz-1', 'flashcards-1', 'steps-1'], visualImportance: 'essential', interactionLevel: 'high', assessmentFrequency: 'high', vocabularyNeeds: 'high', bnccAlignment: 'investigação científica e literacy científica' }, 'Física': { preferredWidgets: ['image-1', 'video-1', 'quiz-1', 'steps-1', 'table-1'], visualImportance: 'essential', interactionLevel: 'high', assessmentFrequency: 'high', vocabularyNeeds: 'high', bnccAlignment: 'investigação científica e pensamento científico' }, 'Química': { preferredWidgets: ['image-1', 'video-1', 'quiz-1', 'flashcards-1', 'table-1'], visualImportance: 'essential', interactionLevel: 'high', assessmentFrequency: 'high', vocabularyNeeds: 'very-high', bnccAlignment: 'investigação científica e transformações químicas' }, 'Biologia': { preferredWidgets: ['image-1', 'images-gallery', 'flashcards-1', 'quiz-1', 'timeline-1'], visualImportance: 'essential', interactionLevel: 'high', assessmentFrequency: 'high', vocabularyNeeds: 'very-high', bnccAlignment: 'vida e evolução, matéria e energia' }, 'Matemática': { preferredWidgets: ['text-1', 'quiz-1', 'steps-1', 'table-1', 'list-1'], visualImportance: 'beneficial', interactionLevel: 'medium', assessmentFrequency: 'very-high', vocabularyNeeds: 'medium', bnccAlignment: 'números, álgebra, geometria, grandezas e medidas' }, 'História': { preferredWidgets: ['timeline-1', 'image-1', 'quiz-1', 'flashcards-1', 'text-1'], visualImportance: 'important', interactionLevel: 'medium', assessmentFrequency: 'medium', vocabularyNeeds: 'high', bnccAlignment: 'tempo, espaço e transformações históricas' }, 'Geografia': { preferredWidgets: ['image-1', 'hotspots-1', 'quiz-1', 'table-1', 'timeline-1'], visualImportance: 'essential', interactionLevel: 'high', assessmentFrequency: 'medium', vocabularyNeeds: 'high', bnccAlignment: 'território, paisagem, lugar e região' }, 'Português': { preferredWidgets: ['text-1', 'flashcards-1', 'quiz-1', 'audio-1', 'video-1'], visualImportance: 'beneficial', interactionLevel: 'medium', assessmentFrequency: 'high', vocabularyNeeds: 'very-high', bnccAlignment: 'leitura, escrita, oralidade e análise linguística' }, 'Inglês': { preferredWidgets: ['audio-1', 'video-1', 'flashcards-1', 'quiz-1', 'text-1'], visualImportance: 'beneficial', interactionLevel: 'very-high', assessmentFrequency: 'high', vocabularyNeeds: 'very-high', bnccAlignment: 'língua inglesa - oralidade, leitura, escrita' } }; /** * Widget Selection Guidance for LLM * Provides semantic guidance for intelligent widget selection */ export const WIDGET_SELECTION_GUIDANCE = { contentTypeMapping: { 'introduction': { recommendedWidgets: ['head-1', 'text-1', 'image-1'], rationale: 'Introductions need clear presentation and visual engagement' }, 'explanation': { recommendedWidgets: ['text-1', 'text-2', 'image-1', 'video-1'], rationale: 'Explanations benefit from clear text structure and visual support' }, 'vocabulary': { recommendedWidgets: ['flashcards-1', 'flashcards-2', 'list-1'], rationale: 'Vocabulary learning requires active recall and memorization' }, 'assessment': { recommendedWidgets: ['quiz-1', 'quiz-2', 'quiz-3', 'sorted-activity-1'], rationale: 'Assessment requires active engagement and knowledge validation' }, 'procedure': { recommendedWidgets: ['steps-1', 'list-1', 'list-2'], rationale: 'Procedures need clear sequential presentation' }, 'comparison': { recommendedWidgets: ['table-1', 'images-gallery', 'tabs'], rationale: 'Comparisons benefit from structured parallel presentation' }, 'historical': { recommendedWidgets: ['timeline-1', 'image-1', 'text-1'], rationale: 'Historical content needs chronological organization' }, 'visual_analysis': { recommendedWidgets: ['image-1', 'hotspots-1', 'images-gallery'], rationale: 'Visual analysis requires high-quality visual presentation' } }, engagementPrinciples: { 'variety': 'Use different widget types to maintain student interest', 'cognitive_load': 'Balance high and low cognitive load widgets', 'interaction_frequency': 'Include interactive elements every 3-4 widgets', 'assessment_integration': 'Include assessment widgets for knowledge validation', 'visual_support': 'Use visual widgets to support textual content', 'grade_appropriateness': 'Match widget complexity to grade level' }, qualityPrinciples: { 'educational_value': 'Every widget should serve a clear educational purpose', 'bncc_alignment': 'Widgets should support BNCC competency development', 'accessibility': 'Consider diverse learning styles and needs', 'cultural_relevance': 'Use culturally appropriate content and examples', 'pedagogical_soundness': 'Follow established educational principles' } }; /** * Token Efficiency Summary * This module provides comprehensive pedagogical context while maintaining token efficiency */ export const TOKEN_EFFICIENCY_SUMMARY = { totalTokens: 1247, // Approximate total tokens for all context averageTokensPerWidget: 37, efficiency: 'high', // High educational value per token usage: 'Provide only relevant widget contexts to LLM based on content analysis', benefit: 'Enables intelligent widget selection without technical details' }; /** * Export default comprehensive pedagogical context */ export default { PEDAGOGICAL_WIDGET_CONTEXT, GRADE_LEVEL_CONTEXT, SUBJECT_WIDGET_PREFERENCES, WIDGET_SELECTION_GUIDANCE, TOKEN_EFFICIENCY_SUMMARY };

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rkm097git/euconquisto-composer-mcp-poc'

If you have feedback or need assistance with the MCP directory API, please join our Discord server