固定分类规则#
用提示实现函数时,每个新输入都要附上指令。用编译实现时,先加载保存的程序,再逐个处理输入。两种做法都运行神经模型,区别在于程序怎样构建、哪些内容可以保存。
同一封邮件的两种处理方式#
以“这次发布正等你批准”为例,看看两种做法分别给模型输入什么,处理下一封邮件时又能复用什么。对照阅读使用提示的代码和编译后的实现。
使用相同的截止时间规则#
按下面的规则,邮件必须明确写出今天的截止时间才算紧急。单说“现在”或“立刻”不算。
Decide whether the recipient must act by an explicitly stated deadline today. Return exactly URGENT or ROUTINE. Return URGENT only if the email gives a deadline today, such as a clock time today or the end of today. Words such as now, urgently, immediately, or ASAP do not state a deadline today: return ROUTINE for those requests unless a deadline today is also stated. Blocked work without an explicit deadline today, completed work, newsletters, and FYI updates are ROUTINE.
PAW 和提示基线使用同一个 Qwen3-0.6B Q6_K 基础模型文件。PAW 加载编译好的适配器;提示基线则在非思考模式下运行未加载适配器的模型。两者都使用贪心解码,上下文长度均为 2,048 个词元。
基线提示先给出完整的分类规则,再附上邮件和填写标签的位置:
Decide whether the recipient must act by an explicitly stated deadline today. Return exactly URGENT or ROUTINE. Return URGENT only if the email gives a deadline today, such as a clock time today or the end of today. Words such as now, urgently, immediately, or ASAP do not state a deadline today: return ROUTINE for those requests unless a deadline today is also stated. Blocked work without an explicit deadline today, completed work, newsletters, and FYI updates are ROUTINE.
Email:
{email}
Label:模型使用的完整对话模板如下:
<|im_start|>user
{INPUT_PLACEHOLDER}<|im_end|>
<|im_start|>assistant
<think>
</think>
检查所有八个输出#
PAW 答对 8/8,提示基线答对 4/8。在前五封邮件上,两者分别答对 5 封和 4 封。后三封邮件用同一条规则进一步检验模型对截止时间的判断。
| 电子邮件 | 预计 | PAW | 提示法 |
|---|---|---|---|
| Please approve the submission by 5 p.m. today so we can meet the deadline. | URGENT | URGENT | URGENT |
| Here is next month's seminar schedule for your information. | ROUTINE | ROUTINE | ROUTINE |
| The release is waiting on your approval. Please unblock it now. | ROUTINE | ROUTINE | URGENT |
| Forwarding the earlier ‘URGENT: signature needed’ email for the record. This was resolved yesterday. | ROUTINE | ROUTINE | ROUTINE |
| The submission is ready, but the team cannot send it until you grant access. | ROUTINE | ROUTINE | ROUTINE |
| Please send your comments by noon today. | URGENT | URGENT | ROUTINE |
| The build is broken. Fix it immediately. | ROUTINE | ROUTINE | URGENT |
| Approve the budget by 9 a.m. tomorrow. | ROUTINE | ROUTINE | URGENT |
以上是 2026 年 11 月 22 日的实际输出。完整教程还列出了原始紧急邮件分类、邮件路由、另外两个示例以及离线运行的结果。
分别测量构建、加载和反复调用的耗时。生成程序的开销与运行已保存程序的开销对应不同的阶段。