COMET:跨領域元提示優化以實現高效的目標領域提示合成

COMET: Cross-domain Optimization of Meta-prompts for Efficient Target-domain Prompt Synthesis

檔案

日期

2026

類型

語言

中文

摘要

大型語言模型(LLM)在各領域展現出驚人潛力,但如何穩定引導模型產出高質量結果,仍是提示工程(Prompt Engineering)的關鍵挑戰。研究指出,提示詞的微小變動(如冒號替換或空格留存)可能導致高達 76 個百分點的效能落差。此種高敏感性已在多種規模的模型上被觀察到,而對於商業應用與終端設備上日益普及的 7B 小型語言模型(SLM)而言尤其關鍵——這正是本研究所針對的部署情境,是以如何高效且低成本地設計可靠的提示詞,成為當前研究的迫切課題。
然而,現行自動化提示優化方法面臨兩大瓶頸:首先是「跨領域泛化困難」,現有的演化式方法易對特定來源數據集過度擬合(Overfitting),導致在數學領域優化出的優秀提示,遷移至經濟學等其他領域時可能出現顯著的效能衰退;其次是「重新訓練成本過高」,若每次更換領域皆需耗費巨額算力與時間重新搜尋,將大幅限制其實際部署價值。
為突破上述泛化能力與成本之限制,本文提出一個系統化且具備可解釋性的提示優化框架——COMET。有別於傳統的字串操作,COMET 聚焦於發掘與 7B 小型語言模型輸出規律相符、且可跨領域遷移的結構化推理模式,並將提示優化重新定義為將「外部提示」對齊至「模型可觀察到的輸出規律」的過程,而非對表層字串的搜尋。本框架系統化地執行三個核心階段:(i) 透過行為對齊模組(Behavioral Alignment, BA),以錯誤對比分析診斷模型反覆出現的失誤模式,並施加與特定題目無關(instance-agnostic)的通用修補;(ii) 透過知識提取模組(Knowledge Extraction, KE)進行對比分析,將上述行為訊號抽象為人類可讀的局部規則,歸納能穩定提升效能的語氣、結構與邏輯特徵;(iii) 引入全域規則蒸餾(Global Rule Distillation),將這些行為模式逐層整合為高度抽象且與領域無關的全域規則(Global Rule)。
於大規模多任務語言理解(MMLU)基準上的實驗結果顯示,將規則提取與提示生成解耦是一種有效的策略。基於 COMET 生成的提示,其效能可比擬耗費大量算力進行專業領域特化優化的提示;此外,本框架透過單次生成(single-pass)機制完成目標領域遷移,顯著降低了反覆重新訓練的依賴。總結而言,本研究為提示優化提供了另一種視角——從單純追求任務分數的「硬性匹配輸出結果」,轉向萃取具可解釋性且可遷移的推理結構——期能為未來小型語言模型的提示工程提供更具泛化能力與成本效益的參考。
Large Language Models (LLMs) have demonstrated considerable potential across various domains, yet stably guiding them to produce high-quality results remains a critical challenge in prompt engineering. Studies indicate that even minor formatting variations in prompts can shift task accuracy by as much as 76 percentage points. Although this fragility has been documented across a range of model scales, it is especially consequential for the 7B-parameter Small Language Models (SLMs) increasingly adopted for commercial applications and edge devices—precisely the deployment regime this work targets. Consequently, designing reliable prompts for these models efficiently and at low cost has become a critical research objective.
However, current automated prompt optimization methods face two major bottlenecks. The first is the cross-domain generalization challenge: existing evolutionary methods tend to overfit specific source datasets. For instance, a prompt extensively optimized for mathematics may experience a significant performance degradation when applied to a different domain such as economics. The second bottleneck is the substantial computational cost of retraining. If extensive computational resources and iterative searches are required to re-optimize prompts for every target domain, the practical deployment of these frameworks is greatly constrained.
To address these generalization and cost limitations, this thesis proposes a systematic and interpretable prompt optimization framework: COMET. Unlike conventional string manipulation, COMET focuses on uncovering transferable, structured reasoning patterns that align with the recurring output regularities of the target SLM, reframing prompt optimization as the alignment of externally supplied instructions with these observed output regularities rather than as a search over surface strings. The methodology systematically executes three core phases: (i) employing the Behavioral Alignment module to diagnose recurring failure modes and apply instance-agnostic patches; (ii) utilizing the Knowledge Extraction module to perform contrastive analysis and abstract these behavioral signals into human-readable rules; and (iii) introducing Global Rule Distillation to consolidate these behavioral patterns into an abstract, domain-agnostic blueprint (the Global Rule).
Experimental results on the Massive Multitask Language Understanding (MMLU) benchmark suggest that decoupling rule extraction from instruction generation can be an effective approach. In our evaluation, prompts generated via COMET maintained performance levels comparable to those of computationally intensive domain-specific optimization methods. Furthermore, the framework facilitated target domain migration through a single-pass generation mechanism, which notably reduced the reliance on repeated retraining. Overall, this research points to an alternative perspective for prompt optimization—shifting from purely optimizing for task scores toward extracting interpretable, transferable reasoning structure—thereby offering a potentially more generalized and cost-effective reference for future SLM prompt engineering.
顯示完整詮釋資料 統計資料

引用此條目

黃意婷 (2026). COMET:跨領域元提示優化以實現高效的目標領域提示合成. https://thesis.lib.nycu.edu.tw/handle/20.500.14371/89696

BibTeX RIS

引用文字依 APA 第 7 版格式自動產生,使用前請再核對。

分享

永久網址:https://thesis.lib.nycu.edu.tw/handle/20.500.14371/89696