|
| 1 | +--- |
| 2 | +title: "GSoC ’25 Week 07 Update by Diwangshu Kakoty" |
| 3 | +excerpt: "Reflection Learning Widget in Music Blocks" |
| 4 | +category: "DEVELOPER NEWS" |
| 5 | +date: "2025-07-20" |
| 6 | +slug: "2025-07-20-gsoc-25-diwangshu-week07" |
| 7 | +author: "@/constants/MarkdownFiles/authors/diwangshu-kakoty.md" |
| 8 | +tags: "gsoc25,sugarlabs,week06,AI" |
| 9 | +image: "assets/Images/GSOC.png" |
| 10 | +--- |
| 11 | + |
| 12 | +<!-- markdownlint-disable --> |
| 13 | + |
| 14 | +# Week 07 Progress Report by Diwangshu Kakoty |
| 15 | + |
| 16 | +**Project:** [AI Tools for Reflection](https://github.com/Commanderk3/reflection_ai) |
| 17 | +**Mentors:** [Walter Bender](https://github.com/walterbender), [Sumit Srivastava](https://github.com/sum2it) |
| 18 | +**Assisting Mentors:** [Devin Ulibarri](https://github.com/pikurasa), [Ajeet Pratap Singh](https://github.com/apsinghdev) |
| 19 | +**Reporting Period:** 2025-07-14 - 2025-07-19 |
| 20 | + |
| 21 | +--- |
| 22 | + |
| 23 | +## Goals for This Week |
| 24 | + |
| 25 | +- **Goal 1:** Implement periodic summary generation. |
| 26 | +- **Goal 2:** Upgrading the 'reflection' widget. |
| 27 | +- **Goal 3:** Fix bugs occured by these changes. |
| 28 | + |
| 29 | +--- |
| 30 | + |
| 31 | +## This Week’s Achievements |
| 32 | + |
| 33 | +1. **Implement periodic summary generation** |
| 34 | + - As mentioned in the previous blog, I’ve now implemented periodic summary generation. Currently, it uses a straightforward prompt that requests a summary after every five bot messages. While this is a simple and somewhat detailed approach, it’s still basic and may not consistently produce accurate results. I’m in the process of testing it. |
| 35 | + |
| 36 | + - If it proves unreliable, I’ll switch to invoking the LLM with a dedicated prompt template after every five bot messages. This will ensure a structured and consistent summary each time. |
| 37 | + |
| 38 | +2. **Upgrading the 'reflection' widget** |
| 39 | + |
| 40 | + - The widget now allows users to interact with all available AI mentors directly within the interface. When a user initiates a conversation, their project code is automatically sent to the server, enabling mentors to provide more context-aware guidance and feedback. For this I developed a '/code' endpoint. This is the flow: |
| 41 | + |
| 42 | + - Music Blocks sends the project code to the server as a POST request in JSON format. |
| 43 | + |
| 44 | + - The server processes this data by running a conversion module and then calls the reasoning LLM to generate the corresponding algorithm. |
| 45 | + |
| 46 | + - It then responds with both the flowchart and the algorithm. |
| 47 | + |
| 48 | + - The client is responsible for storing this information and including it in requests sent to the /chat endpoint. |
| 49 | + |
| 50 | + |
| 51 | + - I have also enhanced the save functionality. Users can now choose to save their entire conversation history at any point. In addition, the system automatically stores generated summaries and analytical insights, ensuring that important information and progress are preserved for future reference. |
| 52 | + |
| 53 | +--- |
| 54 | + |
| 55 | +## Challenges & How I Overcame Them |
| 56 | + |
| 57 | +- **Challenge :** I faced a minor challenge while implementing the periodic summary. My approach is to start simple and build up as needed, so I initially relied on prompting. However, the LLM wasn’t following the instruction. After some brainstorming, I realized that other instructions like 'Limit your response to 30 words' might have been conflicting with it |
| 58 | + |
| 59 | + **Solution :** I modified the conflicting prompts and experimented with few-shot prompting, which resolved the issue. |
| 60 | +--- |
| 61 | + |
| 62 | +## Key Learnings |
| 63 | + |
| 64 | +- Adjusting or refining conflicting prompts, combined with the use of few-shot prompting, can significantly improve an LLM’s output. This highlights the importance of prompt engineering in guiding model behavior and achieving desired results. |
| 65 | +--- |
| 66 | + |
| 67 | +## Next Week’s Roadmap |
| 68 | + |
| 69 | +- I need to finish building the widget to store user data, such as messages, summaries, and analysis reports using IndexedDB. |
| 70 | +- Once that’s completed, I’ll move on to the 'analysis generation' phase. |
| 71 | + |
| 72 | +--- |
| 73 | + |
| 74 | +## Resources & References |
| 75 | + |
| 76 | +- **Repository:** [reflection_streamlit](https://github.com/Commanderk3/reflection_streamlit) |
| 77 | +- **Streamlit App:** [Reflection App](https://reflectionapp-2yoxtvn6sknvktme2zorvq.streamlit.app/) |
| 78 | + |
| 79 | +--- |
| 80 | + |
| 81 | +## Acknowledgments |
| 82 | + |
| 83 | +Thank you to my mentors, the Sugar Labs community, and fellow GSoC contributors for ongoing support. |
| 84 | + |
| 85 | +--- |
0 commit comments