Skip to content

Commit f0459e0

Browse files
DMP '25 Final Report by Harshit Verma (#420)
* DMP '25 Final Report by Harshit Verma * Update final report - Add docd PR. - Update demo video link. - fix image url. * Remove bolded text
1 parent 00240e1 commit f0459e0

File tree

4 files changed

+178
-0
lines changed

4 files changed

+178
-0
lines changed
146 KB
Loading
269 KB
Loading
303 KB
Loading
Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
---
2+
title: "DMP ’25 Final Report by Harshit Verma"
3+
excerpt: "Final Report for the project LLM Powered Debugger for Pippy"
4+
category: "DEVELOPER NEWS"
5+
date: "2025-09-08"
6+
slug: "2025-09-08-dmp-25-therealharshit-final-report"
7+
author: "@/constants/MarkdownFiles/authors/harshit-verma.md"
8+
tags: "dmp25,sugarlabs,final report,therealharshit"
9+
image: "assets/Images/c4gt_DMP.webp"
10+
---
11+
12+
<!-- markdownlint-disable -->
13+
14+
# DMP '25 Final Report by Harshit Verma
15+
16+
## Contributor Details
17+
18+
**Name:** Harshit Verma
19+
20+
**GitHub:** [therealharshit](https://github.com/therealharshit)
21+
**Organization:** [Sugar Labs](https://www.sugarlabs.org/)
22+
**Project:** [LLM-powered Debugger for Pippy](https://github.com/sugarlabs/Pippy/issues/95)
23+
**Mentors:** [Walter Bender](https://github.com/walterbender), [Ibiam Chihurumnaya](https://github.com/chimosky), [Kshitij Shah](https://github.com/kshitijdshah99)
24+
25+
26+
## Introduction
27+
28+
Debugging is one of the most challenging parts of programming for beginners, especially children who are just starting their coding journey. While many Large Language Models (LLMs) are marketed as tools that “write code for you,” they also have great potential to guide learners through the process of understanding and fixing errors in their code.
29+
30+
The Pippy Debugger project was developed to harness this potential by integrating an LLM-powered debugger into the Pippy Activity which is a Python learning environment in Sugar. The goal was not just to provide solutions, but to teach children how to debug, giving them context, explanations, and guidance in an age-appropriate manner.
31+
32+
33+
## Objectives
34+
35+
- To integrate an LLM-powered debugger within the Pippy Activity.
36+
- To make debugging accessible, engaging, and educational for children.
37+
- To provide contextual feedback that helps learners understand the purpose of their code before debugging.
38+
- To ensure seamless integration with Sugar AI, allowing Pippy to use centralized inference endpoints.
39+
- To design a system where debugging history is saved to the Journal, enabling reflection and learning over time.
40+
41+
42+
## Background
43+
44+
Many debugging tools are built for professional developers and are often too complex for beginners. Existing LLM applications primarily focus on code generation, while their educational potential for debugging remains underexplored.
45+
46+
The proposed Pippy Debugger builds on the idea of guiding learners through a debugging journey rather than spoon-feeding solutions. By integrating with Pippy and Sugar AI:
47+
- Learners see the context of their code before debugging starts. .
48+
- The output is filtered and age-appropriate for children.
49+
50+
## Methodology
51+
52+
### Tools & Technologies Used
53+
54+
- **Python** – Core programming language.
55+
- **FastAPI** – Backend framework for the `/debug` endpoint.
56+
- **LangChain** – To chain multiple LLM calls for better workflows.
57+
- **Hugging Face Transformers** – For integrating **Mistral 7B**.
58+
- **Google Gen AI** – For running **Gemma-3-27B-IT**.
59+
- **GTK 3** – For UI integration in Pippy.
60+
- **Sugar AI** – Central inference system connecting Pippy with LLMs.
61+
- **Custom Markdown Parser** – To render responses in the Debug Terminal.
62+
63+
### Workflow
64+
1. Learner writes Python code in Pippy.
65+
2. On clicking Debug, the code is sent to the `/debug` endpoint in Sugar AI.
66+
3. The backend processes the request, retrieves model inference, and formats the response.
67+
4. The response is contextualized, simplified, and displayed in a debugging terminal inside Pippy.
68+
5. Debug history (code, errors, suggestions) is saved into the Journal for future reflection.
69+
70+
## Technical Implimentation
71+
72+
### **Phase 1 (Week 1 – Week 3): Exploration & Setup**
73+
- Studied the Pippy codebase and its integration with Sugar.
74+
- Explored Sugar AI and tested existing endpoints.
75+
- Evaluated multiple LLM options (CodeLlama, Mistral via Ollama).
76+
- Mentor suggested moving inference to Hugging Face models.
77+
- Improved base prompt design for debugging tips.
78+
- Experimented with different ways of displaying debugging responses.
79+
80+
---
81+
82+
### **Phase 2 (Week 4 – Week 6): Backend Development & UI Integration**
83+
- Set up a FastAPI server with a `/debug` endpoint.
84+
- Integrated Mistral 7B model through Hugging Face for debugging.
85+
- Added Run and Debug buttons in the Pippy UI.
86+
- Built a debugging terminal in GTK.
87+
- Implemented contextualization – showing learners the code context before debugging starts.
88+
- Raised a PR in Sugar AI for `/debug` endpoint.
89+
- Learned LangChain for chaining LLM calls into a structured workflow.
90+
91+
---
92+
93+
### **Phase 3 (Week 7 – Week 9): Refinement & Sugar AI Integration**
94+
- Prepared and presented midterm PPT for DMP evaluation.
95+
- Continued developing and refining the `/debug` endpoint in Sugar AI.
96+
- Completed integration of `/debug` endpoint.
97+
- Tested debugging responses on various buggy Python codes.
98+
- Found that some responses were too technical → began refining prompt workflow.
99+
100+
---
101+
102+
### **Phase 4 (Week 10 – Week 12): Optimization**
103+
- Shifted to a larger model (Gemma-3-27B-IT) for more age-appropriate responses.
104+
- Improved prompt workflows to simplify explanations for children.
105+
- Enhanced Markdown parser for better formatting in the debugging terminal.
106+
- Began work on saving debug history to the Sugar Journal.
107+
- Designed a JSON-based structure for storing session details (code, error, AI suggestions).
108+
- Partially implemented prototype for saving and retrieving debug logs.
109+
110+
## Demonstrations
111+
112+
### UI Implimentation
113+
114+
- Updated Pippy UI:
115+
![Pippy UI](assets/Images/Pippy-UI01.png)
116+
117+
- Debugging terminal with LLM response:
118+
1. ![Debug Terminal](assets/Images/Pippy-UI02.png)
119+
120+
2. ![Debug Terminal](assets/Images/Pippy-UI03.png)
121+
122+
123+
### Project Demo
124+
**[Watch Video](https://drive.google.com/file/d/1APnZja9uzX197zNhyT4xZ2wRJTvH0wIN/view?usp=sharing)**
125+
126+
## Resources
127+
128+
### Code Repositories
129+
130+
- **[Pippy Debugger Backend](https://github.com/sugarlabs/pippy-debugger-backend)**
131+
- **[Sugar AI](https://github.com/sugarlabs/sugar-ai)**
132+
- **[Pippy](https://github.com/sugarlabs/Pippy)**
133+
134+
### Pull Requests
135+
- **[Sugar AI: Add /debug endpoint for Pippy Debugger #28](https://github.com/sugarlabs/sugar-ai/pull/28)**
136+
- **[Pippy: Pippy Debugger Integration #113](https://github.com/sugarlabs/Pippy/pull/113)**
137+
- **[Help Activity: Add Debugger docs to Pippy #121](https://github.com/godiard/help-activity/pull/121)**
138+
139+
### Docs
140+
- **[Responses from the Debugger](https://docs.google.com/document/d/1zy0udbisHH9ZMHo3ln6tbKVYhPTRfw4cs9N0g3W_CKg/edit?usp=sharing)**
141+
142+
### Blogs
143+
144+
- **[Weekly Blogs](https://www.sugarlabs.org/authors/harshit-verma)**
145+
146+
147+
## Key Learnings
148+
149+
### Frameworks and Tools
150+
- Gained hands-on experience with FastAPI by building and refining the `/debug` endpoint.
151+
- Learned to integrate LangChain for chaining multiple LLM calls and improving prompt workflows.
152+
- Worked with Hugging Face Transformers and Google Gen AI APIs to run and test LLMs like Mistral 7B and Gemma-3-27B-IT.
153+
- Built a custom Markdown parser and explored GTK 3 widgets for UI integration in Pippy.
154+
155+
### APIs and Backend Development
156+
- Improved understanding of designing API request/response schemas to enable clean communication between Sugar-AI and Pippy.
157+
- Implemented error handling, response validation, and threading for a more reliable and responsive system.
158+
159+
### Prompt Engineering
160+
- Learned the importance of refining prompts to make debugging responses child-friendly and age-appropriate.
161+
- Experimented with contextualization and code-first workflows to guide learners before debugging.
162+
163+
### Deployment and Infrastructure
164+
- Learned how to dockerize applications and deploy them on AWS EC2 for scalable and efficient model inference.
165+
166+
## Conclusion
167+
168+
The Pippy Debugger successfully laid the foundation for the LLM-powered debugger tailored for children. With the ability to display contextual explanations, simplify errors, and guide learners through debugging, the project moves one step closer to making programming education more accessible and engaging.
169+
170+
## Acknowledgment
171+
172+
This project was completed under the mentorship of Walter Bender, Ibiam Chihurumnaya & Kshitij Shah as part the Dedicated Mentorship Program 2025.
173+
174+
I sincerely thank my mentors, the Sugar Labs, and C4GT community for their continuous guidance and support throughout this project.
175+
176+
It has been an incredibly rewarding summer working on this project, where I not only had the opportunity to contribute to open-source development but also to learn, grow, and collaborate with an inspiring community. This experience has motivated me to carry forward the spirit of open source, to continue contributing, and to build tools and software that make technology more accessible and impactful for everyone.
177+
178+
---

0 commit comments

Comments
 (0)