基于文心大模型,提出了一种改进的 Prompt 设计策略,通过优化输入提示模板,提升了大模型在立场检测任务中的分类准确性和稳定性。本文以多个真实数据集为研究对象,构建了从文本输入到模型输出的完整流程,涵盖模型生成结果的后处理、立场自动检测和与人工标注结果的对比实验。实验结果表明,所提出的 Prompt 工程方法在正向与负向的分类任务中取得了较高的准确率。本文的研究为基于大模型的文本分类和舆情分析提供了一种有效的方法,同时揭示了 Prompt 设计对模型性能的重要影响。 Sentiment and Classification and Stance detection is a critical task in natural language processing, widely applied in sentiment classification, public opinion analysis, and social issue research. To address the limitations of traditional methods in multi-turn dialogues and complex text classification, this paper proposes an improved prompt engineering strategy based on the ERNIE large model. By optimizing input prompt templates, the proposed method enhances the accuracy and robustness of stance classification tasks. Multiple real-world datasets were used as research subjects to construct a complete workflow from text input to model output. This workflow includes post-processing of model-generated results, automatic stance detection, and comparative experiments with manually labeled data. Experimental results demonstrate that the proposed prompt engineering approach achieves high accuracy in classifying positive and negative. This study provides an effective method for text classification and public opinion analysis based on large models, highlighting the critical impact of prompt design on model performance.