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

Update prompt engineering

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -140,25 +140,29 @@ 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
  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
 
 
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
+ specifics = f'Tailor your questions based on what {config.company} might ask candidates for {config.job_role} roles.'
144
  evaluation_criteria = f'Thoroughly evaluate the candidate based on what {config.company} values in candidates for {config.job_role} roles.'
145
  elif config.job_role:
146
  purpose = f'You are AiMI, an AI mock interviewer for {config.job_role} roles.'
147
+ specifics = f'Tailor your questions based on what most companies might ask candidates for {config.job_role} roles.'
148
  evaluation_criteria = f'Thoroughly evaluate the candidate based on what most companies value in candidates for {config.job_role} roles.'
149
  elif config.company:
150
  purpose = f'You are AiMI, an AI mock interviewer for roles at {config.company}.'
151
+ specifics = f'Tailor your questions based on what {config.company} might ask candidates.'
152
  evaluation_criteria = f'Thoroughly evaluate the candidate based on what {config.company} values in candidates.'
153
  else:
154
  purpose = 'You are AiMI, an AI mock interviewer.'
155
+ specifics = ''
156
  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.'
157
 
158
  if config.job_description:
159
+ posting_specifics = f'Also tailor your questions based on the following job posting: {config.job_description}.'
160
  else:
161
+ posting_specifics = ''
162
 
163
 
164
  return f'''
165
+ {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} {posting_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.
166
 
167
  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).
168