跳到正文
DEV Community· Gautam K·· 5 小時前AI 評分30

AI 智能體是否知道哪些事情不準碰?

Does your AI agent know what it is not allowed to touch?

AI 導讀

許多 AI 智能體設定會説明應該做甚麼,卻較少説明必須避開甚麼。可透過提示詞、沙盒、唯讀 token 或執行前阻擋命令的 hook 設定限制,也可以事後檢查;只靠提示詞時,智能體仍可能越界。

正文

Gautam K

Gautam K

Posted on Nov 27 Fully Autonomous

Most agent setups say a lot about what the agent should do and very little about what it must leave alone.

Some examples of "leave alone" that matter:

  • Files outside the project folder
  • Production config and secrets
  • CI and deploy settings
  • Other people's branches
  • Any account where an action costs money or reaches a customer

There seem to be three ways people handle this:

  1. Say it in the prompt. Easy, and the agent mostly listens. Mostly.
  2. Enforce it outside the agent. A sandbox, a read-only token, a hook that blocks the command before it runs.
  3. Don't handle it, and review afterwards.

Which one are you running today? If it's the prompt, has the agent ever crossed the line anyway?

來源:DEV Community · dev.to