Imarticuslearning commited on
Commit
cf7b0d7
·
verified ·
1 Parent(s): 362e2ef

Prompt adjustment

Browse files
Files changed (1) hide show
  1. app.py +31 -25
app.py CHANGED
@@ -390,38 +390,44 @@ def evaluate_answers():
390
  else: # --- NON-HR (Analytics, Finance) Evaluation Logic ---
391
  base_assessment_criteria_qualitative_non_hr = """
392
  For the OVERALL qualitative summary, assess responses based on:
393
- - Conceptual Understanding (effort and relevance more than perfect accuracy for the level)
394
- - Communication Clarity (can the core idea be understood?)
395
- - Depth of Explanation (relative to expected level)
396
- - Use of Examples (if any, and if appropriate for the level)
397
- - Logical Flow (is there a basic structure or train of thought?)
398
  """
399
  per_question_scoring_guidelines_non_hr = f"""
400
- For EACH question and its answer, provide a score from 0 to 5 points.
401
- The candidate is at a {level_string} level.
402
- Consider the following when assigning the per-question score:
403
- - Effort: Did the candidate attempt a meaningful answer, even if partially incorrect?
404
- - Relevance: Is the response at least partially related to the question topic?
405
- - Clarity of thought for the candidate's level.
406
- - Basic logical structure.
407
- - Use of examples, if any were given and appropriate.
 
 
 
 
 
 
 
 
 
408
  """
 
409
  if level_string == "beginner":
410
  level_specific_instructions_non_hr = """
411
- You are an **extremely understanding, encouraging, and supportive** interview evaluator for a **BEGINNER/FRESHER**. Your primary goal is to **build confidence**.
412
- **Scoring Guidelines for Beginners (0-5 points per question):**
413
- - **5 points:** Accurate, clear, and well-structured answer. Shows clear effort and basic understanding.
414
- - **4 points:** Mostly correct with minor gaps or unclear phrasing.Good attempt, relevant, shows some understanding or key terms (e.g., one/two relevant words).
415
- - **3 points:** Partially correct with evident effort, but lacks clarity or completeness.
416
- - **1-2 points:** Minimal effort, mostly irrelevant, but an attempt beyond silence.
417
- - **0 points:** Candidate explicitly says "I don’t know", "I'm not sure", or provides placeholder/non-answers. No relevant effort or understanding shown.Incorrect or unrelated.
418
- Provide VERY positive feedback.
419
  """
420
  elif level_string == "intermediate":
421
- level_specific_instructions_non_hr = """Supportive evaluator for **INTERMEDIATE**. Scoring (0-5): 5=Correct/Clear; 3-4=Mostly correct; 1-2=Partial/Gaps; 0=Incorrect."""
422
- else: # Advanced
423
- level_specific_instructions_non_hr = """Discerning evaluator for **ADVANCED**. Scoring (0-5): 5=Accurate/Comprehensive; 3-4=Correct lacks nuance; 1-2=Inaccurate; 0=Fundamentally incorrect."""
424
-
 
 
 
425
  evaluation_prompt_template_non_hr = f"""
426
  {level_specific_instructions_non_hr}
427
  {per_question_scoring_guidelines_non_hr}
 
390
  else: # --- NON-HR (Analytics, Finance) Evaluation Logic ---
391
  base_assessment_criteria_qualitative_non_hr = """
392
  For the OVERALL qualitative summary, assess responses based on:
393
+ - Conceptual Understanding (effort and relevance more than perfect accuracy for the level)
394
+ - Communication Clarity (can the core idea be understood?)
395
+ - Depth of Explanation (relative to expected level)
396
+ - Use of Examples (if any, and if appropriate for the level)
397
+ - Logical Flow (is there a basic structure or train of thought?)
398
  """
399
  per_question_scoring_guidelines_non_hr = f"""
400
+ For EACH question and its answer, provide a score from 0 to 5 points.
401
+ The candidate is at a {level_string} level.
402
+ Scoring should reflect your role as a balanced evaluator — neither too lenient nor too harsh. Use wisdom and professional judgment.
403
+
404
+ Consider the following when assigning the score:
405
+ - Effort: Was there a genuine attempt to answer meaningfully?
406
+ - Relevance: Is the response at least partially on-topic?
407
+ - Clarity: Is the main idea understandable?
408
+ - Logic: Does the response have a clear train of thought?
409
+ - Examples: Were examples used when appropriate?
410
+
411
+ Scoring Rubric:
412
+ - **5 points:** Clear, relevant, and reasonably accurate with good structure. Shows understanding and effort.
413
+ - **4 points:** Mostly correct with minor gaps or unclear phrasing. Shows some grasp and engagement.
414
+ - **3 points:** Partially correct or somewhat vague, but a fair attempt is made.
415
+ - **1–2 points:** Minimal relevance or weak structure, but not entirely blank or off-topic.
416
+ - **0 points:** Candidate says “I don’t know,” “not sure,” or gives unrelated/placeholder text.
417
  """
418
+
419
  if level_string == "beginner":
420
  level_specific_instructions_non_hr = """
421
+ You are a **supportive but realistic evaluator** for a **BEGINNER/FRESHER**. Encourage growth and confidence, but give honest scores based on visible effort, relevance, and basic understanding.
 
 
 
 
 
 
 
422
  """
423
  elif level_string == "intermediate":
424
+ level_specific_instructions_non_hr = """
425
+ You are a **professional and balanced evaluator** for an **INTERMEDIATE** candidate. Score honestly based on clarity, partial correctness, and application effort.
426
+ """
427
+ else: # advanced
428
+ level_specific_instructions_non_hr = """
429
+ You are a **discerning but fair evaluator** for an **ADVANCED** candidate. Expect depth and accuracy, but score reasonably when structure and effort are evident.
430
+ """
431
  evaluation_prompt_template_non_hr = f"""
432
  {level_specific_instructions_non_hr}
433
  {per_question_scoring_guidelines_non_hr}