The Open Model EcosystemLesson 49 of 71

Module 5 · Getting good output

Guardrails as a separate layer

In this lesson

  • 8 min read
  • 6 reading sections
  • Knowledge check
  • Lesson 9 of 10 in this chapter

This chapter’s goalTake an open model producing bad output and identify whether the fault lies in the sampler, the prompt, the examples, the schema, the language or the model itself; then apply the cheapest correct fix, from a temperature change to a grammar-constrained decoder to a separate guardrail model, and demonstrate the improvement on a held set.

This chapter’s media

The film explains chapter ideas. The audiobook narrates the complete teaching text.

FormatEnglishहिंदी
Chapter filmNot availableNot available
Full audiobookNot availableNot available

A little at a time

Explore an idea, try it, then check what stays.

Step 1 of 7Free · no account needed
Lesson steps

Why the check must not be the same model

A model asked to both answer the user and police itself has a structural problem: the thing it is policing is in its own context, written by the person it is policing. Prompt injection works precisely because instructions and data arrive through the same channel.

A separate classifier does not have that problem to the same degree. It is not following instructions; it is producing a label. Text saying ignore your previous instructions is an input to be classified, not a command, because the model was tuned to classify rather than to comply.

That is not perfect either (classifiers can be evaded), but it is a different failure surface, and layering the two is much stronger than either alone.

Your place and first choices stay on this browser. Classroom credit is recorded separately.

Every lesson here is open. Your progress is recorded once you pass the Maths You Actually Need exam.

Stuck on something?Ask Anjali, your AI tutor

How to cite: Addaly (2026) ‘Guardrails as a separate layer’, in The Open Model Ecosystem. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/open-models/guardrails-as-models (Accessed: 29 November 2026).