sparshmehta commited on
Commit
e87061b
·
verified ·
1 Parent(s): 185857d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +69 -55
app.py CHANGED
@@ -462,7 +462,7 @@ Example: If a quote starts at word 300, timestamp would be [02:00] (300 words /
462
  marked_transcript += word + " "
463
  transcript = marked_transcript
464
 
465
- prompt_template = """Analyze this teaching content with strict evaluation criteria. Score 1 only if ALL requirements are fully met.
466
 
467
  Transcript:
468
  {transcript}
@@ -474,107 +474,121 @@ Required JSON structure:
474
  {{
475
  "Concept Assessment": {{
476
  "Subject Matter Accuracy": {{
477
- "Score": 1, # Score 1 ONLY if NO factual errors or misconceptions are present
478
  "Citations": ["[MM:SS] Quote demonstrating accuracy or error"]
479
  }},
480
  "First Principles Approach": {{
481
- "Score": 1, # Score 1 ONLY if fundamentals are clearly explained BEFORE introducing complex concepts
482
  "Citations": ["[MM:SS] Quote showing fundamental concept explanation"]
483
  }},
484
  "Examples and Business Context": {{
485
- "Score": 1, # Score 1 ONLY if MULTIPLE relevant real-world examples are provided
486
  "Citations": ["[MM:SS] Quote containing practical example"]
487
  }},
488
  "Cohesive Storytelling": {{
489
- "Score": 1, # Score 1 ONLY if concepts flow logically with clear transitions
490
  "Citations": ["[MM:SS] Quote showing topic transition or connection"]
491
  }},
492
  "Engagement and Interaction": {{
493
- "Score": 1, # Score 1 ONLY if MULTIPLE engagement techniques are used effectively
494
  "Citations": ["[MM:SS] Quote showing audience engagement"]
495
  }},
496
  "Professional Tone": {{
497
- "Score": 1, # Score 1 ONLY if consistently professional language is maintained
498
  "Citations": ["[MM:SS] Quote demonstrating tone"]
499
  }}
500
  }},
501
  "Code Assessment": {{
502
  "Depth of Explanation": {{
503
- "Score": 1, # Score 1 ONLY if code concepts are explained thoroughly with implementation details
504
  "Citations": ["[MM:SS] Quote showing detailed code explanation"]
505
  }},
506
  "Output Interpretation": {{
507
- "Score": 1, # Score 1 ONLY if code outputs are explained with their significance
508
  "Citations": ["[MM:SS] Quote demonstrating output explanation"]
509
  }},
510
  "Breaking down Complexity": {{
511
- "Score": 1, # Score 1 ONLY if complex concepts are broken into manageable parts
512
  "Citations": ["[MM:SS] Quote showing concept breakdown"]
513
  }}
514
  }}
515
  }}
516
 
517
- Strict Evaluation Criteria:
518
 
519
  Concept Assessment:
520
- 1. Subject Matter Accuracy
521
- - MUST have zero factual errors or misconceptions
522
- - All technical terms used correctly
523
- - No oversimplification that leads to incorrect understanding
524
-
525
- 2. First Principles Approach
526
- - MUST explain fundamental concepts before advanced topics
527
- - Clear progression from basic to complex ideas
528
- - Core concepts defined before being used in explanations
529
-
530
- 3. Examples and Business Context
531
- - MUST include at least 2 relevant real-world examples
532
- - Examples should directly relate to the concept
533
- - Business context should be clearly explained
534
-
535
- 4. Cohesive Storytelling
536
- - MUST have clear logical flow between topics
537
- - Explicit connections between related concepts
538
- - Smooth transitions between subjects
539
- - No abrupt topic changes
540
-
541
- 5. Engagement and Interaction
542
- - MUST use at least 2 different engagement techniques
543
- - Rhetorical questions or direct audience involvement
 
 
 
 
 
 
 
544
  - Clear checks for understanding
545
  - Interactive elements in presentation
 
546
 
547
- 6. Professional Tone
548
- - MUST maintain consistent professional language
549
- - No casual or inappropriate expressions
550
  - Clear and confident delivery
551
- - Appropriate technical vocabulary
 
552
 
553
  Code Assessment:
554
- 1. Depth of Explanation
555
- - MUST explain both what code does AND why
556
- - Implementation details clearly covered
557
- - Key programming concepts explained
558
- - Important design decisions justified
559
-
560
- 2. Output Interpretation
561
- - MUST explain significance of all outputs
562
- - Clear connection between code and results
563
- - Error cases covered
564
  - Expected vs actual results discussed
 
 
565
 
566
- 3. Breaking down Complexity
567
- - MUST divide complex topics into clear sub-components
568
  - Step-by-step explanation of difficult concepts
569
  - Clear progression in complexity
570
  - Logical organization of technical content
 
571
 
572
  Important:
573
- - Score 1 ONLY if ALL criteria for that category are met
 
574
  - Each citation must include exact timestamp and relevant quote
575
- - Citations should clearly demonstrate how criteria are/aren't met
576
- - Be strict and objective in scoring
577
- - Default to 0 if any doubt about meeting ALL criteria"""
 
578
 
579
  return prompt_template.format(
580
  transcript=transcript,
 
462
  marked_transcript += word + " "
463
  transcript = marked_transcript
464
 
465
+ prompt_template = """Analyze this teaching content with extremely strict evaluation criteria. Score 1 ONLY if ALL requirements are FULLY met with NO exceptions.
466
 
467
  Transcript:
468
  {transcript}
 
474
  {{
475
  "Concept Assessment": {{
476
  "Subject Matter Accuracy": {{
477
+ "Score": 1, # Score 1 ONLY if ALL technical information is 100% accurate with NO errors or oversimplifications
478
  "Citations": ["[MM:SS] Quote demonstrating accuracy or error"]
479
  }},
480
  "First Principles Approach": {{
481
+ "Score": 1, # Score 1 ONLY if EVERY concept is built from fundamentals with clear progression
482
  "Citations": ["[MM:SS] Quote showing fundamental concept explanation"]
483
  }},
484
  "Examples and Business Context": {{
485
+ "Score": 1, # Score 1 ONLY if 3+ relevant, detailed real-world examples are provided
486
  "Citations": ["[MM:SS] Quote containing practical example"]
487
  }},
488
  "Cohesive Storytelling": {{
489
+ "Score": 1, # Score 1 ONLY if ALL transitions are smooth with explicit connections between topics
490
  "Citations": ["[MM:SS] Quote showing topic transition or connection"]
491
  }},
492
  "Engagement and Interaction": {{
493
+ "Score": 1, # Score 1 ONLY if 3+ different engagement techniques are used effectively
494
  "Citations": ["[MM:SS] Quote showing audience engagement"]
495
  }},
496
  "Professional Tone": {{
497
+ "Score": 1, # Score 1 ONLY if language is consistently professional with NO casual expressions
498
  "Citations": ["[MM:SS] Quote demonstrating tone"]
499
  }}
500
  }},
501
  "Code Assessment": {{
502
  "Depth of Explanation": {{
503
+ "Score": 1, # Score 1 ONLY if EVERY code concept includes what, why, and implementation details
504
  "Citations": ["[MM:SS] Quote showing detailed code explanation"]
505
  }},
506
  "Output Interpretation": {{
507
+ "Score": 1, # Score 1 ONLY if ALL code outputs are explained with their significance and error cases
508
  "Citations": ["[MM:SS] Quote demonstrating output explanation"]
509
  }},
510
  "Breaking down Complexity": {{
511
+ "Score": 1, # Score 1 ONLY if ALL complex concepts are broken into clear, logical sub-components
512
  "Citations": ["[MM:SS] Quote showing concept breakdown"]
513
  }}
514
  }}
515
  }}
516
 
517
+ Extremely Strict Evaluation Criteria:
518
 
519
  Concept Assessment:
520
+ 1. Subject Matter Accuracy (Must meet ALL):
521
+ - Zero factual errors or technical inaccuracies
522
+ - No oversimplifications that could lead to misconceptions
523
+ - All technical terms used with precise definitions
524
+ - Complete and accurate explanations of all concepts
525
+ - Clear distinction between facts and opinions
526
+
527
+ 2. First Principles Approach (Must meet ALL):
528
+ - Every concept explicitly built from fundamental principles
529
+ - Clear progression from basic to advanced concepts
530
+ - No assumptions about prior knowledge
531
+ - Each building block thoroughly explained
532
+ - Logical sequence of concept introduction
533
+
534
+ 3. Examples and Business Context (Must meet ALL):
535
+ - Minimum 3 detailed, relevant real-world examples
536
+ - Each example directly tied to concept being taught
537
+ - Clear business value explanation for each example
538
+ - Practical implementation considerations discussed
539
+ - Industry-specific applications highlighted
540
+
541
+ 4. Cohesive Storytelling (Must meet ALL):
542
+ - Explicit connections between all related concepts
543
+ - Clear narrative thread throughout presentation
544
+ - Smooth transitions between all topics
545
+ - No unexplained topic jumps
546
+ - Consistent story arc from start to finish
547
+
548
+ 5. Engagement and Interaction (Must meet ALL):
549
+ - Minimum 3 different engagement techniques used
550
+ - Direct audience involvement opportunities
551
  - Clear checks for understanding
552
  - Interactive elements in presentation
553
+ - Varied teaching methods demonstrated
554
 
555
+ 6. Professional Tone (Must meet ALL):
556
+ - Zero casual or colloquial expressions
557
+ - Consistent technical vocabulary
558
  - Clear and confident delivery
559
+ - Appropriate level of formality
560
+ - No filler words or hesitations
561
 
562
  Code Assessment:
563
+ 1. Depth of Explanation (Must meet ALL):
564
+ - Every code concept explains what, why, and how
565
+ - Implementation details thoroughly covered
566
+ - Design decisions explicitly justified
567
+ - Performance implications discussed
568
+ - Best practices highlighted
569
+
570
+ 2. Output Interpretation (Must meet ALL):
571
+ - All code outputs explained with significance
572
+ - Error cases and edge cases covered
573
  - Expected vs actual results discussed
574
+ - Output validation methods explained
575
+ - Debugging approaches covered
576
 
577
+ 3. Breaking down Complexity (Must meet ALL):
578
+ - All complex concepts divided into clear sub-components
579
  - Step-by-step explanation of difficult concepts
580
  - Clear progression in complexity
581
  - Logical organization of technical content
582
+ - Dependencies and relationships explained
583
 
584
  Important:
585
+ - Score 1 ONLY if ALL criteria for that category are fully met
586
+ - ANY missing element results in a score of 0
587
  - Each citation must include exact timestamp and relevant quote
588
+ - Citations must clearly demonstrate how criteria are/aren't met
589
+ - Be extremely strict and objective in scoring
590
+ - When in doubt, score 0
591
+ - No partial credit - all requirements must be met for a score of 1"""
592
 
593
  return prompt_template.format(
594
  transcript=transcript,