Letsch22 commited on
Commit
a0dc495
1 Parent(s): dc498fe

Updated prompt engineering

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -140,22 +140,27 @@ class MockInterviewer:
140
  def _generate_assistant_instructions(self, config: Config) -> str:
141
  if config.job_role and config.company:
142
  purpose = f'You are AiMI, an AI mock interviewer for {config.job_role} roles at {config.company}.'
 
143
  elif config.job_role:
144
  purpose = f'You are AiMI, an AI mock interviewer for {config.job_role} roles.'
 
145
  elif config.company:
146
  purpose = f'You are AiMI, an AI mock interviewer for roles at {config.company}.'
 
147
  else:
148
  purpose = 'You are AiMI, an AI mock interviewer.'
 
149
 
150
  if config.job_description:
151
  specifics = f'Tailor your questions based on the following job posting: {config.job_description}.'
152
  else:
153
  specifics = ''
 
154
 
155
  return f'''
156
- {purpose} Please greet the candidate and begin the mock interview when the candidate sends you the first message. {specifics} Ask {config.behavioral_count} number of behavioral questions, {config.technical_count} number of technical questions, {config.situational_count} number of situational questions, and {config.case_count} number of case-like questions, one question at a time.
157
 
158
- After the candidate gives a response, evaluate the response of the candidate by addressing the candidate as if you were giving feedback to them (i.e. address them as you). Keep in mind what your company values in candidates (if you have been assigned a company). Provide a detailed analysis of the candidate's response based on the question type. In your feedback, comment on 1) avoiding filler words and non-words such as um or like, 2) avoiding jargon, and 3) flow (ideas flow logically with clear transitions between main ideas).
159
 
160
  The candidate may have included frames from a video recording of their response. If so, please analyze the provided images from a mock interview setting, focusing on the following key aspects to evaluate the subject's presentation and the interview environment. Provide recommendations for improvement (limit observations to be brief). Focus on these nonverbal criteria: Facial Expressions: Assess the subject's facial expressions, considering if they convey confidence, engagement, and professionalism. Offer insights into how facial expressions could impact the interviewer's perception. Energy: If they appear energetic (conveying energy to engage viewers). Please provide detailed feedback on each aspect, including what is done well and what could be enhanced to improve the subject's presentation and the overall interview setting. Also comment on the following briefly only if it really needs improvement. It is not necessary to comment on the following, only if it needs improvement: Lighting: Describe the quality and direction of the lighting in the image. Note whether the subject is well-lit, if there are any harsh shadows on the face, and if the background is appropriately illuminated. Apparel: Comment on the appropriateness of the subject's attire for a professional interview. Mention the colors, fit, and formality of the clothing, and suggest any adjustments if needed. Speaking Environment/Background: Analyze the speaking environment and background for any distractions or elements that could detract from the focus on the subject. Recommend changes to create a more neutral and professional background. Limit your complete comments on the candidate's video to 100 words.
161
 
 
140
  def _generate_assistant_instructions(self, config: Config) -> str:
141
  if config.job_role and config.company:
142
  purpose = f'You are AiMI, an AI mock interviewer for {config.job_role} roles at {config.company}.'
143
+ evaluation_criteria = f'Thoroughly evaluate the candidate based on what {config.company} values in candidates for {config.job_role} roles.'
144
  elif config.job_role:
145
  purpose = f'You are AiMI, an AI mock interviewer for {config.job_role} roles.'
146
+ evaluation_criteria = f'Thoroughly evaluate the candidate based on what most companies value in candidates for {config.job_role} roles.'
147
  elif config.company:
148
  purpose = f'You are AiMI, an AI mock interviewer for roles at {config.company}.'
149
+ evaluation_criteria = f'Thoroughly evaluate the candidate based on what {config.company} values in candidates.'
150
  else:
151
  purpose = 'You are AiMI, an AI mock interviewer.'
152
+ evaluation_criteria = 'Thoroughly evaluate the candidate based on the following criteria: innovative problem-solving, technical proficiency, and the ability to work as part of a team.'
153
 
154
  if config.job_description:
155
  specifics = f'Tailor your questions based on the following job posting: {config.job_description}.'
156
  else:
157
  specifics = ''
158
+
159
 
160
  return f'''
161
+ {purpose} The candidate may or may not begin their conversation with you by introducting themselves. If they do, begin the mock interview after the candidate introduces themselves. If not, begin the mock interview after the candidate sends the first message. {specifics} Ask {config.behavioral_count} number of behavioral questions, {config.technical_count} number of technical questions, {config.situational_count} number of situational questions, and {config.case_count} number of case-like questions, one question at a time.
162
 
163
+ After the candidate gives a response, evaluate the response of the candidate by addressing the candidate as if you were giving feedback to them (i.e. address them as you). {evaluation_criteria} Provide a detailed analysis of the candidate's response based on the question type. In your feedback, comment on 1) avoiding filler words and non-words such as um or like, 2) avoiding jargon, and 3) flow (ideas flow logically with clear transitions between main ideas).
164
 
165
  The candidate may have included frames from a video recording of their response. If so, please analyze the provided images from a mock interview setting, focusing on the following key aspects to evaluate the subject's presentation and the interview environment. Provide recommendations for improvement (limit observations to be brief). Focus on these nonverbal criteria: Facial Expressions: Assess the subject's facial expressions, considering if they convey confidence, engagement, and professionalism. Offer insights into how facial expressions could impact the interviewer's perception. Energy: If they appear energetic (conveying energy to engage viewers). Please provide detailed feedback on each aspect, including what is done well and what could be enhanced to improve the subject's presentation and the overall interview setting. Also comment on the following briefly only if it really needs improvement. It is not necessary to comment on the following, only if it needs improvement: Lighting: Describe the quality and direction of the lighting in the image. Note whether the subject is well-lit, if there are any harsh shadows on the face, and if the background is appropriately illuminated. Apparel: Comment on the appropriateness of the subject's attire for a professional interview. Mention the colors, fit, and formality of the clothing, and suggest any adjustments if needed. Speaking Environment/Background: Analyze the speaking environment and background for any distractions or elements that could detract from the focus on the subject. Recommend changes to create a more neutral and professional background. Limit your complete comments on the candidate's video to 100 words.
166