IW2025 commited on
Commit
8dff4c0
·
verified ·
1 Parent(s): 47472cd

Update llm_app_enhanced.py

Browse files
Files changed (1) hide show
  1. llm_app_enhanced.py +12 -18
llm_app_enhanced.py CHANGED
@@ -428,25 +428,19 @@ Thanks! Slide number:"""
428
  Here's what the curriculum slide says about it:
429
  {slide_content}
430
  Could you help me explain this to them in a friendly, educational way? I'd like you to:
431
- - Break it down in simple terms with comprehensive explanations
432
- - Use examples if the slide has them, and add more examples if needed
433
- - Make it step-by-step and easy to follow
434
- - Add helpful context and real-world applications
435
- - Use bullet points or lists to make it clear
436
- - Make sure your answer directly addresses what they asked
437
- - ALWAYS include practical code examples with explanations
438
- - Show multiple variations of the concept
439
- - Include common mistakes and how to avoid them
440
- - Provide practice exercises or challenges
441
- - Be comprehensive, detailed, and educational
442
- - Make it engaging and interesting to read
443
 
444
  Format your response with:
445
- - Clear headings and sections
446
- - Code examples in proper code blocks
447
- - Step-by-step explanations
448
- - Visual organization with bullet points
449
- - Practical applications and use cases
450
 
451
  Thanks for your help! Here's what I'd tell the student:"""
452
 
@@ -577,7 +571,7 @@ Thanks for your help! Here's what I'd tell the student:"""
577
  # Get LLM's answer
578
  response = self.anthropic_client.messages.create(
579
  model="claude-3-5-haiku-20241022",
580
- max_tokens=2000,
581
  temperature=0.7,
582
  messages=[{"role": "user", "content": prompt}]
583
  )
 
428
  Here's what the curriculum slide says about it:
429
  {slide_content}
430
  Could you help me explain this to them in a friendly, educational way? I'd like you to:
431
+ - Use the curriculum slide content as your main reference
432
+ - Keep explanations concise but clear
433
+ - Include practical code examples when relevant
434
+ - Make it easy to follow and understand
435
+ - Focus on the key concepts from the slide
436
+ - Add helpful examples if the slide doesn't have them
437
+ - Keep it engaging but not overwhelming
 
 
 
 
 
438
 
439
  Format your response with:
440
+ - Clear, simple explanations
441
+ - Code examples in proper code blocks when helpful
442
+ - Use the slide content as your foundation
443
+ - Keep it concise and focused
 
444
 
445
  Thanks for your help! Here's what I'd tell the student:"""
446
 
 
571
  # Get LLM's answer
572
  response = self.anthropic_client.messages.create(
573
  model="claude-3-5-haiku-20241022",
574
+ max_tokens=1200,
575
  temperature=0.7,
576
  messages=[{"role": "user", "content": prompt}]
577
  )