Files changed (1) hide show
  1. main.py +13 -6
main.py CHANGED
@@ -219,22 +219,28 @@ async def generate_question(request: QuestionRequest):
219
  f"{history_text}\n\n"
220
  f"{encouragement_note}\n\n"
221
  f"TASK:\n"
222
- f"- Ask ONE deep technical question about {session.track_name}.\n"
223
- f"- Focus on: Core Concepts, Internal Architecture, Performance Optimization, or Differences (e.g., X vs Y).\n"
224
- f"- The question must be challenging and suitable for a {session.difficulty} level.\n"
 
 
 
 
 
 
225
  f"- DO NOT ask general or soft-skill questions. NO 'tell me about yourself'.\n"
226
  f"- DO NOT repeat any question from the list above.\n\n"
227
  f"OUTPUT RULE:\n"
228
  f"- Output ONLY the response text. No labels like 'Question:' or 'Feedback:'."
229
  f"TASK: Generate Question #{questions_count + 1} for a {session.difficulty} candidate. "
230
- "Strictly follow the SCENARIO atmosphere. Do not repeat questions."
231
  )
232
 
233
  try:
234
  output = client.chat_completion(
235
  [{"role": "user", "content": prompt}],
236
  max_tokens=200,
237
- temperature=0.8
238
  )
239
  raw_q = output.choices[0].message.content.strip()
240
  clean_q = clean_api_response(raw_q)
@@ -261,8 +267,9 @@ async def evaluate_answer(data: AnswerSubmission):
261
  f"- Score 0-4: Wrong or 'I don't know'.\n"
262
  f"- Score 5-7: Correct but shallow.\n"
263
  f"- Score 8-10: Detailed and precise.\n\n"
 
264
  f"OUTPUT FORMAT (STRICT): SCORE: <0-10> || EMOTION: <Type> || FEEDBACK: <Your direct response>\n"
265
- f"Note: Emotion: (Natural, Happy, Disappointed, Excited, or Confused)."
266
  )
267
 
268
  try:
 
219
  f"{history_text}\n\n"
220
  f"{encouragement_note}\n\n"
221
  f"TASK:\n"
222
+ f"- Ask ONE unique technical question about {session.track_name}.\n"
223
+ f"- Make every interview feel different from previous interviews whenever possible.\n"
224
+ f"- Avoid common or overused interview questions.\n"
225
+ f"- Prefer questions from different technical subtopics instead of repeatedly choosing the same concept.\n"
226
+ f"- Vary the topic and wording naturally every time.\n"
227
+ f"- Junior candidates should receive only beginner-level questions.\n"
228
+ f"- Mid-level candidates should mostly receive intermediate questions, but may occasionally receive beginner-level questions to verify fundamentals.\n"
229
+ f"- Senior candidates should mostly receive advanced questions, but may occasionally receive intermediate or beginner-level questions to verify strong fundamentals.\n"
230
+ f"- Focus on topics appropriate for the candidate level, such as core concepts, terminology, comparisons, architecture, performance, or other relevant technical areas.\n"
231
  f"- DO NOT ask general or soft-skill questions. NO 'tell me about yourself'.\n"
232
  f"- DO NOT repeat any question from the list above.\n\n"
233
  f"OUTPUT RULE:\n"
234
  f"- Output ONLY the response text. No labels like 'Question:' or 'Feedback:'."
235
  f"TASK: Generate Question #{questions_count + 1} for a {session.difficulty} candidate. "
236
+ "Strictly follow the SCENARIO atmosphere. Make every interview unique by varying the topic and wording naturally. Avoid starting interviews with the same question."
237
  )
238
 
239
  try:
240
  output = client.chat_completion(
241
  [{"role": "user", "content": prompt}],
242
  max_tokens=200,
243
+ temperature=1.0
244
  )
245
  raw_q = output.choices[0].message.content.strip()
246
  clean_q = clean_api_response(raw_q)
 
267
  f"- Score 0-4: Wrong or 'I don't know'.\n"
268
  f"- Score 5-7: Correct but shallow.\n"
269
  f"- Score 8-10: Detailed and precise.\n\n"
270
+ f"Use ONLY these emotions: Happy, Natural, Sad, Excited, Angry, Disappointed, Confused.\n"
271
  f"OUTPUT FORMAT (STRICT): SCORE: <0-10> || EMOTION: <Type> || FEEDBACK: <Your direct response>\n"
272
+ f"Return ONLY one emotion exactly as written above. Do not invent new emotions or synonyms."
273
  )
274
 
275
  try: