## 2 Related Work
### Prompt Engineering  
Prompt engineering is a technique that guides LLMs to generate more accurate and relevant outputs by designing specific input instructions (prompts), with its core focus on optimizing the interaction between models and tasks [21]. In the early stage, it evolved from simple directives (e.g., \"Summarize the following text\") to advanced strategies like chain-of-thought reasoning and few-shot learning, later integrating domain-specific knowledge \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**No.** & **Model Name** & **Developer** & **Open Source** & **Release Date** & **Max Parameters** & **Key Features** \\ \hline \hline
1 & ChatGPT [15] & Open AI & No & 2022.11 & N/A &
\begin{tabular}{c} General-purpose dialogue, \\ advanced reasoning, and \\ long-text generation. \\ \end{tabular} \\ \hline
2 & \begin{tabular}{c} Gemma [16] \\ DeepMind \\ \end{tabular} & \
\begin{tabular}{c} Google \\ DeepMind \\ \end{tabular} & Yes & 2024.2 & 7B &
\begin{tabular}{c} Lightweight open-source model \\ with safety and efficiency focus. \\ \end{tabular} \\ \hline
3 & \
\begin{tabular}{c} Llama [17] \\ \end{tabular} & Meta & Yes & 2023.7 & 400B &
\begin{tabular}{c} Community-driven open-source \\ model, supports multilingual tasks. \\ \end{tabular} \\ \hline
4 & \begin{tabular}{c} Qwen [18] \\ \end{tabular} & \
\begin{tabular}{c} Alibaba \\ Cloud \\ \end{tabular} & Yes & 2023.8 & 110B &
\begin{tabular}{c} Chinese-optimized, excels in math \\ and coding tasks. \\ \end{tabular} \\ \hline
5 & \
\begin{tabular}{c} ERNIE Bot [19] \\ \end{tabular} & Baidu & No & 2023.3 & N/A &
\begin{tabular}{c} Leading Chinese NLP performance, \\ integrated search enhancement. \\ \end{tabular} \\ \hline
6 & iFlySpark [20] & iFLYTEK & No & 2023.5 & N/A &
\begin{tabular}{c} Multimodal interaction, specialized \\ in education and \\ healthcare scenarios. \\ \end{tabular} \\ \hline \hline \end{tabular}  
Notes: “N/A” indicates parameter sizes not explicitly disclosed by developers.  
\end{table} 
Table 1: Some major LLMs. enhancement and multimodal fusion [22]. Current research in prompt engineering focuses on automating prompt generation [23], enhancing robustness via adversarial optimization [24], and aligning outputs with ethical constraints [25], while leveraging frameworks like LangChain [26] for domain-specific adaptation. The composition of a generic prompt template can be delineated into four principal components: prefix, instruct, examples and input [27]. The prefix is fixed during usage and is used to set the model's role. The instruct includes specific task-related instructions. The examples are illustrations of the specific task; if no examples are provided, it indicates that the entire task is zero-shot. The input refers to the text to be processed. Furthermore, the following three aspects should be paid attention to in the application of prompt engineering:  
1. Clarify task objectives. To enhance model performance in specialized tasks, it is crucial to explicitly assign roles and define granular actions, thereby narrowing the model's focus and reducing ambiguity in open-ended tasks. Additionally, breaking complex objectives into sub-steps through task decomposition aligns outputs with domain-specific workflows, enhancing coherence and relevance in the execution of complex tasks. 2. Provide sufficient context. To ensure responses are grounded in verified knowledge and minimize hallucination, it is essential to employ domain anchoring by embedding authoritative references or curated data snippets. Furthermore, dynamic context enrichment can be achieved by incorporating real-time updates or scenario-specific examples, such as few-shot learning, allowing the outputs to adapt effectively to evolving professional requirements. 3. Set output requirements. To ensure usability in downstream applications such as reports or code generation, it is important to enforce structural constraints through the use of specific formats and validation rules.