为什么概率区间比标签好用
只回答“钓鱼”或“不是钓鱼”的过滤器只有两个动作:投递或丢弃。但真正麻烦的邮件都在中间——域名差一个字符的供应商发票,或者带短链的密码重置通知。
有了概率,你可以把结果拆成几档:
- 高:隔离并通知收件人。
- 中:投递时加提示条,或先留住等复核。
- 低:正常投递,并作为负样本喂给下一轮阈值调整。
问题形状
tsimport { booleanQuestion, choice } from '@system-one-ai/core';
export const mailQuestions = {
credentialRisk: booleanQuestion(
'Does this message try to obtain credentials or payment through a link or attachment?',
),
handling: choice('What should happen to this message?', {
deliver: 'Deliver as normal',
warn: 'Deliver with a warning to the recipient',
quarantine: 'Quarantine and notify the recipient',
review: 'Send to the security team',
}),
};
把发件人、主题、正文和链接域名作为 state。先去掉脚本和远程图片:模型读的是文本,你不希望分流本身触发一次远程请求。
按数字分流
tsexport async function triageMail(client, message: { from: string; subject: string; body: string; links: string[] }) {
const result = await client.evaluate({
state: message,
questions: mailQuestions,
});
const p = result.answers.credentialRisk.probability;
// 占位区间;请用你自己标注的邮件样本校准
if (p >= 0.85) return 'quarantine';
if (p >= 0.5) return 'review';
if (p >= 0.25) return 'warn';
return 'deliver';
}
示意代码,未经过实际运行测试。
它抓不到的情况
- 它读不了的附件。 Jev 只读文本和 JSON;扫描版 PDF 或带宏的文档对它不可见。先把文本抽出来,或者换一个能读图的模型。
- 近似域名:除非把发件域名放进 state。请把域名和链接主机显式传进去。
- 被盗用的合法账号。 措辞可能完全正常,因为是真实的人写的。
把关键字段传进去,把问题问窄。通用做法见 Agent 护栏。
费用
每 4KB 算一块,不足 4KB 也按一块。费用 = 块数 × 问题数 × 模型单价。一封短邮件就是一块,所以 Jev 上两个问题的一次请求是 2 积分。
新账号注册即送 100 积分,积分不会过期。详见 定价。
在线试用钓鱼邮件示例(需登录),用示例数据看同一组问题。