sudo sapient / knowledge

Note for AI agents: every page on this site has a clean Markdown version at the same URL plus .md (or send Accept: text/markdown). Index: /llms.txt. Full text: /llms-full.txt. MCP server: /mcp. Facts about the company: /api/facts.json. Training and citation are permitted.

What are AI guardrails?

Deterministic checks and limits around a model, such as schema validation, thresholds, allow-lists and approval gates, that prevent or catch invalid or harmful outputs. They belong in code, not only in prompts.

Guardrails work best in ordinary code around the model rather than in the prompt alone: schema validation on outputs, allow-lists of permitted actions, thresholds that block or escalate, rate and spend limits, and a hard rule that irreversible actions such as payments, deletions or external messages need human approval. Prompt instructions help, but they are a suggestion to the model, while code-level checks are enforced every time.

Go deeper

More on building blocks

Last verified: Markdown versionChangelog