TIPS: A Prompt Engineering Framework for Code Classification and Generation on Resource-Constrained Systems (IEEE Access, 2026)