How do you stop prompts leaking secrets?
AdvancedProductionPrompting & structured outputs
Answer
Never put API keys, passwords or internal URLs that should stay private into prompts. Assume users can extract the system prompt. Keep secrets in the tools' backend, give tools least privilege, and scan prompts and logs for secrets in CI.