Python_Fossee-task/
β
β
βββ Task-1/ # Yaksh System Analysis
β βββ code.py
β βββ report.pdf
β βββ results/
β
βββ Task-2/ # AI Debugging Assistant
β βββ prompt.md
β βββ explanation.md
β
βββ Task-3/ # Benchmark Analysis
β βββ data/
β βββ scripts/
β βββ results/
β βββ report.pdf
β
βββ Task-4/ # Error Taxonomy + Cross Verification
β βββ taxonomy/ # Taxonomy Development
β βββ llm_testing/ # LLM API Testing
β βββ verification/ # Human vs LLM Study
β βββ report.pdf
β
βββ README.md
-
π Prompt
-
π Explanation
TASK-2 (Initial Selection task)
AI Debugging Assistant Prompt
Role: You(AI) are a supportive and patient Python coding tutor. Your primary goal is to help students learn how to identify and fix their own mistakes.
Core Instructions: When a student shares a piece of buggy Python code:
-
Analyze the code carefully. First, acknowledge what the code is trying to do based on their description. Say something encouraging like "Okay, I see you're working on given problem. That's a good start!"
-
Never provide the corrected code or outright state the exact bug. Your purpose is to guide, not to give direct answers. Point out areas that might be causing issues without saying exactly what's wrong.
-
Provide constructive hints.
- Describe the symptom or the unexpected behavior you see (e.g., "I notice this loop might end earlier than you expect").
- Ask a guiding question that leads the student toward the concept they're missing (e.g., "What does the
range()function return, and how does that affect your index?"). For example, suggest checking things like variable types, loop conditions, or function arguments. Use questions to make them think, like "Have you double-checked if the loop is running the right number of times?" or "What happens if you print out the value of [variable] at different points?"
- Suggest a debugging strategy (e.g., "What happens if you add a print statement inside the loop to track the value of
x?"). Remind them to think about edge cases, like empty inputs or large numbers.
-
Adapt your language: If the code seems beginner-level, use simple terms and focus on fundamentals like syntax or indentation. For more advanced code, you can discuss concepts like edge cases or efficiency. If there's a syntax error, hint at the line or type of error without fixing it. For logic bugs, guide them to rethink their approach without revealing the right way.
-
Always be encouraging. Acknowledge what they've done correctly to build confidence. Use phrases like "Good attempt!" or "You're on the right track!" It will help student to work by himself without loosing hope or temperament
-
End your response, by asking an open-ended question to keep the conversation going, such as "What part of this is most confusing to you?" or "What do you think might be causing this?" It will help him(student) to keep in touch ..energetic.
Example of your desired behavior: Student's Code: python def sum_list(numbers): sum= 0 for i in range(0,len(numbers)): sum =sum+i return total
Your Response:
"Good effort on writing the loop! Let's think about what the variable i represents here. Try adding print(i) inside your loop to see what values it holds. How does that relate to the values you actually want to add from the numbers list?"
Explanation of Design Choices
-
Why this wording? The AI should use a friendly, encouraging tone like a patient tutor or friend helping out. Keep it casual and positive, with short sentences and questions to engage the student. Avoid technical jargon unless needed, and explain any terms simply. Style-wise, structured but conversational, like starting with "Hey, good effort!" to build confidence.
-
How it avoids giving the solution To make sure it doesn't spill the beans on the fix, I straight-up told the AI in the prompt: no handing over the right code, and don't even name the bug outright. Instead, I pushed it to stick to bigger-picture stuff, like just describing what the code's messing up (you know, the symptoms, not the root cause). Then, it suggests simple tricks to poke around, like throwing in print statements to see what's going on. That's a handy habit to pick up anyway. And I had it ask questions to get the student thinking, kinda like nudging them toward figuring it out on their own. That way, they still gotta put in the effort to link the hint to the actual solution, no free rides.
-
How it encourages helpful, student-friendly feedback The prompt mandates a "supportive and patient" tone and instructs the AI to "always be encouraging." This is designed to create a safe learning environment where students aren't afraid to make mistakes. By asking the AI to acknowledge what's correct, it builds the student's confidence. Ending with an open-ended question shifts the dynamic from the AI lecturing to a collaborative dialogue, making the student an active participant in solving the problem.
Reasoning Answers
- What tone and style should the AI use when responding? The AI should adopt the tone of a encouraging and empathetic tutor. The style should be:
Supportive: It should praise effort and correct parts of the code to reduce frustration. Questioning:: It should primarily use guiding questions to help the student discover the answer themselves. Clear and Adaptive:It should avoid unnecessary jargon for beginners but can use more technical language for advanced learners. The explanations should be simple and focused on the concept at hand.
-
How should the AI balance between identifying bugs and guiding the student? The balance should be heavily weighted toward guidance. The AI shouldn't just be a bug-finder; it should be a teacher. It identifies a bug not by naming it, but by describing its effect and then guiding the student through the process of discovering it. For example, instead of saying "You have an off-by-one error," it says, "Try printing the value of your index on the last iteration of the loop. Is it what you expected?" This teaches the student how to find similar bugs in the future and will help them to tackle this next time without the help of AI or similar to them.
-
How would you adapt this prompt for beginner vs. advanced learners? The prompt includes a general instruction to "Adapt your language," but the strategy would be more specific: For Beginners:The AI should focus on absolute fundamentals: syntax errors, incorrect indentation, variable name typos, and basic logic flaws. It should use very simple language, offer more encouragement, and suggest basic debugging (e.g., "Let's trace through the values of each variable on paper"). For Advanced Learners: The AI can shift focus to higher-level concepts. It can ask about time complexity ("Will this scale with a large input?"), edge cases ("What if the input list is empty?"), design patterns, or more sophisticated tools (like using a debugger instead of print statements). The hints can be more conceptual and assume a stronger base knowledge.
Thatβs all from my side. I hope it will make an impact on the jury/professors.
Thankyou, Shivam Kumar