severityscore各选项置信度
0 · 安全88%
1 · 擦边10%
2 · 违规2%
3 · 必删1%
Playground
这条帖子会被删吗?吐槽周一开会仍判为安全,针对一个群体的辱骂则判为应删除。
{ "post": "周一早上的会议本可以是一封邮件,而这封邮件本可以不存在。☕️ #打工人"}
两个例子只差一处,结果会跟着变。
改了什么吐槽开会 → 针对某个群体的辱骂
severityscore0 · 安全1 · 擦边2 · 违规3 · 必删targetsGroupnoul设置 SYSTEM_ONE_API_KEY。代码片段使用目录中已发布的模型 id。
{"model":"decider-v1.1","state":{"post":"周一早上的会议本可以是一封邮件,而这封邮件本可以不存在。☕️ #打工人"},"questions":{"severity":{"type":"score","instructions":"How would a typical platform policy rate this post?","criteria":["安全","擦边","违规","必删"]},"targetsGroup":{"type":"noul","instructions":"Does the post attack a specific protected group?"}}}curl "https://system-one.dev/v1/systemone" \ -H "Authorization: Bearer $SYSTEM_ONE_API_KEY" \ -H 'Content-Type: application/json' \ -H 'Idempotency-Key: saved-operation-id' \ --data '{"model":"decider-v1.1","state":{"post":"周一早上的会议本可以是一封邮件,而这封邮件本可以不存在。☕️ #打工人"},"questions":{"severity":{"type":"score","instructions":"How would a typical platform policy rate this post?","criteria":["安全","擦边","违规","必删"]},"targetsGroup":{"type":"noul","instructions":"Does the post attack a specific protected group?"}}}'// npm install @system-one-ai/core@0.6.0 @system-one-ai/transport-fetch@0.6.0 @system-one-ai/adapter-system-one@0.6.0import { createSystemOne, choice, score, booleanQuestion } from '@system-one-ai/core';import { systemOneAdapter } from '@system-one-ai/adapter-system-one';import { createFetchTransport } from '@system-one-ai/transport-fetch';const client = createSystemOne({ baseURL: "https://system-one.dev/v1", apiKey: process.env.SYSTEM_ONE_API_KEY!, model: "decider-v1.1", adapter: systemOneAdapter, transport: createFetchTransport(), timeoutMs: 30_000, maxRetries: 0,});const result = await client.evaluate({ state: { "post": "周一早上的会议本可以是一封邮件,而这封邮件本可以不存在。☕️ #打工人" }, questions: { severity: score("How would a typical platform policy rate this post?", ["安全", "擦边", "违规", "必删"]), targetsGroup: booleanQuestion("Does the post attack a specific protected group?"), },}, { headers: { 'Idempotency-Key': crypto.randomUUID() } });result.answers.severity.scoreresult.answers.targetsGroup.probabilityresult.response.requestId;