Prompt injection

Text from a customer, a web page or a document can carry instructions. Treat it as data: limit the tools the model may call and require approval for sensitive actions.

Data leaks

Apply the same access rules to retrieval as to your app, and never place secrets in prompts.

Runaway cost

Set limits per user and per day, cache repeated questions, and alert when spend jumps.

Test it

Add attack cases to your evaluation set and run them before every release.