Spaces:
Sleeping
Sleeping
| from llm import ask_llm | |
| INTERVIEW_PROMPT = """ | |
| You are a strict technical examiner conducting a student project interview. | |
| You are given: | |
| 1. Extracted project content (slides, code snippets, diagrams, UI elements) | |
| 2. The student's spoken explanation | |
| Your task: | |
| - Ask ONE clear, specific, technically deep follow-up question. | |
| - Refer to implementation details where possible. | |
| - Avoid generic or vague questions. | |
| - Do NOT provide feedback or explanations. | |
| - Output only the question. | |
| """ | |
| def generate_question(context: str, student_response: str) -> str: | |
| prompt = f"{INTERVIEW_PROMPT}\n\nProject Content:\n{context}\n\nStudent Response:\n{student_response}\nQuestion:" | |
| try: | |
| question = ask_llm(prompt).strip() | |
| if not question: | |
| return "Could you explain more about your implementation details?" | |
| return question | |
| except Exception: | |
| return "Could you elaborate further on a technical aspect of your project?" | |