|
| 1 | +--- |
| 2 | +title: "DMP ’25 Week 01 Update by Aman Chadha" |
| 3 | +excerpt: "Working on a RAG model for Music Blocks core files to enhance context-aware retrieval" |
| 4 | +category: "DEVELOPER NEWS" |
| 5 | +date: "2025-06-09" |
| 6 | +slug: "dmp-25-aman-week01" |
| 7 | +author: "Aman Chadha" |
| 8 | +description: "DMP '25 Contributor working on retrieval-augmented generation for Music Blocks" |
| 9 | +tags: "dmp25,musicblocks,rag,week01" |
| 10 | +image: "assets/Images/c4gt_DMP.png" |
| 11 | +--- |
| 12 | + |
| 13 | +# Week 01 Progress Report by Aman Chadha |
| 14 | + |
| 15 | +**Project:** [JS Internationalization with AI Translation Support](https://github.com/sugarlabs/musicblocks/pull/4459) |
| 16 | + |
| 17 | +**Mentors:** [Walter Bender](https://github.com/walterbender) |
| 18 | + |
| 19 | +**Reporting Period:** 2025-06-02 - 2025-06-08 |
| 20 | + |
| 21 | +--- |
| 22 | + |
| 23 | +## Goals for This Week |
| 24 | + |
| 25 | +- Develop a Retrieval-Augmented Generation (RAG) model using the core files of Music Blocks to provide context-aware responses. |
| 26 | +- Collect and parse .po files, extracting msgid and msgstr pairs along with comments showing usage in source files. |
| 27 | +- Use AST parsing (with Babel) to gather metadata chunks from source files to improve retrieval relevance. |
| 28 | + |
| 29 | +--- |
| 30 | + |
| 31 | +## This Week’s Achievements |
| 32 | + |
| 33 | +1. **RAG Model Development** |
| 34 | + - Started working on building a RAG model focused on the core Music Blocks files. This aims to give the model context about what Music Blocks is and how it functions, improving answer relevance. |
| 35 | + |
| 36 | +2. **Metadata Extraction from .po Files** |
| 37 | + - Successfully collected msgid and msgstr pairs from translation files. |
| 38 | + - Parsed comments above the translations to identify which files use each msgstr. |
| 39 | + |
| 40 | +3. **AST Parsing and Chunking** |
| 41 | + - Used Babel to parse Music Blocks source files and extract relevant code chunks. |
| 42 | + - Stored these chunks with their associated metadata to enable better context retrieval during RAG. |
| 43 | + |
| 44 | +--- |
| 45 | + |
| 46 | +## Challenges & How I Overcame Them |
| 47 | + |
| 48 | +- **Challenge:** Parsing complex .po files with varied comment styles and ensuring correct association of usage metadata. |
| 49 | + **Solution:** Created robust parsing scripts to handle different comment formats and verified chunk associations manually on sample files. |
| 50 | + |
| 51 | +- **Challenge:** Extracting meaningful code chunks via AST parsing while maintaining useful granularity. |
| 52 | + **Solution:** Experimented with different AST traversal strategies and filters to optimize chunk size for retrieval. |
| 53 | + |
| 54 | +--- |
| 55 | + |
| 56 | +## Key Learnings |
| 57 | + |
| 58 | +- Gained deeper understanding of the internals of Music Blocks core files and their translation system. |
| 59 | +- Improved skills with Babel AST parsing and metadata extraction techniques. |
| 60 | +- Learned the importance of detailed metadata in enhancing RAG model retrieval accuracy. |
| 61 | + |
| 62 | +--- |
| 63 | + |
| 64 | +## Next Week’s Roadmap |
| 65 | + |
| 66 | +- Build a demo to showcase the RAG model's ability to answer Music Blocks-related queries with context from core files. |
| 67 | +- Begin integrating metadata-enriched .po file chunks into the RAG database for improved translation string retrieval. |
| 68 | +- Optimize chunking and metadata tagging strategy based on initial demo feedback. |
| 69 | + |
| 70 | +--- |
| 71 | + |
| 72 | +## Resources & References |
| 73 | + |
| 74 | +- **Music Blocks Repository:** [github.com/your-org/musicblocks](https://github.com/your-org/musicblocks) |
| 75 | +- **Babel AST Docs:** https://babeljs.io/docs/en/babel-parser |
| 76 | +- **RAG Model Concepts:** https://arxiv.org/abs/2005.11401 |
| 77 | + |
| 78 | +--- |
| 79 | + |
| 80 | +## Acknowledgments |
| 81 | + |
| 82 | +Thanks to my mentors and the DMP community for their guidance and support throughout this work. |
| 83 | + |
| 84 | +--- |
| 85 | + |
| 86 | +## Connect with Me |
| 87 | + |
| 88 | +- GitHub: [@aman-chadha](https://github.com/ac-mmi) |
| 89 | + |
| 90 | + |
| 91 | +--- |
0 commit comments