Dashboard
0%
1
Curious builder0 XP earned · 300 to level 2
0 daysFinish a lesson to begin
Badge collection0 of 6 unlocked
51 small wins to finish your pathNext question →

Q7EasyConcept

What are guardrails, and what types are there?

30-second answerSay your answer out loud first, then reveal.
TypeExamplesImplementation
InputPII redaction, jailbreak/injection detection, off-topic filter, length limits, language detectionRegex, NER, classifiers, small LLM
OutputToxicity, PII leak, hallucination/groundedness, schema validation, competitor mentions, brand toneClassifiers, validators, LLM judges
Action / toolAllow-listed tools, parameter validation, spending limits, approvals, sandboxingCode-level policy enforcement
Dialogue / flowScripted flows for sensitive topics, escalation to humansRails frameworks, state machines
System-levelRate limits, abuse detection, monitoring, kill switchesInfrastructure

Key principle: guardrails in code and architecture are reliable; guardrails in prompts are guidance the model may not follow. Use both, but enforce critical policies in code.

Trade-offs: each guardrail adds latency and cost and can cause false positives (over-blocking). Tune thresholds with evals (Q28).

You understood something today that you didn't yesterday.