TIPS: A Prompt Engineering Framework for Code Classification and Generation on Resource-Constrained Systems
Authors:
Open Access
- 28 January 2026
- journal article
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Access
- Vol. 14, 15723-15735
Abstract
Recent advances in AI-assisted programming have demonstrated the potential of Large Language Models (LLMs) in complex code classification and generation. However, their high computational demands and reliance on large-scale datasets limit deployment in resource-constrained environments such as educational tools, edge devices, and small-scale development settings. To address these challenges, this paper introduces the Template-Integrated Prompting System (TIPS), a modular prompt engineering framework designed for lightweight and efficient code analysis. TIPS integrates small-model training, semantically guided demonstration selection, and structured prompt templates to construct an interpretable reasoning pipeline that combines few-shot learning with Chain-of-Thought (CoT) reasoning. Experiments on a benchmark dataset of multithreaded Pthread programs show that TIPS achieves higher precision, recall, and F1-scores than traditional classifiers and prompt-based baselines, even under class imbalance. These results demonstrate that model effectiveness depends not only on scale but also on semantic guidance and structured reasoning. TIPS provides a scalable and interpretable solution, with potential applications in education, software development, and intelligent assistance systems, particularly in resource-constrained environments.Keywords
This publication has 42 references indexed in Scilit:
- What is wrong with your code generated by large language models? An extensive studyScience China Information Sciences, 2026
- Evaluating zero-shot multilingual aspect-based sentiment analysis with large language modelsInternational Journal of Machine Learning and Cybernetics, 2025
- A study on prompt design, advantages and limitations of ChatGPT for deep learning program repairAutomated Software Engineering, 2025
- Defending mutation-based adversarial text perturbation: a black-box approachCluster Computing, 2025
- Comparing Large Language Models and Human Programmers for Generating Programming CodeAdvanced Science, 2024
- OMPGPT: A Generative Pre-trained Transformer Model for OpenMP2024
- Advising OpenMP Parallelization via A Graph-Based Approach with Transformers2023
- LM4HPC: Towards Effective Language Model Application in High-Performance Computing2023
- Dynamic Race Detection with LLVM Compiler2012
- Bagging predictorsMachine Learning, 1996