プロンプトの書き方
研究モデルは、対象・目的・出力の形が一文ずつ明示されたときに最もよく働きます。ここでは admission と同じ語彙(task / scope)で書く方法と、ガードレールに当たらない書き方を示します。
system turn
{"role": "system", "content": "You are reviewing code the user owns (scope: owned). Report concrete findings with file:line evidence. Prefer fixes over descriptions. Output English."}
system は先頭 1 turn だけ。役割・スコープ・出力言語・形式をここに。task は本文の名前ではなく用途(code-review / vulnerability-triage / remediation)で、bearer 経路の既定は code-review です。
ファイルを渡す
jq -n --arg m "qwen3.8-flash-next-whitehacker" --rawfile f src/auth.ts \
'{model:$m,max_tokens:4096,messages:[{role:"user",content:("Review src/auth.ts for auth bypasses.\n\n```ts\n"+$f+"\n```")}]}' \
| curl -s -X POST https://api.mithril.fund/v1/chat/completions -H "Authorization: Bearer $KOTOBA_API_TOKEN" -H "content-type: application/json" -d @-
- content は文字列だけ(画像・音声・添付は未対応)。ファイルはコードブロックとして本文に。
- 入力の上限は 524,288 文字(ツール定義を含む)。大きいリポジトリは関係するファイルに絞るか、エージェントのツールで読ませます。
- 会話は最大 256 turn。ツール結果は role: tool(tool_call_id 付き)で返します。
出力の形を決める
- 箇条書き・表・JSON — 本文で頼む。厳密な JSON はツール呼び出しで強制(Structured outputs)。
- max_tokens は答えの長さ + reasoning の分。短い答えでも 2,048 以上。
- temperature 等は落とされます。ばらつきを抑えたいなら形と根拠を要求してください。
避けるもの(ガードレール)
csam-block— block: CSAM references are refused on every request (AUP strictly-prohibited).cbrn-block— block: CBRN/WMD uplift requests are refused on every request (AUP strictly-prohibited).fraud-block— block: Fraud-as-a-service asks are refused (AUP strictly-prohibited).secret-hygiene— redact: Live credential shapes in the prompt are masked before the model sees them.pii-passkeys— flag: References to passkeys/private keys are flagged for review, never blocked.
生きた鍵の形(sk-…、AKIA…、PRIVATE KEY)はモデルに渡る前にマスクされます(redact)。テストではダミー値を使ってください。ブロックは 403 guardrail-blocked で、耐久レシートに残ります。
offensive band(payload-crafting / c2-tooling)は契約 rung まで閉じています。許可された環境での PoC 作成は AUP の範囲内でも、task はその band で拒否されます — 依頼の言い換えではなく、rung を上げる経路が答えです。