Yaswanth sai
Initial setup with fine-tuned model and application code
95a008c
def format_prompt_for_hint(task_description: str, code_snippet: str, mode: str = 'concise') -> str:
instruction = (
"Provide a concise, helpful hint based on the user's code (no code, only conceptual advice or guiding question) in one line."
if mode == 'concise'
else "Provide a detailed, helpful hint (conceptual advice, guiding questions, or pointing to specific areas to check) to help the user solve the problem. Do not provide the full code solution."
)
return (
f"Task Description:\n{task_description}\n\n"
f"User's Code:\n{code_snippet}\n\n"
f"You are an AI-HR Assistant. {instruction}\n"
"HINT:"
)
def format_prompt_for_feedback(task_description: str, code_snippet: str, mode: str = 'concise') -> str:
instruction = (
"Provide concise feedback on the user's code approach, identifying potential issues or areas for improvement in 1-2 sentences."
if mode == 'concise'
else "Provide detailed feedback on the user's code. Analyze its correctness, efficiency, style, and potential edge cases. Suggest specific improvements or alternative approaches if applicable. Do not provide the full corrected code."
)
return (
f"Task Description:\n{task_description}\n\n"
f"User's Code:\n{code_snippet}\n\n"
f"You are an AI-HR Assistant. {instruction}\n"
"FEEDBACK:"
)
def format_prompt_for_followup(task_description: str, code_snippet: str) -> str:
return (
f"Task Description:\n{task_description}\n\n"
f"User's Code:\n{code_snippet}\n\n"
"You are an AI-HR Assistant. Based on the user's code, create a *follow-up* question that:\n"
"- Encourages deeper thinking about the submitted code.\n"
"- Asks about possible optimizations, improvements, edge cases, time complexity, or alternative approaches.\n"
"- Is related directly to the user's code (not a new or different task).\n"
"- The question should be open-ended and thought-provoking."
)